google-cloud-eventarc-v1 1.0.0 → 1.1.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/lib/google/cloud/eventarc/v1/bindings_override.rb +96 -0
  3. data/lib/google/cloud/eventarc/v1/channel_pb.rb +1 -1
  4. data/lib/google/cloud/eventarc/v1/enrollment_pb.rb +47 -0
  5. data/lib/google/cloud/eventarc/v1/eventarc/client.rb +2565 -174
  6. data/lib/google/cloud/eventarc/v1/eventarc/paths.rb +112 -0
  7. data/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb +2420 -180
  8. data/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb +1335 -88
  9. data/lib/google/cloud/eventarc/v1/eventarc_pb.rb +35 -1
  10. data/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb +42 -0
  11. data/lib/google/cloud/eventarc/v1/google_api_source_pb.rb +50 -0
  12. data/lib/google/cloud/eventarc/v1/logging_config_pb.rb +45 -0
  13. data/lib/google/cloud/eventarc/v1/message_bus_pb.rb +49 -0
  14. data/lib/google/cloud/eventarc/v1/network_config_pb.rb +45 -0
  15. data/lib/google/cloud/eventarc/v1/pipeline_pb.rb +65 -0
  16. data/lib/google/cloud/eventarc/v1/trigger_pb.rb +4 -1
  17. data/lib/google/cloud/eventarc/v1/version.rb +1 -1
  18. data/proto_docs/google/api/client.rb +51 -10
  19. data/proto_docs/google/api/field_info.rb +88 -0
  20. data/proto_docs/google/api/resource.rb +7 -2
  21. data/proto_docs/google/cloud/eventarc/v1/channel.rb +5 -1
  22. data/proto_docs/google/cloud/eventarc/v1/discovery.rb +8 -7
  23. data/proto_docs/google/cloud/eventarc/v1/enrollment.rb +95 -0
  24. data/proto_docs/google/cloud/eventarc/v1/eventarc.rb +522 -8
  25. data/proto_docs/google/cloud/eventarc/v1/google_api_source.rb +95 -0
  26. data/proto_docs/google/cloud/eventarc/v1/logging_config.rb +78 -0
  27. data/proto_docs/google/cloud/eventarc/v1/message_bus.rb +94 -0
  28. data/proto_docs/google/cloud/eventarc/v1/network_config.rb +37 -0
  29. data/proto_docs/google/cloud/eventarc/v1/pipeline.rb +583 -0
  30. data/proto_docs/google/cloud/eventarc/v1/trigger.rb +76 -35
  31. metadata +16 -3
@@ -75,6 +75,138 @@ module Google
75
75
  end
76
76
  default_config = Client::Configuration.new parent_config
77
77
 
78
+ default_config.rpcs.get_trigger.timeout = 60.0
79
+ default_config.rpcs.get_trigger.retry_policy = {
80
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
81
+ }
82
+
83
+ default_config.rpcs.list_triggers.timeout = 60.0
84
+ default_config.rpcs.list_triggers.retry_policy = {
85
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
86
+ }
87
+
88
+ default_config.rpcs.create_trigger.timeout = 60.0
89
+
90
+ default_config.rpcs.update_trigger.timeout = 60.0
91
+
92
+ default_config.rpcs.delete_trigger.timeout = 60.0
93
+
94
+ default_config.rpcs.get_channel.timeout = 60.0
95
+ default_config.rpcs.get_channel.retry_policy = {
96
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
97
+ }
98
+
99
+ default_config.rpcs.list_channels.timeout = 60.0
100
+ default_config.rpcs.list_channels.retry_policy = {
101
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
102
+ }
103
+
104
+ default_config.rpcs.create_channel.timeout = 60.0
105
+
106
+ default_config.rpcs.update_channel.timeout = 60.0
107
+
108
+ default_config.rpcs.delete_channel.timeout = 60.0
109
+
110
+ default_config.rpcs.get_provider.timeout = 60.0
111
+ default_config.rpcs.get_provider.retry_policy = {
112
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
113
+ }
114
+
115
+ default_config.rpcs.list_providers.timeout = 60.0
116
+ default_config.rpcs.list_providers.retry_policy = {
117
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
118
+ }
119
+
120
+ default_config.rpcs.get_channel_connection.timeout = 60.0
121
+ default_config.rpcs.get_channel_connection.retry_policy = {
122
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
123
+ }
124
+
125
+ default_config.rpcs.list_channel_connections.timeout = 60.0
126
+ default_config.rpcs.list_channel_connections.retry_policy = {
127
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
128
+ }
129
+
130
+ default_config.rpcs.create_channel_connection.timeout = 60.0
131
+
132
+ default_config.rpcs.delete_channel_connection.timeout = 60.0
133
+
134
+ default_config.rpcs.get_google_channel_config.timeout = 60.0
135
+ default_config.rpcs.get_google_channel_config.retry_policy = {
136
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
137
+ }
138
+
139
+ default_config.rpcs.update_google_channel_config.timeout = 60.0
140
+
141
+ default_config.rpcs.get_message_bus.timeout = 60.0
142
+ default_config.rpcs.get_message_bus.retry_policy = {
143
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
144
+ }
145
+
146
+ default_config.rpcs.list_message_buses.timeout = 60.0
147
+ default_config.rpcs.list_message_buses.retry_policy = {
148
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
149
+ }
150
+
151
+ default_config.rpcs.list_message_bus_enrollments.timeout = 60.0
152
+ default_config.rpcs.list_message_bus_enrollments.retry_policy = {
153
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
154
+ }
155
+
156
+ default_config.rpcs.create_message_bus.timeout = 60.0
157
+
158
+ default_config.rpcs.update_message_bus.timeout = 60.0
159
+
160
+ default_config.rpcs.delete_message_bus.timeout = 60.0
161
+
162
+ default_config.rpcs.get_enrollment.timeout = 60.0
163
+ default_config.rpcs.get_enrollment.retry_policy = {
164
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
165
+ }
166
+
167
+ default_config.rpcs.list_enrollments.timeout = 60.0
168
+ default_config.rpcs.list_enrollments.retry_policy = {
169
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
170
+ }
171
+
172
+ default_config.rpcs.create_enrollment.timeout = 60.0
173
+
174
+ default_config.rpcs.update_enrollment.timeout = 60.0
175
+
176
+ default_config.rpcs.delete_enrollment.timeout = 60.0
177
+
178
+ default_config.rpcs.get_pipeline.timeout = 60.0
179
+ default_config.rpcs.get_pipeline.retry_policy = {
180
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
181
+ }
182
+
183
+ default_config.rpcs.list_pipelines.timeout = 60.0
184
+ default_config.rpcs.list_pipelines.retry_policy = {
185
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
186
+ }
187
+
188
+ default_config.rpcs.create_pipeline.timeout = 60.0
189
+
190
+ default_config.rpcs.update_pipeline.timeout = 60.0
191
+
192
+ default_config.rpcs.delete_pipeline.timeout = 60.0
193
+
194
+ default_config.rpcs.get_google_api_source.timeout = 60.0
195
+ default_config.rpcs.get_google_api_source.retry_policy = {
196
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
197
+ }
198
+
199
+ default_config.rpcs.list_google_api_sources.timeout = 60.0
200
+ default_config.rpcs.list_google_api_sources.retry_policy = {
201
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
202
+ }
203
+
204
+ default_config.rpcs.create_google_api_source.timeout = 60.0
205
+
206
+ default_config.rpcs.update_google_api_source.timeout = 60.0
207
+
208
+ default_config.rpcs.delete_google_api_source.timeout = 60.0
209
+
78
210
  default_config
79
211
  end
80
212
  yield @configure if block_given?
@@ -409,7 +541,7 @@ module Google
409
541
  # @param trigger_id [::String]
410
542
  # Required. The user-provided ID to be assigned to the trigger.
411
543
  # @param validate_only [::Boolean]
412
- # Required. If set, validate the request and preview the review, but do not
544
+ # Optional. If set, validate the request and preview the review, but do not
413
545
  # post it.
414
546
  # @yield [result, operation] Access the result along with the TransportOperation object
415
547
  # @yieldparam result [::Gapic::Operation]
@@ -506,7 +638,7 @@ module Google
506
638
  # If set to true, and the trigger is not found, a new trigger will be
507
639
  # created. In this situation, `update_mask` is ignored.
508
640
  # @param validate_only [::Boolean]
509
- # Required. If set, validate the request and preview the review, but do not
641
+ # Optional. If set, validate the request and preview the review, but do not
510
642
  # post it.
511
643
  # @yield [result, operation] Access the result along with the TransportOperation object
512
644
  # @yieldparam result [::Gapic::Operation]
@@ -602,7 +734,7 @@ module Google
602
734
  # If set to true, and the trigger is not found, the request will succeed
603
735
  # but no action will be taken on the server.
604
736
  # @param validate_only [::Boolean]
605
- # Required. If set, validate the request and preview the review, but do not
737
+ # Optional. If set, validate the request and preview the review, but do not
606
738
  # post it.
607
739
  # @yield [result, operation] Access the result along with the TransportOperation object
608
740
  # @yieldparam result [::Gapic::Operation]
@@ -873,7 +1005,7 @@ module Google
873
1005
  # @param channel_id [::String]
874
1006
  # Required. The user-provided ID to be assigned to the channel.
875
1007
  # @param validate_only [::Boolean]
876
- # Required. If set, validate the request and preview the review, but do not
1008
+ # Optional. If set, validate the request and preview the review, but do not
877
1009
  # post it.
878
1010
  # @yield [result, operation] Access the result along with the TransportOperation object
879
1011
  # @yieldparam result [::Gapic::Operation]
@@ -967,7 +1099,7 @@ module Google
967
1099
  # If no field mask is provided, all provided fields in the request are
968
1100
  # updated. To update all fields, provide a field mask of "*".
969
1101
  # @param validate_only [::Boolean]
970
- # Required. If set, validate the request and preview the review, but do not
1102
+ # Optional. If set, validate the request and preview the review, but do not
971
1103
  # post it.
972
1104
  # @yield [result, operation] Access the result along with the TransportOperation object
973
1105
  # @yieldparam result [::Gapic::Operation]
@@ -1057,7 +1189,7 @@ module Google
1057
1189
  # @param name [::String]
1058
1190
  # Required. The name of the channel to be deleted.
1059
1191
  # @param validate_only [::Boolean]
1060
- # Required. If set, validate the request and preview the review, but do not
1192
+ # Optional. If set, validate the request and preview the review, but do not
1061
1193
  # post it.
1062
1194
  # @yield [result, operation] Access the result along with the TransportOperation object
1063
1195
  # @yieldparam result [::Gapic::Operation]
@@ -1816,195 +1948,2156 @@ module Google
1816
1948
  end
1817
1949
 
1818
1950
  ##
1819
- # Configuration class for the Eventarc REST API.
1951
+ # Get a single MessageBus.
1820
1952
  #
1821
- # This class represents the configuration for Eventarc REST,
1822
- # providing control over timeouts, retry behavior, logging, transport
1823
- # parameters, and other low-level controls. Certain parameters can also be
1824
- # applied individually to specific RPCs. See
1825
- # {::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client::Configuration::Rpcs}
1826
- # for a list of RPCs that can be configured independently.
1953
+ # @overload get_message_bus(request, options = nil)
1954
+ # Pass arguments to `get_message_bus` via a request object, either of type
1955
+ # {::Google::Cloud::Eventarc::V1::GetMessageBusRequest} or an equivalent Hash.
1827
1956
  #
1828
- # Configuration can be applied globally to all clients, or to a single client
1829
- # on construction.
1957
+ # @param request [::Google::Cloud::Eventarc::V1::GetMessageBusRequest, ::Hash]
1958
+ # A request object representing the call parameters. Required. To specify no
1959
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1960
+ # @param options [::Gapic::CallOptions, ::Hash]
1961
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1830
1962
  #
1831
- # @example
1963
+ # @overload get_message_bus(name: nil)
1964
+ # Pass arguments to `get_message_bus` via keyword arguments. Note that at
1965
+ # least one keyword argument is required. To specify no parameters, or to keep all
1966
+ # the default parameter values, pass an empty Hash as a request object (see above).
1832
1967
  #
1833
- # # Modify the global config, setting the timeout for
1834
- # # get_trigger to 20 seconds,
1835
- # # and all remaining timeouts to 10 seconds.
1836
- # ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.configure do |config|
1837
- # config.timeout = 10.0
1838
- # config.rpcs.get_trigger.timeout = 20.0
1839
- # end
1968
+ # @param name [::String]
1969
+ # Required. The name of the message bus to get.
1970
+ # @yield [result, operation] Access the result along with the TransportOperation object
1971
+ # @yieldparam result [::Google::Cloud::Eventarc::V1::MessageBus]
1972
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1840
1973
  #
1841
- # # Apply the above configuration only to a new client.
1842
- # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config|
1843
- # config.timeout = 10.0
1844
- # config.rpcs.get_trigger.timeout = 20.0
1845
- # end
1974
+ # @return [::Google::Cloud::Eventarc::V1::MessageBus]
1846
1975
  #
1847
- # @!attribute [rw] endpoint
1848
- # A custom service endpoint, as a hostname or hostname:port. The default is
1849
- # nil, indicating to use the default endpoint in the current universe domain.
1850
- # @return [::String,nil]
1851
- # @!attribute [rw] credentials
1852
- # Credentials to send with calls. You may provide any of the following types:
1853
- # * (`String`) The path to a service account key file in JSON format
1854
- # * (`Hash`) A service account key as a Hash
1855
- # * (`Google::Auth::Credentials`) A googleauth credentials object
1856
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1857
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1858
- # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1859
- # * (`nil`) indicating no credentials
1860
- # @return [::Object]
1861
- # @!attribute [rw] scope
1862
- # The OAuth scopes
1863
- # @return [::Array<::String>]
1864
- # @!attribute [rw] lib_name
1865
- # The library name as recorded in instrumentation and logging
1866
- # @return [::String]
1867
- # @!attribute [rw] lib_version
1868
- # The library version as recorded in instrumentation and logging
1869
- # @return [::String]
1870
- # @!attribute [rw] timeout
1871
- # The call timeout in seconds.
1872
- # @return [::Numeric]
1873
- # @!attribute [rw] metadata
1874
- # Additional headers to be sent with the call.
1875
- # @return [::Hash{::Symbol=>::String}]
1876
- # @!attribute [rw] retry_policy
1877
- # The retry policy. The value is a hash with the following keys:
1878
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1879
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1880
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1881
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1882
- # trigger a retry.
1883
- # @return [::Hash]
1884
- # @!attribute [rw] quota_project
1885
- # A separate project against which to charge quota.
1886
- # @return [::String]
1887
- # @!attribute [rw] universe_domain
1888
- # The universe domain within which to make requests. This determines the
1889
- # default endpoint URL. The default value of nil uses the environment
1890
- # universe (usually the default "googleapis.com" universe).
1891
- # @return [::String,nil]
1976
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1892
1977
  #
1893
- class Configuration
1894
- extend ::Gapic::Config
1978
+ # @example Basic example
1979
+ # require "google/cloud/eventarc/v1"
1980
+ #
1981
+ # # Create a client object. The client can be reused for multiple calls.
1982
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
1983
+ #
1984
+ # # Create a request. To set request fields, pass in keyword arguments.
1985
+ # request = Google::Cloud::Eventarc::V1::GetMessageBusRequest.new
1986
+ #
1987
+ # # Call the get_message_bus method.
1988
+ # result = client.get_message_bus request
1989
+ #
1990
+ # # The returned object is of type Google::Cloud::Eventarc::V1::MessageBus.
1991
+ # p result
1992
+ #
1993
+ def get_message_bus request, options = nil
1994
+ raise ::ArgumentError, "request must be provided" if request.nil?
1895
1995
 
1896
- # @private
1897
- # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1898
- DEFAULT_ENDPOINT = "eventarc.googleapis.com"
1996
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetMessageBusRequest
1899
1997
 
1900
- config_attr :endpoint, nil, ::String, nil
1901
- config_attr :credentials, nil do |value|
1902
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1903
- allowed.any? { |klass| klass === value }
1904
- end
1905
- config_attr :scope, nil, ::String, ::Array, nil
1906
- config_attr :lib_name, nil, ::String, nil
1907
- config_attr :lib_version, nil, ::String, nil
1908
- config_attr :timeout, nil, ::Numeric, nil
1909
- config_attr :metadata, nil, ::Hash, nil
1910
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1911
- config_attr :quota_project, nil, ::String, nil
1912
- config_attr :universe_domain, nil, ::String, nil
1998
+ # Converts hash and nil to an options object
1999
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1913
2000
 
1914
- # @private
1915
- # Overrides for http bindings for the RPCs of this service
1916
- # are only used when this service is used as mixin, and only
1917
- # by the host service.
1918
- # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1919
- config_attr :bindings_override, {}, ::Hash, nil
2001
+ # Customize the options with defaults
2002
+ call_metadata = @config.rpcs.get_message_bus.metadata.to_h
1920
2003
 
1921
- # @private
1922
- def initialize parent_config = nil
1923
- @parent_config = parent_config unless parent_config.nil?
2004
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2005
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2006
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2007
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2008
+ transports_version_send: [:rest]
1924
2009
 
1925
- yield self if block_given?
1926
- end
2010
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2011
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1927
2012
 
1928
- ##
1929
- # Configurations for individual RPCs
1930
- # @return [Rpcs]
1931
- #
1932
- def rpcs
1933
- @rpcs ||= begin
1934
- parent_rpcs = nil
1935
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1936
- Rpcs.new parent_rpcs
1937
- end
2013
+ options.apply_defaults timeout: @config.rpcs.get_message_bus.timeout,
2014
+ metadata: call_metadata,
2015
+ retry_policy: @config.rpcs.get_message_bus.retry_policy
2016
+
2017
+ options.apply_defaults timeout: @config.timeout,
2018
+ metadata: @config.metadata,
2019
+ retry_policy: @config.retry_policy
2020
+
2021
+ @eventarc_stub.get_message_bus request, options do |result, operation|
2022
+ yield result, operation if block_given?
2023
+ return result
1938
2024
  end
2025
+ rescue ::Gapic::Rest::Error => e
2026
+ raise ::Google::Cloud::Error.from_error(e)
2027
+ end
1939
2028
 
1940
- ##
1941
- # Configuration RPC class for the Eventarc API.
1942
- #
1943
- # Includes fields providing the configuration for each RPC in this service.
1944
- # Each configuration object is of type `Gapic::Config::Method` and includes
1945
- # the following configuration fields:
1946
- #
1947
- # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1948
- # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1949
- # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1950
- # include the following keys:
1951
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1952
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1953
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1954
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1955
- # trigger a retry.
1956
- #
1957
- class Rpcs
1958
- ##
1959
- # RPC-specific configuration for `get_trigger`
1960
- # @return [::Gapic::Config::Method]
1961
- #
1962
- attr_reader :get_trigger
1963
- ##
1964
- # RPC-specific configuration for `list_triggers`
1965
- # @return [::Gapic::Config::Method]
1966
- #
1967
- attr_reader :list_triggers
1968
- ##
1969
- # RPC-specific configuration for `create_trigger`
1970
- # @return [::Gapic::Config::Method]
1971
- #
1972
- attr_reader :create_trigger
1973
- ##
1974
- # RPC-specific configuration for `update_trigger`
1975
- # @return [::Gapic::Config::Method]
1976
- #
1977
- attr_reader :update_trigger
1978
- ##
1979
- # RPC-specific configuration for `delete_trigger`
1980
- # @return [::Gapic::Config::Method]
1981
- #
1982
- attr_reader :delete_trigger
1983
- ##
1984
- # RPC-specific configuration for `get_channel`
1985
- # @return [::Gapic::Config::Method]
1986
- #
1987
- attr_reader :get_channel
1988
- ##
1989
- # RPC-specific configuration for `list_channels`
1990
- # @return [::Gapic::Config::Method]
1991
- #
1992
- attr_reader :list_channels
1993
- ##
1994
- # RPC-specific configuration for `create_channel`
1995
- # @return [::Gapic::Config::Method]
1996
- #
1997
- attr_reader :create_channel
1998
- ##
1999
- # RPC-specific configuration for `update_channel`
2000
- # @return [::Gapic::Config::Method]
2001
- #
2002
- attr_reader :update_channel
2003
- ##
2004
- # RPC-specific configuration for `delete_channel`
2005
- # @return [::Gapic::Config::Method]
2006
- #
2007
- attr_reader :delete_channel
2029
+ ##
2030
+ # List message buses.
2031
+ #
2032
+ # @overload list_message_buses(request, options = nil)
2033
+ # Pass arguments to `list_message_buses` via a request object, either of type
2034
+ # {::Google::Cloud::Eventarc::V1::ListMessageBusesRequest} or an equivalent Hash.
2035
+ #
2036
+ # @param request [::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, ::Hash]
2037
+ # A request object representing the call parameters. Required. To specify no
2038
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2039
+ # @param options [::Gapic::CallOptions, ::Hash]
2040
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2041
+ #
2042
+ # @overload list_message_buses(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
2043
+ # Pass arguments to `list_message_buses` via keyword arguments. Note that at
2044
+ # least one keyword argument is required. To specify no parameters, or to keep all
2045
+ # the default parameter values, pass an empty Hash as a request object (see above).
2046
+ #
2047
+ # @param parent [::String]
2048
+ # Required. The parent collection to list triggers on.
2049
+ # @param page_size [::Integer]
2050
+ # Optional. The maximum number of results to return on each page.
2051
+ #
2052
+ # Note: The service may send fewer.
2053
+ # @param page_token [::String]
2054
+ # Optional. The page token; provide the value from the `next_page_token`
2055
+ # field in a previous call to retrieve the subsequent page.
2056
+ #
2057
+ # When paginating, all other parameters provided must match
2058
+ # the previous call that provided the page token.
2059
+ # @param order_by [::String]
2060
+ # Optional. The sorting order of the resources returned. Value should be a
2061
+ # comma-separated list of fields. The default sorting order is ascending. To
2062
+ # specify descending order for a field, append a `desc` suffix; for example:
2063
+ # `name desc, update_time`.
2064
+ # @param filter [::String]
2065
+ # Optional. The filter field that the list request will filter on.
2066
+ # Possible filtersare described in https://google.aip.dev/160.
2067
+ # @yield [result, operation] Access the result along with the TransportOperation object
2068
+ # @yieldparam result [::Google::Cloud::Eventarc::V1::ListMessageBusesResponse]
2069
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2070
+ #
2071
+ # @return [::Google::Cloud::Eventarc::V1::ListMessageBusesResponse]
2072
+ #
2073
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2074
+ #
2075
+ # @example Basic example
2076
+ # require "google/cloud/eventarc/v1"
2077
+ #
2078
+ # # Create a client object. The client can be reused for multiple calls.
2079
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
2080
+ #
2081
+ # # Create a request. To set request fields, pass in keyword arguments.
2082
+ # request = Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new
2083
+ #
2084
+ # # Call the list_message_buses method.
2085
+ # result = client.list_message_buses request
2086
+ #
2087
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2088
+ # # over elements, and API calls will be issued to fetch pages as needed.
2089
+ # result.each do |item|
2090
+ # # Each element is of type ::Google::Cloud::Eventarc::V1::MessageBus.
2091
+ # p item
2092
+ # end
2093
+ #
2094
+ def list_message_buses request, options = nil
2095
+ raise ::ArgumentError, "request must be provided" if request.nil?
2096
+
2097
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest
2098
+
2099
+ # Converts hash and nil to an options object
2100
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2101
+
2102
+ # Customize the options with defaults
2103
+ call_metadata = @config.rpcs.list_message_buses.metadata.to_h
2104
+
2105
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2106
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2107
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2108
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2109
+ transports_version_send: [:rest]
2110
+
2111
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2112
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2113
+
2114
+ options.apply_defaults timeout: @config.rpcs.list_message_buses.timeout,
2115
+ metadata: call_metadata,
2116
+ retry_policy: @config.rpcs.list_message_buses.retry_policy
2117
+
2118
+ options.apply_defaults timeout: @config.timeout,
2119
+ metadata: @config.metadata,
2120
+ retry_policy: @config.retry_policy
2121
+
2122
+ @eventarc_stub.list_message_buses request, options do |result, operation|
2123
+ yield result, operation if block_given?
2124
+ return result
2125
+ end
2126
+ rescue ::Gapic::Rest::Error => e
2127
+ raise ::Google::Cloud::Error.from_error(e)
2128
+ end
2129
+
2130
+ ##
2131
+ # List message bus enrollments.
2132
+ #
2133
+ # @overload list_message_bus_enrollments(request, options = nil)
2134
+ # Pass arguments to `list_message_bus_enrollments` via a request object, either of type
2135
+ # {::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest} or an equivalent Hash.
2136
+ #
2137
+ # @param request [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, ::Hash]
2138
+ # A request object representing the call parameters. Required. To specify no
2139
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2140
+ # @param options [::Gapic::CallOptions, ::Hash]
2141
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2142
+ #
2143
+ # @overload list_message_bus_enrollments(parent: nil, page_size: nil, page_token: nil)
2144
+ # Pass arguments to `list_message_bus_enrollments` via keyword arguments. Note that at
2145
+ # least one keyword argument is required. To specify no parameters, or to keep all
2146
+ # the default parameter values, pass an empty Hash as a request object (see above).
2147
+ #
2148
+ # @param parent [::String]
2149
+ # Required. The parent message bus to list enrollments on.
2150
+ # @param page_size [::Integer]
2151
+ # Optional. The maximum number of results to return on each page.
2152
+ #
2153
+ # Note: The service may send fewer.
2154
+ # @param page_token [::String]
2155
+ # Optional. The page token; provide the value from the `next_page_token`
2156
+ # field in a previous call to retrieve the subsequent page.
2157
+ #
2158
+ # When paginating, all other parameters provided must match
2159
+ # the previous call that provided the page token.
2160
+ # @yield [result, operation] Access the result along with the TransportOperation object
2161
+ # @yieldparam result [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse]
2162
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2163
+ #
2164
+ # @return [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse]
2165
+ #
2166
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2167
+ #
2168
+ # @example Basic example
2169
+ # require "google/cloud/eventarc/v1"
2170
+ #
2171
+ # # Create a client object. The client can be reused for multiple calls.
2172
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
2173
+ #
2174
+ # # Create a request. To set request fields, pass in keyword arguments.
2175
+ # request = Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new
2176
+ #
2177
+ # # Call the list_message_bus_enrollments method.
2178
+ # result = client.list_message_bus_enrollments request
2179
+ #
2180
+ # # The returned object is of type Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse.
2181
+ # p result
2182
+ #
2183
+ def list_message_bus_enrollments request, options = nil
2184
+ raise ::ArgumentError, "request must be provided" if request.nil?
2185
+
2186
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest
2187
+
2188
+ # Converts hash and nil to an options object
2189
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2190
+
2191
+ # Customize the options with defaults
2192
+ call_metadata = @config.rpcs.list_message_bus_enrollments.metadata.to_h
2193
+
2194
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2195
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2196
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2197
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2198
+ transports_version_send: [:rest]
2199
+
2200
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2201
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2202
+
2203
+ options.apply_defaults timeout: @config.rpcs.list_message_bus_enrollments.timeout,
2204
+ metadata: call_metadata,
2205
+ retry_policy: @config.rpcs.list_message_bus_enrollments.retry_policy
2206
+
2207
+ options.apply_defaults timeout: @config.timeout,
2208
+ metadata: @config.metadata,
2209
+ retry_policy: @config.retry_policy
2210
+
2211
+ @eventarc_stub.list_message_bus_enrollments request, options do |result, operation|
2212
+ yield result, operation if block_given?
2213
+ return result
2214
+ end
2215
+ rescue ::Gapic::Rest::Error => e
2216
+ raise ::Google::Cloud::Error.from_error(e)
2217
+ end
2218
+
2219
+ ##
2220
+ # Create a new MessageBus in a particular project and location.
2221
+ #
2222
+ # @overload create_message_bus(request, options = nil)
2223
+ # Pass arguments to `create_message_bus` via a request object, either of type
2224
+ # {::Google::Cloud::Eventarc::V1::CreateMessageBusRequest} or an equivalent Hash.
2225
+ #
2226
+ # @param request [::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, ::Hash]
2227
+ # A request object representing the call parameters. Required. To specify no
2228
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2229
+ # @param options [::Gapic::CallOptions, ::Hash]
2230
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2231
+ #
2232
+ # @overload create_message_bus(parent: nil, message_bus: nil, message_bus_id: nil, validate_only: nil)
2233
+ # Pass arguments to `create_message_bus` via keyword arguments. Note that at
2234
+ # least one keyword argument is required. To specify no parameters, or to keep all
2235
+ # the default parameter values, pass an empty Hash as a request object (see above).
2236
+ #
2237
+ # @param parent [::String]
2238
+ # Required. The parent collection in which to add this message bus.
2239
+ # @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash]
2240
+ # Required. The message bus to create.
2241
+ # @param message_bus_id [::String]
2242
+ # Required. The user-provided ID to be assigned to the MessageBus. It should
2243
+ # match the format (^[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?$)
2244
+ # @param validate_only [::Boolean]
2245
+ # Optional. If set, validate the request and preview the review, but do not
2246
+ # post it.
2247
+ # @yield [result, operation] Access the result along with the TransportOperation object
2248
+ # @yieldparam result [::Gapic::Operation]
2249
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2250
+ #
2251
+ # @return [::Gapic::Operation]
2252
+ #
2253
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2254
+ #
2255
+ # @example Basic example
2256
+ # require "google/cloud/eventarc/v1"
2257
+ #
2258
+ # # Create a client object. The client can be reused for multiple calls.
2259
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
2260
+ #
2261
+ # # Create a request. To set request fields, pass in keyword arguments.
2262
+ # request = Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new
2263
+ #
2264
+ # # Call the create_message_bus method.
2265
+ # result = client.create_message_bus request
2266
+ #
2267
+ # # The returned object is of type Gapic::Operation. You can use it to
2268
+ # # check the status of an operation, cancel it, or wait for results.
2269
+ # # Here is how to wait for a response.
2270
+ # result.wait_until_done! timeout: 60
2271
+ # if result.response?
2272
+ # p result.response
2273
+ # else
2274
+ # puts "No response received."
2275
+ # end
2276
+ #
2277
+ def create_message_bus request, options = nil
2278
+ raise ::ArgumentError, "request must be provided" if request.nil?
2279
+
2280
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest
2281
+
2282
+ # Converts hash and nil to an options object
2283
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2284
+
2285
+ # Customize the options with defaults
2286
+ call_metadata = @config.rpcs.create_message_bus.metadata.to_h
2287
+
2288
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2289
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2290
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2291
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2292
+ transports_version_send: [:rest]
2293
+
2294
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2295
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2296
+
2297
+ options.apply_defaults timeout: @config.rpcs.create_message_bus.timeout,
2298
+ metadata: call_metadata,
2299
+ retry_policy: @config.rpcs.create_message_bus.retry_policy
2300
+
2301
+ options.apply_defaults timeout: @config.timeout,
2302
+ metadata: @config.metadata,
2303
+ retry_policy: @config.retry_policy
2304
+
2305
+ @eventarc_stub.create_message_bus request, options do |result, operation|
2306
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2307
+ yield result, operation if block_given?
2308
+ return result
2309
+ end
2310
+ rescue ::Gapic::Rest::Error => e
2311
+ raise ::Google::Cloud::Error.from_error(e)
2312
+ end
2313
+
2314
+ ##
2315
+ # Update a single message bus.
2316
+ #
2317
+ # @overload update_message_bus(request, options = nil)
2318
+ # Pass arguments to `update_message_bus` via a request object, either of type
2319
+ # {::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest} or an equivalent Hash.
2320
+ #
2321
+ # @param request [::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, ::Hash]
2322
+ # A request object representing the call parameters. Required. To specify no
2323
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2324
+ # @param options [::Gapic::CallOptions, ::Hash]
2325
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2326
+ #
2327
+ # @overload update_message_bus(message_bus: nil, update_mask: nil, allow_missing: nil, validate_only: nil)
2328
+ # Pass arguments to `update_message_bus` via keyword arguments. Note that at
2329
+ # least one keyword argument is required. To specify no parameters, or to keep all
2330
+ # the default parameter values, pass an empty Hash as a request object (see above).
2331
+ #
2332
+ # @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash]
2333
+ # Required. The MessageBus to be updated.
2334
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2335
+ # Optional. The fields to be updated; only fields explicitly provided are
2336
+ # updated. If no field mask is provided, all provided fields in the request
2337
+ # are updated. To update all fields, provide a field mask of "*".
2338
+ # @param allow_missing [::Boolean]
2339
+ # Optional. If set to true, and the MessageBus is not found, a new MessageBus
2340
+ # will be created. In this situation, `update_mask` is ignored.
2341
+ # @param validate_only [::Boolean]
2342
+ # Optional. If set, validate the request and preview the review, but do not
2343
+ # post it.
2344
+ # @yield [result, operation] Access the result along with the TransportOperation object
2345
+ # @yieldparam result [::Gapic::Operation]
2346
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2347
+ #
2348
+ # @return [::Gapic::Operation]
2349
+ #
2350
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2351
+ #
2352
+ # @example Basic example
2353
+ # require "google/cloud/eventarc/v1"
2354
+ #
2355
+ # # Create a client object. The client can be reused for multiple calls.
2356
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
2357
+ #
2358
+ # # Create a request. To set request fields, pass in keyword arguments.
2359
+ # request = Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new
2360
+ #
2361
+ # # Call the update_message_bus method.
2362
+ # result = client.update_message_bus request
2363
+ #
2364
+ # # The returned object is of type Gapic::Operation. You can use it to
2365
+ # # check the status of an operation, cancel it, or wait for results.
2366
+ # # Here is how to wait for a response.
2367
+ # result.wait_until_done! timeout: 60
2368
+ # if result.response?
2369
+ # p result.response
2370
+ # else
2371
+ # puts "No response received."
2372
+ # end
2373
+ #
2374
+ def update_message_bus request, options = nil
2375
+ raise ::ArgumentError, "request must be provided" if request.nil?
2376
+
2377
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest
2378
+
2379
+ # Converts hash and nil to an options object
2380
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2381
+
2382
+ # Customize the options with defaults
2383
+ call_metadata = @config.rpcs.update_message_bus.metadata.to_h
2384
+
2385
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2386
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2387
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2388
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2389
+ transports_version_send: [:rest]
2390
+
2391
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2392
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2393
+
2394
+ options.apply_defaults timeout: @config.rpcs.update_message_bus.timeout,
2395
+ metadata: call_metadata,
2396
+ retry_policy: @config.rpcs.update_message_bus.retry_policy
2397
+
2398
+ options.apply_defaults timeout: @config.timeout,
2399
+ metadata: @config.metadata,
2400
+ retry_policy: @config.retry_policy
2401
+
2402
+ @eventarc_stub.update_message_bus request, options do |result, operation|
2403
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2404
+ yield result, operation if block_given?
2405
+ return result
2406
+ end
2407
+ rescue ::Gapic::Rest::Error => e
2408
+ raise ::Google::Cloud::Error.from_error(e)
2409
+ end
2410
+
2411
+ ##
2412
+ # Delete a single message bus.
2413
+ #
2414
+ # @overload delete_message_bus(request, options = nil)
2415
+ # Pass arguments to `delete_message_bus` via a request object, either of type
2416
+ # {::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest} or an equivalent Hash.
2417
+ #
2418
+ # @param request [::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, ::Hash]
2419
+ # A request object representing the call parameters. Required. To specify no
2420
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2421
+ # @param options [::Gapic::CallOptions, ::Hash]
2422
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2423
+ #
2424
+ # @overload delete_message_bus(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
2425
+ # Pass arguments to `delete_message_bus` via keyword arguments. Note that at
2426
+ # least one keyword argument is required. To specify no parameters, or to keep all
2427
+ # the default parameter values, pass an empty Hash as a request object (see above).
2428
+ #
2429
+ # @param name [::String]
2430
+ # Required. The name of the MessageBus to be deleted.
2431
+ # @param etag [::String]
2432
+ # Optional. If provided, the MessageBus will only be deleted if the etag
2433
+ # matches the current etag on the resource.
2434
+ # @param allow_missing [::Boolean]
2435
+ # Optional. If set to true, and the MessageBus is not found, the request will
2436
+ # succeed but no action will be taken on the server.
2437
+ # @param validate_only [::Boolean]
2438
+ # Optional. If set, validate the request and preview the review, but do not
2439
+ # post it.
2440
+ # @yield [result, operation] Access the result along with the TransportOperation object
2441
+ # @yieldparam result [::Gapic::Operation]
2442
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2443
+ #
2444
+ # @return [::Gapic::Operation]
2445
+ #
2446
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2447
+ #
2448
+ # @example Basic example
2449
+ # require "google/cloud/eventarc/v1"
2450
+ #
2451
+ # # Create a client object. The client can be reused for multiple calls.
2452
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
2453
+ #
2454
+ # # Create a request. To set request fields, pass in keyword arguments.
2455
+ # request = Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new
2456
+ #
2457
+ # # Call the delete_message_bus method.
2458
+ # result = client.delete_message_bus request
2459
+ #
2460
+ # # The returned object is of type Gapic::Operation. You can use it to
2461
+ # # check the status of an operation, cancel it, or wait for results.
2462
+ # # Here is how to wait for a response.
2463
+ # result.wait_until_done! timeout: 60
2464
+ # if result.response?
2465
+ # p result.response
2466
+ # else
2467
+ # puts "No response received."
2468
+ # end
2469
+ #
2470
+ def delete_message_bus request, options = nil
2471
+ raise ::ArgumentError, "request must be provided" if request.nil?
2472
+
2473
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest
2474
+
2475
+ # Converts hash and nil to an options object
2476
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2477
+
2478
+ # Customize the options with defaults
2479
+ call_metadata = @config.rpcs.delete_message_bus.metadata.to_h
2480
+
2481
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2482
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2483
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2484
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2485
+ transports_version_send: [:rest]
2486
+
2487
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2488
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2489
+
2490
+ options.apply_defaults timeout: @config.rpcs.delete_message_bus.timeout,
2491
+ metadata: call_metadata,
2492
+ retry_policy: @config.rpcs.delete_message_bus.retry_policy
2493
+
2494
+ options.apply_defaults timeout: @config.timeout,
2495
+ metadata: @config.metadata,
2496
+ retry_policy: @config.retry_policy
2497
+
2498
+ @eventarc_stub.delete_message_bus request, options do |result, operation|
2499
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2500
+ yield result, operation if block_given?
2501
+ return result
2502
+ end
2503
+ rescue ::Gapic::Rest::Error => e
2504
+ raise ::Google::Cloud::Error.from_error(e)
2505
+ end
2506
+
2507
+ ##
2508
+ # Get a single Enrollment.
2509
+ #
2510
+ # @overload get_enrollment(request, options = nil)
2511
+ # Pass arguments to `get_enrollment` via a request object, either of type
2512
+ # {::Google::Cloud::Eventarc::V1::GetEnrollmentRequest} or an equivalent Hash.
2513
+ #
2514
+ # @param request [::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, ::Hash]
2515
+ # A request object representing the call parameters. Required. To specify no
2516
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2517
+ # @param options [::Gapic::CallOptions, ::Hash]
2518
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2519
+ #
2520
+ # @overload get_enrollment(name: nil)
2521
+ # Pass arguments to `get_enrollment` via keyword arguments. Note that at
2522
+ # least one keyword argument is required. To specify no parameters, or to keep all
2523
+ # the default parameter values, pass an empty Hash as a request object (see above).
2524
+ #
2525
+ # @param name [::String]
2526
+ # Required. The name of the Enrollment to get.
2527
+ # @yield [result, operation] Access the result along with the TransportOperation object
2528
+ # @yieldparam result [::Google::Cloud::Eventarc::V1::Enrollment]
2529
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2530
+ #
2531
+ # @return [::Google::Cloud::Eventarc::V1::Enrollment]
2532
+ #
2533
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2534
+ #
2535
+ # @example Basic example
2536
+ # require "google/cloud/eventarc/v1"
2537
+ #
2538
+ # # Create a client object. The client can be reused for multiple calls.
2539
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
2540
+ #
2541
+ # # Create a request. To set request fields, pass in keyword arguments.
2542
+ # request = Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new
2543
+ #
2544
+ # # Call the get_enrollment method.
2545
+ # result = client.get_enrollment request
2546
+ #
2547
+ # # The returned object is of type Google::Cloud::Eventarc::V1::Enrollment.
2548
+ # p result
2549
+ #
2550
+ def get_enrollment request, options = nil
2551
+ raise ::ArgumentError, "request must be provided" if request.nil?
2552
+
2553
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest
2554
+
2555
+ # Converts hash and nil to an options object
2556
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2557
+
2558
+ # Customize the options with defaults
2559
+ call_metadata = @config.rpcs.get_enrollment.metadata.to_h
2560
+
2561
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2562
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2563
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2564
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2565
+ transports_version_send: [:rest]
2566
+
2567
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2568
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2569
+
2570
+ options.apply_defaults timeout: @config.rpcs.get_enrollment.timeout,
2571
+ metadata: call_metadata,
2572
+ retry_policy: @config.rpcs.get_enrollment.retry_policy
2573
+
2574
+ options.apply_defaults timeout: @config.timeout,
2575
+ metadata: @config.metadata,
2576
+ retry_policy: @config.retry_policy
2577
+
2578
+ @eventarc_stub.get_enrollment request, options do |result, operation|
2579
+ yield result, operation if block_given?
2580
+ return result
2581
+ end
2582
+ rescue ::Gapic::Rest::Error => e
2583
+ raise ::Google::Cloud::Error.from_error(e)
2584
+ end
2585
+
2586
+ ##
2587
+ # List Enrollments.
2588
+ #
2589
+ # @overload list_enrollments(request, options = nil)
2590
+ # Pass arguments to `list_enrollments` via a request object, either of type
2591
+ # {::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest} or an equivalent Hash.
2592
+ #
2593
+ # @param request [::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, ::Hash]
2594
+ # A request object representing the call parameters. Required. To specify no
2595
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2596
+ # @param options [::Gapic::CallOptions, ::Hash]
2597
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2598
+ #
2599
+ # @overload list_enrollments(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
2600
+ # Pass arguments to `list_enrollments` via keyword arguments. Note that at
2601
+ # least one keyword argument is required. To specify no parameters, or to keep all
2602
+ # the default parameter values, pass an empty Hash as a request object (see above).
2603
+ #
2604
+ # @param parent [::String]
2605
+ # Required. The parent collection to list triggers on.
2606
+ # @param page_size [::Integer]
2607
+ # Optional. The maximum number of results to return on each page.
2608
+ #
2609
+ # Note: The service may send fewer.
2610
+ # @param page_token [::String]
2611
+ # Optional. The page token; provide the value from the `next_page_token`
2612
+ # field in a previous call to retrieve the subsequent page.
2613
+ #
2614
+ # When paginating, all other parameters provided must match
2615
+ # the previous call that provided the page token.
2616
+ # @param order_by [::String]
2617
+ # Optional. The sorting order of the resources returned. Value should be a
2618
+ # comma-separated list of fields. The default sorting order is ascending. To
2619
+ # specify descending order for a field, append a `desc` suffix; for example:
2620
+ # `name desc, update_time`.
2621
+ # @param filter [::String]
2622
+ # Optional. The filter field that the list request will filter on.
2623
+ # Possible filtersare described in https://google.aip.dev/160.
2624
+ # @yield [result, operation] Access the result along with the TransportOperation object
2625
+ # @yieldparam result [::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse]
2626
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2627
+ #
2628
+ # @return [::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse]
2629
+ #
2630
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2631
+ #
2632
+ # @example Basic example
2633
+ # require "google/cloud/eventarc/v1"
2634
+ #
2635
+ # # Create a client object. The client can be reused for multiple calls.
2636
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
2637
+ #
2638
+ # # Create a request. To set request fields, pass in keyword arguments.
2639
+ # request = Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new
2640
+ #
2641
+ # # Call the list_enrollments method.
2642
+ # result = client.list_enrollments request
2643
+ #
2644
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2645
+ # # over elements, and API calls will be issued to fetch pages as needed.
2646
+ # result.each do |item|
2647
+ # # Each element is of type ::Google::Cloud::Eventarc::V1::Enrollment.
2648
+ # p item
2649
+ # end
2650
+ #
2651
+ def list_enrollments request, options = nil
2652
+ raise ::ArgumentError, "request must be provided" if request.nil?
2653
+
2654
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest
2655
+
2656
+ # Converts hash and nil to an options object
2657
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2658
+
2659
+ # Customize the options with defaults
2660
+ call_metadata = @config.rpcs.list_enrollments.metadata.to_h
2661
+
2662
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2663
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2664
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2665
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2666
+ transports_version_send: [:rest]
2667
+
2668
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2669
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2670
+
2671
+ options.apply_defaults timeout: @config.rpcs.list_enrollments.timeout,
2672
+ metadata: call_metadata,
2673
+ retry_policy: @config.rpcs.list_enrollments.retry_policy
2674
+
2675
+ options.apply_defaults timeout: @config.timeout,
2676
+ metadata: @config.metadata,
2677
+ retry_policy: @config.retry_policy
2678
+
2679
+ @eventarc_stub.list_enrollments request, options do |result, operation|
2680
+ yield result, operation if block_given?
2681
+ return result
2682
+ end
2683
+ rescue ::Gapic::Rest::Error => e
2684
+ raise ::Google::Cloud::Error.from_error(e)
2685
+ end
2686
+
2687
+ ##
2688
+ # Create a new Enrollment in a particular project and location.
2689
+ #
2690
+ # @overload create_enrollment(request, options = nil)
2691
+ # Pass arguments to `create_enrollment` via a request object, either of type
2692
+ # {::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest} or an equivalent Hash.
2693
+ #
2694
+ # @param request [::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, ::Hash]
2695
+ # A request object representing the call parameters. Required. To specify no
2696
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2697
+ # @param options [::Gapic::CallOptions, ::Hash]
2698
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2699
+ #
2700
+ # @overload create_enrollment(parent: nil, enrollment: nil, enrollment_id: nil, validate_only: nil)
2701
+ # Pass arguments to `create_enrollment` via keyword arguments. Note that at
2702
+ # least one keyword argument is required. To specify no parameters, or to keep all
2703
+ # the default parameter values, pass an empty Hash as a request object (see above).
2704
+ #
2705
+ # @param parent [::String]
2706
+ # Required. The parent collection in which to add this enrollment.
2707
+ # @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash]
2708
+ # Required. The enrollment to create.
2709
+ # @param enrollment_id [::String]
2710
+ # Required. The user-provided ID to be assigned to the Enrollment. It should
2711
+ # match the format (^[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?$).
2712
+ # @param validate_only [::Boolean]
2713
+ # Optional. If set, validate the request and preview the review, but do not
2714
+ # post it.
2715
+ # @yield [result, operation] Access the result along with the TransportOperation object
2716
+ # @yieldparam result [::Gapic::Operation]
2717
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2718
+ #
2719
+ # @return [::Gapic::Operation]
2720
+ #
2721
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2722
+ #
2723
+ # @example Basic example
2724
+ # require "google/cloud/eventarc/v1"
2725
+ #
2726
+ # # Create a client object. The client can be reused for multiple calls.
2727
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
2728
+ #
2729
+ # # Create a request. To set request fields, pass in keyword arguments.
2730
+ # request = Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new
2731
+ #
2732
+ # # Call the create_enrollment method.
2733
+ # result = client.create_enrollment request
2734
+ #
2735
+ # # The returned object is of type Gapic::Operation. You can use it to
2736
+ # # check the status of an operation, cancel it, or wait for results.
2737
+ # # Here is how to wait for a response.
2738
+ # result.wait_until_done! timeout: 60
2739
+ # if result.response?
2740
+ # p result.response
2741
+ # else
2742
+ # puts "No response received."
2743
+ # end
2744
+ #
2745
+ def create_enrollment request, options = nil
2746
+ raise ::ArgumentError, "request must be provided" if request.nil?
2747
+
2748
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest
2749
+
2750
+ # Converts hash and nil to an options object
2751
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2752
+
2753
+ # Customize the options with defaults
2754
+ call_metadata = @config.rpcs.create_enrollment.metadata.to_h
2755
+
2756
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2757
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2758
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2759
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2760
+ transports_version_send: [:rest]
2761
+
2762
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2763
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2764
+
2765
+ options.apply_defaults timeout: @config.rpcs.create_enrollment.timeout,
2766
+ metadata: call_metadata,
2767
+ retry_policy: @config.rpcs.create_enrollment.retry_policy
2768
+
2769
+ options.apply_defaults timeout: @config.timeout,
2770
+ metadata: @config.metadata,
2771
+ retry_policy: @config.retry_policy
2772
+
2773
+ @eventarc_stub.create_enrollment request, options do |result, operation|
2774
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2775
+ yield result, operation if block_given?
2776
+ return result
2777
+ end
2778
+ rescue ::Gapic::Rest::Error => e
2779
+ raise ::Google::Cloud::Error.from_error(e)
2780
+ end
2781
+
2782
+ ##
2783
+ # Update a single Enrollment.
2784
+ #
2785
+ # @overload update_enrollment(request, options = nil)
2786
+ # Pass arguments to `update_enrollment` via a request object, either of type
2787
+ # {::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest} or an equivalent Hash.
2788
+ #
2789
+ # @param request [::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, ::Hash]
2790
+ # A request object representing the call parameters. Required. To specify no
2791
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2792
+ # @param options [::Gapic::CallOptions, ::Hash]
2793
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2794
+ #
2795
+ # @overload update_enrollment(enrollment: nil, update_mask: nil, allow_missing: nil, validate_only: nil)
2796
+ # Pass arguments to `update_enrollment` via keyword arguments. Note that at
2797
+ # least one keyword argument is required. To specify no parameters, or to keep all
2798
+ # the default parameter values, pass an empty Hash as a request object (see above).
2799
+ #
2800
+ # @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash]
2801
+ # Required. The Enrollment to be updated.
2802
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2803
+ # Optional. The fields to be updated; only fields explicitly provided are
2804
+ # updated. If no field mask is provided, all provided fields in the request
2805
+ # are updated. To update all fields, provide a field mask of "*".
2806
+ # @param allow_missing [::Boolean]
2807
+ # Optional. If set to true, and the Enrollment is not found, a new Enrollment
2808
+ # will be created. In this situation, `update_mask` is ignored.
2809
+ # @param validate_only [::Boolean]
2810
+ # Optional. If set, validate the request and preview the review, but do not
2811
+ # post it.
2812
+ # @yield [result, operation] Access the result along with the TransportOperation object
2813
+ # @yieldparam result [::Gapic::Operation]
2814
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2815
+ #
2816
+ # @return [::Gapic::Operation]
2817
+ #
2818
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2819
+ #
2820
+ # @example Basic example
2821
+ # require "google/cloud/eventarc/v1"
2822
+ #
2823
+ # # Create a client object. The client can be reused for multiple calls.
2824
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
2825
+ #
2826
+ # # Create a request. To set request fields, pass in keyword arguments.
2827
+ # request = Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new
2828
+ #
2829
+ # # Call the update_enrollment method.
2830
+ # result = client.update_enrollment request
2831
+ #
2832
+ # # The returned object is of type Gapic::Operation. You can use it to
2833
+ # # check the status of an operation, cancel it, or wait for results.
2834
+ # # Here is how to wait for a response.
2835
+ # result.wait_until_done! timeout: 60
2836
+ # if result.response?
2837
+ # p result.response
2838
+ # else
2839
+ # puts "No response received."
2840
+ # end
2841
+ #
2842
+ def update_enrollment request, options = nil
2843
+ raise ::ArgumentError, "request must be provided" if request.nil?
2844
+
2845
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest
2846
+
2847
+ # Converts hash and nil to an options object
2848
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2849
+
2850
+ # Customize the options with defaults
2851
+ call_metadata = @config.rpcs.update_enrollment.metadata.to_h
2852
+
2853
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2854
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2855
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2856
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2857
+ transports_version_send: [:rest]
2858
+
2859
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2860
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2861
+
2862
+ options.apply_defaults timeout: @config.rpcs.update_enrollment.timeout,
2863
+ metadata: call_metadata,
2864
+ retry_policy: @config.rpcs.update_enrollment.retry_policy
2865
+
2866
+ options.apply_defaults timeout: @config.timeout,
2867
+ metadata: @config.metadata,
2868
+ retry_policy: @config.retry_policy
2869
+
2870
+ @eventarc_stub.update_enrollment request, options do |result, operation|
2871
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2872
+ yield result, operation if block_given?
2873
+ return result
2874
+ end
2875
+ rescue ::Gapic::Rest::Error => e
2876
+ raise ::Google::Cloud::Error.from_error(e)
2877
+ end
2878
+
2879
+ ##
2880
+ # Delete a single Enrollment.
2881
+ #
2882
+ # @overload delete_enrollment(request, options = nil)
2883
+ # Pass arguments to `delete_enrollment` via a request object, either of type
2884
+ # {::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest} or an equivalent Hash.
2885
+ #
2886
+ # @param request [::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, ::Hash]
2887
+ # A request object representing the call parameters. Required. To specify no
2888
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2889
+ # @param options [::Gapic::CallOptions, ::Hash]
2890
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2891
+ #
2892
+ # @overload delete_enrollment(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
2893
+ # Pass arguments to `delete_enrollment` via keyword arguments. Note that at
2894
+ # least one keyword argument is required. To specify no parameters, or to keep all
2895
+ # the default parameter values, pass an empty Hash as a request object (see above).
2896
+ #
2897
+ # @param name [::String]
2898
+ # Required. The name of the Enrollment to be deleted.
2899
+ # @param etag [::String]
2900
+ # Optional. If provided, the Enrollment will only be deleted if the etag
2901
+ # matches the current etag on the resource.
2902
+ # @param allow_missing [::Boolean]
2903
+ # Optional. If set to true, and the Enrollment is not found, the request will
2904
+ # succeed but no action will be taken on the server.
2905
+ # @param validate_only [::Boolean]
2906
+ # Optional. If set, validate the request and preview the review, but do not
2907
+ # post it.
2908
+ # @yield [result, operation] Access the result along with the TransportOperation object
2909
+ # @yieldparam result [::Gapic::Operation]
2910
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2911
+ #
2912
+ # @return [::Gapic::Operation]
2913
+ #
2914
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2915
+ #
2916
+ # @example Basic example
2917
+ # require "google/cloud/eventarc/v1"
2918
+ #
2919
+ # # Create a client object. The client can be reused for multiple calls.
2920
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
2921
+ #
2922
+ # # Create a request. To set request fields, pass in keyword arguments.
2923
+ # request = Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new
2924
+ #
2925
+ # # Call the delete_enrollment method.
2926
+ # result = client.delete_enrollment request
2927
+ #
2928
+ # # The returned object is of type Gapic::Operation. You can use it to
2929
+ # # check the status of an operation, cancel it, or wait for results.
2930
+ # # Here is how to wait for a response.
2931
+ # result.wait_until_done! timeout: 60
2932
+ # if result.response?
2933
+ # p result.response
2934
+ # else
2935
+ # puts "No response received."
2936
+ # end
2937
+ #
2938
+ def delete_enrollment request, options = nil
2939
+ raise ::ArgumentError, "request must be provided" if request.nil?
2940
+
2941
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest
2942
+
2943
+ # Converts hash and nil to an options object
2944
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2945
+
2946
+ # Customize the options with defaults
2947
+ call_metadata = @config.rpcs.delete_enrollment.metadata.to_h
2948
+
2949
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2950
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2951
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2952
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
2953
+ transports_version_send: [:rest]
2954
+
2955
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2956
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2957
+
2958
+ options.apply_defaults timeout: @config.rpcs.delete_enrollment.timeout,
2959
+ metadata: call_metadata,
2960
+ retry_policy: @config.rpcs.delete_enrollment.retry_policy
2961
+
2962
+ options.apply_defaults timeout: @config.timeout,
2963
+ metadata: @config.metadata,
2964
+ retry_policy: @config.retry_policy
2965
+
2966
+ @eventarc_stub.delete_enrollment request, options do |result, operation|
2967
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2968
+ yield result, operation if block_given?
2969
+ return result
2970
+ end
2971
+ rescue ::Gapic::Rest::Error => e
2972
+ raise ::Google::Cloud::Error.from_error(e)
2973
+ end
2974
+
2975
+ ##
2976
+ # Get a single Pipeline.
2977
+ #
2978
+ # @overload get_pipeline(request, options = nil)
2979
+ # Pass arguments to `get_pipeline` via a request object, either of type
2980
+ # {::Google::Cloud::Eventarc::V1::GetPipelineRequest} or an equivalent Hash.
2981
+ #
2982
+ # @param request [::Google::Cloud::Eventarc::V1::GetPipelineRequest, ::Hash]
2983
+ # A request object representing the call parameters. Required. To specify no
2984
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2985
+ # @param options [::Gapic::CallOptions, ::Hash]
2986
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2987
+ #
2988
+ # @overload get_pipeline(name: nil)
2989
+ # Pass arguments to `get_pipeline` via keyword arguments. Note that at
2990
+ # least one keyword argument is required. To specify no parameters, or to keep all
2991
+ # the default parameter values, pass an empty Hash as a request object (see above).
2992
+ #
2993
+ # @param name [::String]
2994
+ # Required. The name of the pipeline to get.
2995
+ # @yield [result, operation] Access the result along with the TransportOperation object
2996
+ # @yieldparam result [::Google::Cloud::Eventarc::V1::Pipeline]
2997
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2998
+ #
2999
+ # @return [::Google::Cloud::Eventarc::V1::Pipeline]
3000
+ #
3001
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3002
+ #
3003
+ # @example Basic example
3004
+ # require "google/cloud/eventarc/v1"
3005
+ #
3006
+ # # Create a client object. The client can be reused for multiple calls.
3007
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
3008
+ #
3009
+ # # Create a request. To set request fields, pass in keyword arguments.
3010
+ # request = Google::Cloud::Eventarc::V1::GetPipelineRequest.new
3011
+ #
3012
+ # # Call the get_pipeline method.
3013
+ # result = client.get_pipeline request
3014
+ #
3015
+ # # The returned object is of type Google::Cloud::Eventarc::V1::Pipeline.
3016
+ # p result
3017
+ #
3018
+ def get_pipeline request, options = nil
3019
+ raise ::ArgumentError, "request must be provided" if request.nil?
3020
+
3021
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetPipelineRequest
3022
+
3023
+ # Converts hash and nil to an options object
3024
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3025
+
3026
+ # Customize the options with defaults
3027
+ call_metadata = @config.rpcs.get_pipeline.metadata.to_h
3028
+
3029
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3030
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3031
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3032
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
3033
+ transports_version_send: [:rest]
3034
+
3035
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3036
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3037
+
3038
+ options.apply_defaults timeout: @config.rpcs.get_pipeline.timeout,
3039
+ metadata: call_metadata,
3040
+ retry_policy: @config.rpcs.get_pipeline.retry_policy
3041
+
3042
+ options.apply_defaults timeout: @config.timeout,
3043
+ metadata: @config.metadata,
3044
+ retry_policy: @config.retry_policy
3045
+
3046
+ @eventarc_stub.get_pipeline request, options do |result, operation|
3047
+ yield result, operation if block_given?
3048
+ return result
3049
+ end
3050
+ rescue ::Gapic::Rest::Error => e
3051
+ raise ::Google::Cloud::Error.from_error(e)
3052
+ end
3053
+
3054
+ ##
3055
+ # List pipelines.
3056
+ #
3057
+ # @overload list_pipelines(request, options = nil)
3058
+ # Pass arguments to `list_pipelines` via a request object, either of type
3059
+ # {::Google::Cloud::Eventarc::V1::ListPipelinesRequest} or an equivalent Hash.
3060
+ #
3061
+ # @param request [::Google::Cloud::Eventarc::V1::ListPipelinesRequest, ::Hash]
3062
+ # A request object representing the call parameters. Required. To specify no
3063
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3064
+ # @param options [::Gapic::CallOptions, ::Hash]
3065
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3066
+ #
3067
+ # @overload list_pipelines(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
3068
+ # Pass arguments to `list_pipelines` via keyword arguments. Note that at
3069
+ # least one keyword argument is required. To specify no parameters, or to keep all
3070
+ # the default parameter values, pass an empty Hash as a request object (see above).
3071
+ #
3072
+ # @param parent [::String]
3073
+ # Required. The parent collection to list pipelines on.
3074
+ # @param page_size [::Integer]
3075
+ # Optional. The maximum number of results to return on each page.
3076
+ #
3077
+ # Note: The service may send fewer.
3078
+ # @param page_token [::String]
3079
+ # Optional. The page token; provide the value from the `next_page_token`
3080
+ # field in a previous call to retrieve the subsequent page.
3081
+ #
3082
+ # When paginating, all other parameters provided must match
3083
+ # the previous call that provided the page token.
3084
+ # @param order_by [::String]
3085
+ # Optional. The sorting order of the resources returned. Value should be a
3086
+ # comma-separated list of fields. The default sorting order is ascending. To
3087
+ # specify descending order for a field, append a `desc` suffix; for example:
3088
+ # `name desc, update_time`.
3089
+ # @param filter [::String]
3090
+ # Optional. The filter field that the list request will filter on.
3091
+ # Possible filters are described in https://google.aip.dev/160.
3092
+ # @yield [result, operation] Access the result along with the TransportOperation object
3093
+ # @yieldparam result [::Google::Cloud::Eventarc::V1::ListPipelinesResponse]
3094
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3095
+ #
3096
+ # @return [::Google::Cloud::Eventarc::V1::ListPipelinesResponse]
3097
+ #
3098
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3099
+ #
3100
+ # @example Basic example
3101
+ # require "google/cloud/eventarc/v1"
3102
+ #
3103
+ # # Create a client object. The client can be reused for multiple calls.
3104
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
3105
+ #
3106
+ # # Create a request. To set request fields, pass in keyword arguments.
3107
+ # request = Google::Cloud::Eventarc::V1::ListPipelinesRequest.new
3108
+ #
3109
+ # # Call the list_pipelines method.
3110
+ # result = client.list_pipelines request
3111
+ #
3112
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3113
+ # # over elements, and API calls will be issued to fetch pages as needed.
3114
+ # result.each do |item|
3115
+ # # Each element is of type ::Google::Cloud::Eventarc::V1::Pipeline.
3116
+ # p item
3117
+ # end
3118
+ #
3119
+ def list_pipelines request, options = nil
3120
+ raise ::ArgumentError, "request must be provided" if request.nil?
3121
+
3122
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListPipelinesRequest
3123
+
3124
+ # Converts hash and nil to an options object
3125
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3126
+
3127
+ # Customize the options with defaults
3128
+ call_metadata = @config.rpcs.list_pipelines.metadata.to_h
3129
+
3130
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3131
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3132
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3133
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
3134
+ transports_version_send: [:rest]
3135
+
3136
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3137
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3138
+
3139
+ options.apply_defaults timeout: @config.rpcs.list_pipelines.timeout,
3140
+ metadata: call_metadata,
3141
+ retry_policy: @config.rpcs.list_pipelines.retry_policy
3142
+
3143
+ options.apply_defaults timeout: @config.timeout,
3144
+ metadata: @config.metadata,
3145
+ retry_policy: @config.retry_policy
3146
+
3147
+ @eventarc_stub.list_pipelines request, options do |result, operation|
3148
+ yield result, operation if block_given?
3149
+ return result
3150
+ end
3151
+ rescue ::Gapic::Rest::Error => e
3152
+ raise ::Google::Cloud::Error.from_error(e)
3153
+ end
3154
+
3155
+ ##
3156
+ # Create a new Pipeline in a particular project and location.
3157
+ #
3158
+ # @overload create_pipeline(request, options = nil)
3159
+ # Pass arguments to `create_pipeline` via a request object, either of type
3160
+ # {::Google::Cloud::Eventarc::V1::CreatePipelineRequest} or an equivalent Hash.
3161
+ #
3162
+ # @param request [::Google::Cloud::Eventarc::V1::CreatePipelineRequest, ::Hash]
3163
+ # A request object representing the call parameters. Required. To specify no
3164
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3165
+ # @param options [::Gapic::CallOptions, ::Hash]
3166
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3167
+ #
3168
+ # @overload create_pipeline(parent: nil, pipeline: nil, pipeline_id: nil, validate_only: nil)
3169
+ # Pass arguments to `create_pipeline` via keyword arguments. Note that at
3170
+ # least one keyword argument is required. To specify no parameters, or to keep all
3171
+ # the default parameter values, pass an empty Hash as a request object (see above).
3172
+ #
3173
+ # @param parent [::String]
3174
+ # Required. The parent collection in which to add this pipeline.
3175
+ # @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash]
3176
+ # Required. The pipeline to create.
3177
+ # @param pipeline_id [::String]
3178
+ # Required. The user-provided ID to be assigned to the Pipeline.
3179
+ # @param validate_only [::Boolean]
3180
+ # Optional. If set, validate the request and preview the review, but do not
3181
+ # post it.
3182
+ # @yield [result, operation] Access the result along with the TransportOperation object
3183
+ # @yieldparam result [::Gapic::Operation]
3184
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3185
+ #
3186
+ # @return [::Gapic::Operation]
3187
+ #
3188
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3189
+ #
3190
+ # @example Basic example
3191
+ # require "google/cloud/eventarc/v1"
3192
+ #
3193
+ # # Create a client object. The client can be reused for multiple calls.
3194
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
3195
+ #
3196
+ # # Create a request. To set request fields, pass in keyword arguments.
3197
+ # request = Google::Cloud::Eventarc::V1::CreatePipelineRequest.new
3198
+ #
3199
+ # # Call the create_pipeline method.
3200
+ # result = client.create_pipeline request
3201
+ #
3202
+ # # The returned object is of type Gapic::Operation. You can use it to
3203
+ # # check the status of an operation, cancel it, or wait for results.
3204
+ # # Here is how to wait for a response.
3205
+ # result.wait_until_done! timeout: 60
3206
+ # if result.response?
3207
+ # p result.response
3208
+ # else
3209
+ # puts "No response received."
3210
+ # end
3211
+ #
3212
+ def create_pipeline request, options = nil
3213
+ raise ::ArgumentError, "request must be provided" if request.nil?
3214
+
3215
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreatePipelineRequest
3216
+
3217
+ # Converts hash and nil to an options object
3218
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3219
+
3220
+ # Customize the options with defaults
3221
+ call_metadata = @config.rpcs.create_pipeline.metadata.to_h
3222
+
3223
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3224
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3225
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3226
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
3227
+ transports_version_send: [:rest]
3228
+
3229
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3230
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3231
+
3232
+ options.apply_defaults timeout: @config.rpcs.create_pipeline.timeout,
3233
+ metadata: call_metadata,
3234
+ retry_policy: @config.rpcs.create_pipeline.retry_policy
3235
+
3236
+ options.apply_defaults timeout: @config.timeout,
3237
+ metadata: @config.metadata,
3238
+ retry_policy: @config.retry_policy
3239
+
3240
+ @eventarc_stub.create_pipeline request, options do |result, operation|
3241
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3242
+ yield result, operation if block_given?
3243
+ return result
3244
+ end
3245
+ rescue ::Gapic::Rest::Error => e
3246
+ raise ::Google::Cloud::Error.from_error(e)
3247
+ end
3248
+
3249
+ ##
3250
+ # Update a single pipeline.
3251
+ #
3252
+ # @overload update_pipeline(request, options = nil)
3253
+ # Pass arguments to `update_pipeline` via a request object, either of type
3254
+ # {::Google::Cloud::Eventarc::V1::UpdatePipelineRequest} or an equivalent Hash.
3255
+ #
3256
+ # @param request [::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, ::Hash]
3257
+ # A request object representing the call parameters. Required. To specify no
3258
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3259
+ # @param options [::Gapic::CallOptions, ::Hash]
3260
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3261
+ #
3262
+ # @overload update_pipeline(pipeline: nil, update_mask: nil, allow_missing: nil, validate_only: nil)
3263
+ # Pass arguments to `update_pipeline` via keyword arguments. Note that at
3264
+ # least one keyword argument is required. To specify no parameters, or to keep all
3265
+ # the default parameter values, pass an empty Hash as a request object (see above).
3266
+ #
3267
+ # @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash]
3268
+ # Required. The Pipeline to be updated.
3269
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3270
+ # Optional. The fields to be updated; only fields explicitly provided are
3271
+ # updated. If no field mask is provided, all provided fields in the request
3272
+ # are updated. To update all fields, provide a field mask of "*".
3273
+ # @param allow_missing [::Boolean]
3274
+ # Optional. If set to true, and the Pipeline is not found, a new Pipeline
3275
+ # will be created. In this situation, `update_mask` is ignored.
3276
+ # @param validate_only [::Boolean]
3277
+ # Optional. If set, validate the request and preview the review, but do not
3278
+ # post it.
3279
+ # @yield [result, operation] Access the result along with the TransportOperation object
3280
+ # @yieldparam result [::Gapic::Operation]
3281
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3282
+ #
3283
+ # @return [::Gapic::Operation]
3284
+ #
3285
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3286
+ #
3287
+ # @example Basic example
3288
+ # require "google/cloud/eventarc/v1"
3289
+ #
3290
+ # # Create a client object. The client can be reused for multiple calls.
3291
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
3292
+ #
3293
+ # # Create a request. To set request fields, pass in keyword arguments.
3294
+ # request = Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new
3295
+ #
3296
+ # # Call the update_pipeline method.
3297
+ # result = client.update_pipeline request
3298
+ #
3299
+ # # The returned object is of type Gapic::Operation. You can use it to
3300
+ # # check the status of an operation, cancel it, or wait for results.
3301
+ # # Here is how to wait for a response.
3302
+ # result.wait_until_done! timeout: 60
3303
+ # if result.response?
3304
+ # p result.response
3305
+ # else
3306
+ # puts "No response received."
3307
+ # end
3308
+ #
3309
+ def update_pipeline request, options = nil
3310
+ raise ::ArgumentError, "request must be provided" if request.nil?
3311
+
3312
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest
3313
+
3314
+ # Converts hash and nil to an options object
3315
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3316
+
3317
+ # Customize the options with defaults
3318
+ call_metadata = @config.rpcs.update_pipeline.metadata.to_h
3319
+
3320
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3321
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3322
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3323
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
3324
+ transports_version_send: [:rest]
3325
+
3326
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3327
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3328
+
3329
+ options.apply_defaults timeout: @config.rpcs.update_pipeline.timeout,
3330
+ metadata: call_metadata,
3331
+ retry_policy: @config.rpcs.update_pipeline.retry_policy
3332
+
3333
+ options.apply_defaults timeout: @config.timeout,
3334
+ metadata: @config.metadata,
3335
+ retry_policy: @config.retry_policy
3336
+
3337
+ @eventarc_stub.update_pipeline request, options do |result, operation|
3338
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3339
+ yield result, operation if block_given?
3340
+ return result
3341
+ end
3342
+ rescue ::Gapic::Rest::Error => e
3343
+ raise ::Google::Cloud::Error.from_error(e)
3344
+ end
3345
+
3346
+ ##
3347
+ # Delete a single pipeline.
3348
+ #
3349
+ # @overload delete_pipeline(request, options = nil)
3350
+ # Pass arguments to `delete_pipeline` via a request object, either of type
3351
+ # {::Google::Cloud::Eventarc::V1::DeletePipelineRequest} or an equivalent Hash.
3352
+ #
3353
+ # @param request [::Google::Cloud::Eventarc::V1::DeletePipelineRequest, ::Hash]
3354
+ # A request object representing the call parameters. Required. To specify no
3355
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3356
+ # @param options [::Gapic::CallOptions, ::Hash]
3357
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3358
+ #
3359
+ # @overload delete_pipeline(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
3360
+ # Pass arguments to `delete_pipeline` via keyword arguments. Note that at
3361
+ # least one keyword argument is required. To specify no parameters, or to keep all
3362
+ # the default parameter values, pass an empty Hash as a request object (see above).
3363
+ #
3364
+ # @param name [::String]
3365
+ # Required. The name of the Pipeline to be deleted.
3366
+ # @param etag [::String]
3367
+ # Optional. If provided, the Pipeline will only be deleted if the etag
3368
+ # matches the current etag on the resource.
3369
+ # @param allow_missing [::Boolean]
3370
+ # Optional. If set to true, and the Pipeline is not found, the request will
3371
+ # succeed but no action will be taken on the server.
3372
+ # @param validate_only [::Boolean]
3373
+ # Optional. If set, validate the request and preview the review, but do not
3374
+ # post it.
3375
+ # @yield [result, operation] Access the result along with the TransportOperation object
3376
+ # @yieldparam result [::Gapic::Operation]
3377
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3378
+ #
3379
+ # @return [::Gapic::Operation]
3380
+ #
3381
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3382
+ #
3383
+ # @example Basic example
3384
+ # require "google/cloud/eventarc/v1"
3385
+ #
3386
+ # # Create a client object. The client can be reused for multiple calls.
3387
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
3388
+ #
3389
+ # # Create a request. To set request fields, pass in keyword arguments.
3390
+ # request = Google::Cloud::Eventarc::V1::DeletePipelineRequest.new
3391
+ #
3392
+ # # Call the delete_pipeline method.
3393
+ # result = client.delete_pipeline request
3394
+ #
3395
+ # # The returned object is of type Gapic::Operation. You can use it to
3396
+ # # check the status of an operation, cancel it, or wait for results.
3397
+ # # Here is how to wait for a response.
3398
+ # result.wait_until_done! timeout: 60
3399
+ # if result.response?
3400
+ # p result.response
3401
+ # else
3402
+ # puts "No response received."
3403
+ # end
3404
+ #
3405
+ def delete_pipeline request, options = nil
3406
+ raise ::ArgumentError, "request must be provided" if request.nil?
3407
+
3408
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeletePipelineRequest
3409
+
3410
+ # Converts hash and nil to an options object
3411
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3412
+
3413
+ # Customize the options with defaults
3414
+ call_metadata = @config.rpcs.delete_pipeline.metadata.to_h
3415
+
3416
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3417
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3418
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3419
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
3420
+ transports_version_send: [:rest]
3421
+
3422
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3423
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3424
+
3425
+ options.apply_defaults timeout: @config.rpcs.delete_pipeline.timeout,
3426
+ metadata: call_metadata,
3427
+ retry_policy: @config.rpcs.delete_pipeline.retry_policy
3428
+
3429
+ options.apply_defaults timeout: @config.timeout,
3430
+ metadata: @config.metadata,
3431
+ retry_policy: @config.retry_policy
3432
+
3433
+ @eventarc_stub.delete_pipeline request, options do |result, operation|
3434
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3435
+ yield result, operation if block_given?
3436
+ return result
3437
+ end
3438
+ rescue ::Gapic::Rest::Error => e
3439
+ raise ::Google::Cloud::Error.from_error(e)
3440
+ end
3441
+
3442
+ ##
3443
+ # Get a single GoogleApiSource.
3444
+ #
3445
+ # @overload get_google_api_source(request, options = nil)
3446
+ # Pass arguments to `get_google_api_source` via a request object, either of type
3447
+ # {::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest} or an equivalent Hash.
3448
+ #
3449
+ # @param request [::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, ::Hash]
3450
+ # A request object representing the call parameters. Required. To specify no
3451
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3452
+ # @param options [::Gapic::CallOptions, ::Hash]
3453
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3454
+ #
3455
+ # @overload get_google_api_source(name: nil)
3456
+ # Pass arguments to `get_google_api_source` via keyword arguments. Note that at
3457
+ # least one keyword argument is required. To specify no parameters, or to keep all
3458
+ # the default parameter values, pass an empty Hash as a request object (see above).
3459
+ #
3460
+ # @param name [::String]
3461
+ # Required. The name of the google api source to get.
3462
+ # @yield [result, operation] Access the result along with the TransportOperation object
3463
+ # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleApiSource]
3464
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3465
+ #
3466
+ # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource]
3467
+ #
3468
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3469
+ #
3470
+ # @example Basic example
3471
+ # require "google/cloud/eventarc/v1"
3472
+ #
3473
+ # # Create a client object. The client can be reused for multiple calls.
3474
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
3475
+ #
3476
+ # # Create a request. To set request fields, pass in keyword arguments.
3477
+ # request = Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new
3478
+ #
3479
+ # # Call the get_google_api_source method.
3480
+ # result = client.get_google_api_source request
3481
+ #
3482
+ # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleApiSource.
3483
+ # p result
3484
+ #
3485
+ def get_google_api_source request, options = nil
3486
+ raise ::ArgumentError, "request must be provided" if request.nil?
3487
+
3488
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest
3489
+
3490
+ # Converts hash and nil to an options object
3491
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3492
+
3493
+ # Customize the options with defaults
3494
+ call_metadata = @config.rpcs.get_google_api_source.metadata.to_h
3495
+
3496
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3497
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3498
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3499
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
3500
+ transports_version_send: [:rest]
3501
+
3502
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3503
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3504
+
3505
+ options.apply_defaults timeout: @config.rpcs.get_google_api_source.timeout,
3506
+ metadata: call_metadata,
3507
+ retry_policy: @config.rpcs.get_google_api_source.retry_policy
3508
+
3509
+ options.apply_defaults timeout: @config.timeout,
3510
+ metadata: @config.metadata,
3511
+ retry_policy: @config.retry_policy
3512
+
3513
+ @eventarc_stub.get_google_api_source request, options do |result, operation|
3514
+ yield result, operation if block_given?
3515
+ return result
3516
+ end
3517
+ rescue ::Gapic::Rest::Error => e
3518
+ raise ::Google::Cloud::Error.from_error(e)
3519
+ end
3520
+
3521
+ ##
3522
+ # List GoogleApiSources.
3523
+ #
3524
+ # @overload list_google_api_sources(request, options = nil)
3525
+ # Pass arguments to `list_google_api_sources` via a request object, either of type
3526
+ # {::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest} or an equivalent Hash.
3527
+ #
3528
+ # @param request [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, ::Hash]
3529
+ # A request object representing the call parameters. Required. To specify no
3530
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3531
+ # @param options [::Gapic::CallOptions, ::Hash]
3532
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3533
+ #
3534
+ # @overload list_google_api_sources(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
3535
+ # Pass arguments to `list_google_api_sources` via keyword arguments. Note that at
3536
+ # least one keyword argument is required. To specify no parameters, or to keep all
3537
+ # the default parameter values, pass an empty Hash as a request object (see above).
3538
+ #
3539
+ # @param parent [::String]
3540
+ # Required. The parent collection to list GoogleApiSources on.
3541
+ # @param page_size [::Integer]
3542
+ # Optional. The maximum number of results to return on each page.
3543
+ #
3544
+ # Note: The service may send fewer.
3545
+ # @param page_token [::String]
3546
+ # Optional. The page token; provide the value from the `next_page_token`
3547
+ # field in a previous call to retrieve the subsequent page.
3548
+ #
3549
+ # When paginating, all other parameters provided must match
3550
+ # the previous call that provided the page token.
3551
+ # @param order_by [::String]
3552
+ # Optional. The sorting order of the resources returned. Value should be a
3553
+ # comma-separated list of fields. The default sorting order is ascending. To
3554
+ # specify descending order for a field, append a `desc` suffix; for example:
3555
+ # `name desc, update_time`.
3556
+ # @param filter [::String]
3557
+ # Optional. The filter field that the list request will filter on.
3558
+ # Possible filtersare described in https://google.aip.dev/160.
3559
+ # @yield [result, operation] Access the result along with the TransportOperation object
3560
+ # @yieldparam result [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse]
3561
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3562
+ #
3563
+ # @return [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse]
3564
+ #
3565
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3566
+ #
3567
+ # @example Basic example
3568
+ # require "google/cloud/eventarc/v1"
3569
+ #
3570
+ # # Create a client object. The client can be reused for multiple calls.
3571
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
3572
+ #
3573
+ # # Create a request. To set request fields, pass in keyword arguments.
3574
+ # request = Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new
3575
+ #
3576
+ # # Call the list_google_api_sources method.
3577
+ # result = client.list_google_api_sources request
3578
+ #
3579
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3580
+ # # over elements, and API calls will be issued to fetch pages as needed.
3581
+ # result.each do |item|
3582
+ # # Each element is of type ::Google::Cloud::Eventarc::V1::GoogleApiSource.
3583
+ # p item
3584
+ # end
3585
+ #
3586
+ def list_google_api_sources request, options = nil
3587
+ raise ::ArgumentError, "request must be provided" if request.nil?
3588
+
3589
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest
3590
+
3591
+ # Converts hash and nil to an options object
3592
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3593
+
3594
+ # Customize the options with defaults
3595
+ call_metadata = @config.rpcs.list_google_api_sources.metadata.to_h
3596
+
3597
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3598
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3599
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3600
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
3601
+ transports_version_send: [:rest]
3602
+
3603
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3604
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3605
+
3606
+ options.apply_defaults timeout: @config.rpcs.list_google_api_sources.timeout,
3607
+ metadata: call_metadata,
3608
+ retry_policy: @config.rpcs.list_google_api_sources.retry_policy
3609
+
3610
+ options.apply_defaults timeout: @config.timeout,
3611
+ metadata: @config.metadata,
3612
+ retry_policy: @config.retry_policy
3613
+
3614
+ @eventarc_stub.list_google_api_sources request, options do |result, operation|
3615
+ yield result, operation if block_given?
3616
+ return result
3617
+ end
3618
+ rescue ::Gapic::Rest::Error => e
3619
+ raise ::Google::Cloud::Error.from_error(e)
3620
+ end
3621
+
3622
+ ##
3623
+ # Create a new GoogleApiSource in a particular project and location.
3624
+ #
3625
+ # @overload create_google_api_source(request, options = nil)
3626
+ # Pass arguments to `create_google_api_source` via a request object, either of type
3627
+ # {::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest} or an equivalent Hash.
3628
+ #
3629
+ # @param request [::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, ::Hash]
3630
+ # A request object representing the call parameters. Required. To specify no
3631
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3632
+ # @param options [::Gapic::CallOptions, ::Hash]
3633
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3634
+ #
3635
+ # @overload create_google_api_source(parent: nil, google_api_source: nil, google_api_source_id: nil, validate_only: nil)
3636
+ # Pass arguments to `create_google_api_source` via keyword arguments. Note that at
3637
+ # least one keyword argument is required. To specify no parameters, or to keep all
3638
+ # the default parameter values, pass an empty Hash as a request object (see above).
3639
+ #
3640
+ # @param parent [::String]
3641
+ # Required. The parent collection in which to add this google api source.
3642
+ # @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash]
3643
+ # Required. The google api source to create.
3644
+ # @param google_api_source_id [::String]
3645
+ # Required. The user-provided ID to be assigned to the GoogleApiSource. It
3646
+ # should match the format (^[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?$).
3647
+ # @param validate_only [::Boolean]
3648
+ # Optional. If set, validate the request and preview the review, but do not
3649
+ # post it.
3650
+ # @yield [result, operation] Access the result along with the TransportOperation object
3651
+ # @yieldparam result [::Gapic::Operation]
3652
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3653
+ #
3654
+ # @return [::Gapic::Operation]
3655
+ #
3656
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3657
+ #
3658
+ # @example Basic example
3659
+ # require "google/cloud/eventarc/v1"
3660
+ #
3661
+ # # Create a client object. The client can be reused for multiple calls.
3662
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
3663
+ #
3664
+ # # Create a request. To set request fields, pass in keyword arguments.
3665
+ # request = Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new
3666
+ #
3667
+ # # Call the create_google_api_source method.
3668
+ # result = client.create_google_api_source request
3669
+ #
3670
+ # # The returned object is of type Gapic::Operation. You can use it to
3671
+ # # check the status of an operation, cancel it, or wait for results.
3672
+ # # Here is how to wait for a response.
3673
+ # result.wait_until_done! timeout: 60
3674
+ # if result.response?
3675
+ # p result.response
3676
+ # else
3677
+ # puts "No response received."
3678
+ # end
3679
+ #
3680
+ def create_google_api_source request, options = nil
3681
+ raise ::ArgumentError, "request must be provided" if request.nil?
3682
+
3683
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest
3684
+
3685
+ # Converts hash and nil to an options object
3686
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3687
+
3688
+ # Customize the options with defaults
3689
+ call_metadata = @config.rpcs.create_google_api_source.metadata.to_h
3690
+
3691
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3692
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3693
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3694
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
3695
+ transports_version_send: [:rest]
3696
+
3697
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3698
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3699
+
3700
+ options.apply_defaults timeout: @config.rpcs.create_google_api_source.timeout,
3701
+ metadata: call_metadata,
3702
+ retry_policy: @config.rpcs.create_google_api_source.retry_policy
3703
+
3704
+ options.apply_defaults timeout: @config.timeout,
3705
+ metadata: @config.metadata,
3706
+ retry_policy: @config.retry_policy
3707
+
3708
+ @eventarc_stub.create_google_api_source request, options do |result, operation|
3709
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3710
+ yield result, operation if block_given?
3711
+ return result
3712
+ end
3713
+ rescue ::Gapic::Rest::Error => e
3714
+ raise ::Google::Cloud::Error.from_error(e)
3715
+ end
3716
+
3717
+ ##
3718
+ # Update a single GoogleApiSource.
3719
+ #
3720
+ # @overload update_google_api_source(request, options = nil)
3721
+ # Pass arguments to `update_google_api_source` via a request object, either of type
3722
+ # {::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest} or an equivalent Hash.
3723
+ #
3724
+ # @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, ::Hash]
3725
+ # A request object representing the call parameters. Required. To specify no
3726
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3727
+ # @param options [::Gapic::CallOptions, ::Hash]
3728
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3729
+ #
3730
+ # @overload update_google_api_source(google_api_source: nil, update_mask: nil, allow_missing: nil, validate_only: nil)
3731
+ # Pass arguments to `update_google_api_source` via keyword arguments. Note that at
3732
+ # least one keyword argument is required. To specify no parameters, or to keep all
3733
+ # the default parameter values, pass an empty Hash as a request object (see above).
3734
+ #
3735
+ # @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash]
3736
+ # Required. The GoogleApiSource to be updated.
3737
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3738
+ # Optional. The fields to be updated; only fields explicitly provided are
3739
+ # updated. If no field mask is provided, all provided fields in the request
3740
+ # are updated. To update all fields, provide a field mask of "*".
3741
+ # @param allow_missing [::Boolean]
3742
+ # Optional. If set to true, and the GoogleApiSource is not found, a new
3743
+ # GoogleApiSource will be created. In this situation, `update_mask` is
3744
+ # ignored.
3745
+ # @param validate_only [::Boolean]
3746
+ # Optional. If set, validate the request and preview the review, but do not
3747
+ # post it.
3748
+ # @yield [result, operation] Access the result along with the TransportOperation object
3749
+ # @yieldparam result [::Gapic::Operation]
3750
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3751
+ #
3752
+ # @return [::Gapic::Operation]
3753
+ #
3754
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3755
+ #
3756
+ # @example Basic example
3757
+ # require "google/cloud/eventarc/v1"
3758
+ #
3759
+ # # Create a client object. The client can be reused for multiple calls.
3760
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
3761
+ #
3762
+ # # Create a request. To set request fields, pass in keyword arguments.
3763
+ # request = Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new
3764
+ #
3765
+ # # Call the update_google_api_source method.
3766
+ # result = client.update_google_api_source request
3767
+ #
3768
+ # # The returned object is of type Gapic::Operation. You can use it to
3769
+ # # check the status of an operation, cancel it, or wait for results.
3770
+ # # Here is how to wait for a response.
3771
+ # result.wait_until_done! timeout: 60
3772
+ # if result.response?
3773
+ # p result.response
3774
+ # else
3775
+ # puts "No response received."
3776
+ # end
3777
+ #
3778
+ def update_google_api_source request, options = nil
3779
+ raise ::ArgumentError, "request must be provided" if request.nil?
3780
+
3781
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest
3782
+
3783
+ # Converts hash and nil to an options object
3784
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3785
+
3786
+ # Customize the options with defaults
3787
+ call_metadata = @config.rpcs.update_google_api_source.metadata.to_h
3788
+
3789
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3790
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3791
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3792
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
3793
+ transports_version_send: [:rest]
3794
+
3795
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3796
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3797
+
3798
+ options.apply_defaults timeout: @config.rpcs.update_google_api_source.timeout,
3799
+ metadata: call_metadata,
3800
+ retry_policy: @config.rpcs.update_google_api_source.retry_policy
3801
+
3802
+ options.apply_defaults timeout: @config.timeout,
3803
+ metadata: @config.metadata,
3804
+ retry_policy: @config.retry_policy
3805
+
3806
+ @eventarc_stub.update_google_api_source request, options do |result, operation|
3807
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3808
+ yield result, operation if block_given?
3809
+ return result
3810
+ end
3811
+ rescue ::Gapic::Rest::Error => e
3812
+ raise ::Google::Cloud::Error.from_error(e)
3813
+ end
3814
+
3815
+ ##
3816
+ # Delete a single GoogleApiSource.
3817
+ #
3818
+ # @overload delete_google_api_source(request, options = nil)
3819
+ # Pass arguments to `delete_google_api_source` via a request object, either of type
3820
+ # {::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest} or an equivalent Hash.
3821
+ #
3822
+ # @param request [::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, ::Hash]
3823
+ # A request object representing the call parameters. Required. To specify no
3824
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3825
+ # @param options [::Gapic::CallOptions, ::Hash]
3826
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3827
+ #
3828
+ # @overload delete_google_api_source(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
3829
+ # Pass arguments to `delete_google_api_source` via keyword arguments. Note that at
3830
+ # least one keyword argument is required. To specify no parameters, or to keep all
3831
+ # the default parameter values, pass an empty Hash as a request object (see above).
3832
+ #
3833
+ # @param name [::String]
3834
+ # Required. The name of the GoogleApiSource to be deleted.
3835
+ # @param etag [::String]
3836
+ # Optional. If provided, the MessageBus will only be deleted if the etag
3837
+ # matches the current etag on the resource.
3838
+ # @param allow_missing [::Boolean]
3839
+ # Optional. If set to true, and the MessageBus is not found, the request will
3840
+ # succeed but no action will be taken on the server.
3841
+ # @param validate_only [::Boolean]
3842
+ # Optional. If set, validate the request and preview the review, but do not
3843
+ # post it.
3844
+ # @yield [result, operation] Access the result along with the TransportOperation object
3845
+ # @yieldparam result [::Gapic::Operation]
3846
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3847
+ #
3848
+ # @return [::Gapic::Operation]
3849
+ #
3850
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3851
+ #
3852
+ # @example Basic example
3853
+ # require "google/cloud/eventarc/v1"
3854
+ #
3855
+ # # Create a client object. The client can be reused for multiple calls.
3856
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new
3857
+ #
3858
+ # # Create a request. To set request fields, pass in keyword arguments.
3859
+ # request = Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new
3860
+ #
3861
+ # # Call the delete_google_api_source method.
3862
+ # result = client.delete_google_api_source request
3863
+ #
3864
+ # # The returned object is of type Gapic::Operation. You can use it to
3865
+ # # check the status of an operation, cancel it, or wait for results.
3866
+ # # Here is how to wait for a response.
3867
+ # result.wait_until_done! timeout: 60
3868
+ # if result.response?
3869
+ # p result.response
3870
+ # else
3871
+ # puts "No response received."
3872
+ # end
3873
+ #
3874
+ def delete_google_api_source request, options = nil
3875
+ raise ::ArgumentError, "request must be provided" if request.nil?
3876
+
3877
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest
3878
+
3879
+ # Converts hash and nil to an options object
3880
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3881
+
3882
+ # Customize the options with defaults
3883
+ call_metadata = @config.rpcs.delete_google_api_source.metadata.to_h
3884
+
3885
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3886
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3887
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3888
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
3889
+ transports_version_send: [:rest]
3890
+
3891
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3892
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3893
+
3894
+ options.apply_defaults timeout: @config.rpcs.delete_google_api_source.timeout,
3895
+ metadata: call_metadata,
3896
+ retry_policy: @config.rpcs.delete_google_api_source.retry_policy
3897
+
3898
+ options.apply_defaults timeout: @config.timeout,
3899
+ metadata: @config.metadata,
3900
+ retry_policy: @config.retry_policy
3901
+
3902
+ @eventarc_stub.delete_google_api_source request, options do |result, operation|
3903
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3904
+ yield result, operation if block_given?
3905
+ return result
3906
+ end
3907
+ rescue ::Gapic::Rest::Error => e
3908
+ raise ::Google::Cloud::Error.from_error(e)
3909
+ end
3910
+
3911
+ ##
3912
+ # Configuration class for the Eventarc REST API.
3913
+ #
3914
+ # This class represents the configuration for Eventarc REST,
3915
+ # providing control over timeouts, retry behavior, logging, transport
3916
+ # parameters, and other low-level controls. Certain parameters can also be
3917
+ # applied individually to specific RPCs. See
3918
+ # {::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client::Configuration::Rpcs}
3919
+ # for a list of RPCs that can be configured independently.
3920
+ #
3921
+ # Configuration can be applied globally to all clients, or to a single client
3922
+ # on construction.
3923
+ #
3924
+ # @example
3925
+ #
3926
+ # # Modify the global config, setting the timeout for
3927
+ # # get_trigger to 20 seconds,
3928
+ # # and all remaining timeouts to 10 seconds.
3929
+ # ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.configure do |config|
3930
+ # config.timeout = 10.0
3931
+ # config.rpcs.get_trigger.timeout = 20.0
3932
+ # end
3933
+ #
3934
+ # # Apply the above configuration only to a new client.
3935
+ # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config|
3936
+ # config.timeout = 10.0
3937
+ # config.rpcs.get_trigger.timeout = 20.0
3938
+ # end
3939
+ #
3940
+ # @!attribute [rw] endpoint
3941
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3942
+ # nil, indicating to use the default endpoint in the current universe domain.
3943
+ # @return [::String,nil]
3944
+ # @!attribute [rw] credentials
3945
+ # Credentials to send with calls. You may provide any of the following types:
3946
+ # * (`String`) The path to a service account key file in JSON format
3947
+ # * (`Hash`) A service account key as a Hash
3948
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3949
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3950
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3951
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3952
+ # * (`nil`) indicating no credentials
3953
+ # @return [::Object]
3954
+ # @!attribute [rw] scope
3955
+ # The OAuth scopes
3956
+ # @return [::Array<::String>]
3957
+ # @!attribute [rw] lib_name
3958
+ # The library name as recorded in instrumentation and logging
3959
+ # @return [::String]
3960
+ # @!attribute [rw] lib_version
3961
+ # The library version as recorded in instrumentation and logging
3962
+ # @return [::String]
3963
+ # @!attribute [rw] timeout
3964
+ # The call timeout in seconds.
3965
+ # @return [::Numeric]
3966
+ # @!attribute [rw] metadata
3967
+ # Additional headers to be sent with the call.
3968
+ # @return [::Hash{::Symbol=>::String}]
3969
+ # @!attribute [rw] retry_policy
3970
+ # The retry policy. The value is a hash with the following keys:
3971
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3972
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3973
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3974
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3975
+ # trigger a retry.
3976
+ # @return [::Hash]
3977
+ # @!attribute [rw] quota_project
3978
+ # A separate project against which to charge quota.
3979
+ # @return [::String]
3980
+ # @!attribute [rw] universe_domain
3981
+ # The universe domain within which to make requests. This determines the
3982
+ # default endpoint URL. The default value of nil uses the environment
3983
+ # universe (usually the default "googleapis.com" universe).
3984
+ # @return [::String,nil]
3985
+ #
3986
+ class Configuration
3987
+ extend ::Gapic::Config
3988
+
3989
+ # @private
3990
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
3991
+ DEFAULT_ENDPOINT = "eventarc.googleapis.com"
3992
+
3993
+ config_attr :endpoint, nil, ::String, nil
3994
+ config_attr :credentials, nil do |value|
3995
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3996
+ allowed.any? { |klass| klass === value }
3997
+ end
3998
+ config_attr :scope, nil, ::String, ::Array, nil
3999
+ config_attr :lib_name, nil, ::String, nil
4000
+ config_attr :lib_version, nil, ::String, nil
4001
+ config_attr :timeout, nil, ::Numeric, nil
4002
+ config_attr :metadata, nil, ::Hash, nil
4003
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
4004
+ config_attr :quota_project, nil, ::String, nil
4005
+ config_attr :universe_domain, nil, ::String, nil
4006
+
4007
+ # @private
4008
+ # Overrides for http bindings for the RPCs of this service
4009
+ # are only used when this service is used as mixin, and only
4010
+ # by the host service.
4011
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
4012
+ config_attr :bindings_override, {}, ::Hash, nil
4013
+
4014
+ # @private
4015
+ def initialize parent_config = nil
4016
+ @parent_config = parent_config unless parent_config.nil?
4017
+
4018
+ yield self if block_given?
4019
+ end
4020
+
4021
+ ##
4022
+ # Configurations for individual RPCs
4023
+ # @return [Rpcs]
4024
+ #
4025
+ def rpcs
4026
+ @rpcs ||= begin
4027
+ parent_rpcs = nil
4028
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
4029
+ Rpcs.new parent_rpcs
4030
+ end
4031
+ end
4032
+
4033
+ ##
4034
+ # Configuration RPC class for the Eventarc API.
4035
+ #
4036
+ # Includes fields providing the configuration for each RPC in this service.
4037
+ # Each configuration object is of type `Gapic::Config::Method` and includes
4038
+ # the following configuration fields:
4039
+ #
4040
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
4041
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
4042
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
4043
+ # include the following keys:
4044
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
4045
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
4046
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
4047
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
4048
+ # trigger a retry.
4049
+ #
4050
+ class Rpcs
4051
+ ##
4052
+ # RPC-specific configuration for `get_trigger`
4053
+ # @return [::Gapic::Config::Method]
4054
+ #
4055
+ attr_reader :get_trigger
4056
+ ##
4057
+ # RPC-specific configuration for `list_triggers`
4058
+ # @return [::Gapic::Config::Method]
4059
+ #
4060
+ attr_reader :list_triggers
4061
+ ##
4062
+ # RPC-specific configuration for `create_trigger`
4063
+ # @return [::Gapic::Config::Method]
4064
+ #
4065
+ attr_reader :create_trigger
4066
+ ##
4067
+ # RPC-specific configuration for `update_trigger`
4068
+ # @return [::Gapic::Config::Method]
4069
+ #
4070
+ attr_reader :update_trigger
4071
+ ##
4072
+ # RPC-specific configuration for `delete_trigger`
4073
+ # @return [::Gapic::Config::Method]
4074
+ #
4075
+ attr_reader :delete_trigger
4076
+ ##
4077
+ # RPC-specific configuration for `get_channel`
4078
+ # @return [::Gapic::Config::Method]
4079
+ #
4080
+ attr_reader :get_channel
4081
+ ##
4082
+ # RPC-specific configuration for `list_channels`
4083
+ # @return [::Gapic::Config::Method]
4084
+ #
4085
+ attr_reader :list_channels
4086
+ ##
4087
+ # RPC-specific configuration for `create_channel`
4088
+ # @return [::Gapic::Config::Method]
4089
+ #
4090
+ attr_reader :create_channel
4091
+ ##
4092
+ # RPC-specific configuration for `update_channel`
4093
+ # @return [::Gapic::Config::Method]
4094
+ #
4095
+ attr_reader :update_channel
4096
+ ##
4097
+ # RPC-specific configuration for `delete_channel`
4098
+ # @return [::Gapic::Config::Method]
4099
+ #
4100
+ attr_reader :delete_channel
2008
4101
  ##
2009
4102
  # RPC-specific configuration for `get_provider`
2010
4103
  # @return [::Gapic::Config::Method]
@@ -2045,6 +4138,111 @@ module Google
2045
4138
  # @return [::Gapic::Config::Method]
2046
4139
  #
2047
4140
  attr_reader :update_google_channel_config
4141
+ ##
4142
+ # RPC-specific configuration for `get_message_bus`
4143
+ # @return [::Gapic::Config::Method]
4144
+ #
4145
+ attr_reader :get_message_bus
4146
+ ##
4147
+ # RPC-specific configuration for `list_message_buses`
4148
+ # @return [::Gapic::Config::Method]
4149
+ #
4150
+ attr_reader :list_message_buses
4151
+ ##
4152
+ # RPC-specific configuration for `list_message_bus_enrollments`
4153
+ # @return [::Gapic::Config::Method]
4154
+ #
4155
+ attr_reader :list_message_bus_enrollments
4156
+ ##
4157
+ # RPC-specific configuration for `create_message_bus`
4158
+ # @return [::Gapic::Config::Method]
4159
+ #
4160
+ attr_reader :create_message_bus
4161
+ ##
4162
+ # RPC-specific configuration for `update_message_bus`
4163
+ # @return [::Gapic::Config::Method]
4164
+ #
4165
+ attr_reader :update_message_bus
4166
+ ##
4167
+ # RPC-specific configuration for `delete_message_bus`
4168
+ # @return [::Gapic::Config::Method]
4169
+ #
4170
+ attr_reader :delete_message_bus
4171
+ ##
4172
+ # RPC-specific configuration for `get_enrollment`
4173
+ # @return [::Gapic::Config::Method]
4174
+ #
4175
+ attr_reader :get_enrollment
4176
+ ##
4177
+ # RPC-specific configuration for `list_enrollments`
4178
+ # @return [::Gapic::Config::Method]
4179
+ #
4180
+ attr_reader :list_enrollments
4181
+ ##
4182
+ # RPC-specific configuration for `create_enrollment`
4183
+ # @return [::Gapic::Config::Method]
4184
+ #
4185
+ attr_reader :create_enrollment
4186
+ ##
4187
+ # RPC-specific configuration for `update_enrollment`
4188
+ # @return [::Gapic::Config::Method]
4189
+ #
4190
+ attr_reader :update_enrollment
4191
+ ##
4192
+ # RPC-specific configuration for `delete_enrollment`
4193
+ # @return [::Gapic::Config::Method]
4194
+ #
4195
+ attr_reader :delete_enrollment
4196
+ ##
4197
+ # RPC-specific configuration for `get_pipeline`
4198
+ # @return [::Gapic::Config::Method]
4199
+ #
4200
+ attr_reader :get_pipeline
4201
+ ##
4202
+ # RPC-specific configuration for `list_pipelines`
4203
+ # @return [::Gapic::Config::Method]
4204
+ #
4205
+ attr_reader :list_pipelines
4206
+ ##
4207
+ # RPC-specific configuration for `create_pipeline`
4208
+ # @return [::Gapic::Config::Method]
4209
+ #
4210
+ attr_reader :create_pipeline
4211
+ ##
4212
+ # RPC-specific configuration for `update_pipeline`
4213
+ # @return [::Gapic::Config::Method]
4214
+ #
4215
+ attr_reader :update_pipeline
4216
+ ##
4217
+ # RPC-specific configuration for `delete_pipeline`
4218
+ # @return [::Gapic::Config::Method]
4219
+ #
4220
+ attr_reader :delete_pipeline
4221
+ ##
4222
+ # RPC-specific configuration for `get_google_api_source`
4223
+ # @return [::Gapic::Config::Method]
4224
+ #
4225
+ attr_reader :get_google_api_source
4226
+ ##
4227
+ # RPC-specific configuration for `list_google_api_sources`
4228
+ # @return [::Gapic::Config::Method]
4229
+ #
4230
+ attr_reader :list_google_api_sources
4231
+ ##
4232
+ # RPC-specific configuration for `create_google_api_source`
4233
+ # @return [::Gapic::Config::Method]
4234
+ #
4235
+ attr_reader :create_google_api_source
4236
+ ##
4237
+ # RPC-specific configuration for `update_google_api_source`
4238
+ # @return [::Gapic::Config::Method]
4239
+ #
4240
+ attr_reader :update_google_api_source
4241
+ ##
4242
+ # RPC-specific configuration for `delete_google_api_source`
4243
+ # @return [::Gapic::Config::Method]
4244
+ #
4245
+ attr_reader :delete_google_api_source
2048
4246
 
2049
4247
  # @private
2050
4248
  def initialize parent_rpcs = nil
@@ -2084,6 +4282,48 @@ module Google
2084
4282
  @get_google_channel_config = ::Gapic::Config::Method.new get_google_channel_config_config
2085
4283
  update_google_channel_config_config = parent_rpcs.update_google_channel_config if parent_rpcs.respond_to? :update_google_channel_config
2086
4284
  @update_google_channel_config = ::Gapic::Config::Method.new update_google_channel_config_config
4285
+ get_message_bus_config = parent_rpcs.get_message_bus if parent_rpcs.respond_to? :get_message_bus
4286
+ @get_message_bus = ::Gapic::Config::Method.new get_message_bus_config
4287
+ list_message_buses_config = parent_rpcs.list_message_buses if parent_rpcs.respond_to? :list_message_buses
4288
+ @list_message_buses = ::Gapic::Config::Method.new list_message_buses_config
4289
+ list_message_bus_enrollments_config = parent_rpcs.list_message_bus_enrollments if parent_rpcs.respond_to? :list_message_bus_enrollments
4290
+ @list_message_bus_enrollments = ::Gapic::Config::Method.new list_message_bus_enrollments_config
4291
+ create_message_bus_config = parent_rpcs.create_message_bus if parent_rpcs.respond_to? :create_message_bus
4292
+ @create_message_bus = ::Gapic::Config::Method.new create_message_bus_config
4293
+ update_message_bus_config = parent_rpcs.update_message_bus if parent_rpcs.respond_to? :update_message_bus
4294
+ @update_message_bus = ::Gapic::Config::Method.new update_message_bus_config
4295
+ delete_message_bus_config = parent_rpcs.delete_message_bus if parent_rpcs.respond_to? :delete_message_bus
4296
+ @delete_message_bus = ::Gapic::Config::Method.new delete_message_bus_config
4297
+ get_enrollment_config = parent_rpcs.get_enrollment if parent_rpcs.respond_to? :get_enrollment
4298
+ @get_enrollment = ::Gapic::Config::Method.new get_enrollment_config
4299
+ list_enrollments_config = parent_rpcs.list_enrollments if parent_rpcs.respond_to? :list_enrollments
4300
+ @list_enrollments = ::Gapic::Config::Method.new list_enrollments_config
4301
+ create_enrollment_config = parent_rpcs.create_enrollment if parent_rpcs.respond_to? :create_enrollment
4302
+ @create_enrollment = ::Gapic::Config::Method.new create_enrollment_config
4303
+ update_enrollment_config = parent_rpcs.update_enrollment if parent_rpcs.respond_to? :update_enrollment
4304
+ @update_enrollment = ::Gapic::Config::Method.new update_enrollment_config
4305
+ delete_enrollment_config = parent_rpcs.delete_enrollment if parent_rpcs.respond_to? :delete_enrollment
4306
+ @delete_enrollment = ::Gapic::Config::Method.new delete_enrollment_config
4307
+ get_pipeline_config = parent_rpcs.get_pipeline if parent_rpcs.respond_to? :get_pipeline
4308
+ @get_pipeline = ::Gapic::Config::Method.new get_pipeline_config
4309
+ list_pipelines_config = parent_rpcs.list_pipelines if parent_rpcs.respond_to? :list_pipelines
4310
+ @list_pipelines = ::Gapic::Config::Method.new list_pipelines_config
4311
+ create_pipeline_config = parent_rpcs.create_pipeline if parent_rpcs.respond_to? :create_pipeline
4312
+ @create_pipeline = ::Gapic::Config::Method.new create_pipeline_config
4313
+ update_pipeline_config = parent_rpcs.update_pipeline if parent_rpcs.respond_to? :update_pipeline
4314
+ @update_pipeline = ::Gapic::Config::Method.new update_pipeline_config
4315
+ delete_pipeline_config = parent_rpcs.delete_pipeline if parent_rpcs.respond_to? :delete_pipeline
4316
+ @delete_pipeline = ::Gapic::Config::Method.new delete_pipeline_config
4317
+ get_google_api_source_config = parent_rpcs.get_google_api_source if parent_rpcs.respond_to? :get_google_api_source
4318
+ @get_google_api_source = ::Gapic::Config::Method.new get_google_api_source_config
4319
+ list_google_api_sources_config = parent_rpcs.list_google_api_sources if parent_rpcs.respond_to? :list_google_api_sources
4320
+ @list_google_api_sources = ::Gapic::Config::Method.new list_google_api_sources_config
4321
+ create_google_api_source_config = parent_rpcs.create_google_api_source if parent_rpcs.respond_to? :create_google_api_source
4322
+ @create_google_api_source = ::Gapic::Config::Method.new create_google_api_source_config
4323
+ update_google_api_source_config = parent_rpcs.update_google_api_source if parent_rpcs.respond_to? :update_google_api_source
4324
+ @update_google_api_source = ::Gapic::Config::Method.new update_google_api_source_config
4325
+ delete_google_api_source_config = parent_rpcs.delete_google_api_source if parent_rpcs.respond_to? :delete_google_api_source
4326
+ @delete_google_api_source = ::Gapic::Config::Method.new delete_google_api_source_config
2087
4327
 
2088
4328
  yield self if block_given?
2089
4329
  end