Class: Google::Cloud::Eventarc::V1::Eventarc::Rest::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/eventarc/v1/eventarc/rest/client.rb

Overview

REST client for the Eventarc service.

Eventarc allows users to subscribe to various events that are provided by Google Cloud services and forward them to supported destinations.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#channel_connection_path, #channel_path, #cloud_function_path, #crypto_key_path, #enrollment_path, #google_api_source_path, #google_channel_config_path, #location_path, #message_bus_path, #network_attachment_path, #pipeline_path, #provider_path, #service_account_path, #topic_path, #trigger_path, #workflow_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new Eventarc REST client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Eventarc client.

Yield Parameters:



261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 261

def initialize
  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end

  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @eventarc_stub = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.new(
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    credentials: credentials
  )

  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @eventarc_stub.endpoint
    config.universe_domain = @eventarc_stub.universe_domain
    config.bindings_override = @config.bindings_override
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @eventarc_stub.endpoint
    config.universe_domain = @eventarc_stub.universe_domain
    config.bindings_override = @config.bindings_override
  end
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Rest::Client (readonly)

Get the associated client for mix-in of the IAMPolicy.

Returns:

  • (Google::Iam::V1::IAMPolicy::Rest::Client)


334
335
336
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 334

def iam_policy_client
  @iam_policy_client
end

#location_clientGoogle::Cloud::Location::Locations::Rest::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Rest::Client)


327
328
329
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 327

def location_client
  @location_client
end

#operations_client::Google::Cloud::Eventarc::V1::Eventarc::Rest::Operations (readonly)

Get the associated client for long-running operations.



320
321
322
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 320

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the Eventarc Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all Eventarc clients
::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 67

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "Eventarc", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.rpcs.get_trigger.timeout = 60.0
    default_config.rpcs.get_trigger.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.list_triggers.timeout = 60.0
    default_config.rpcs.list_triggers.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.create_trigger.timeout = 60.0

    default_config.rpcs.update_trigger.timeout = 60.0

    default_config.rpcs.delete_trigger.timeout = 60.0

    default_config.rpcs.get_channel.timeout = 60.0
    default_config.rpcs.get_channel.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.list_channels.timeout = 60.0
    default_config.rpcs.list_channels.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.create_channel.timeout = 60.0

    default_config.rpcs.update_channel.timeout = 60.0

    default_config.rpcs.delete_channel.timeout = 60.0

    default_config.rpcs.get_provider.timeout = 60.0
    default_config.rpcs.get_provider.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.list_providers.timeout = 60.0
    default_config.rpcs.list_providers.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.get_channel_connection.timeout = 60.0
    default_config.rpcs.get_channel_connection.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.list_channel_connections.timeout = 60.0
    default_config.rpcs.list_channel_connections.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.create_channel_connection.timeout = 60.0

    default_config.rpcs.delete_channel_connection.timeout = 60.0

    default_config.rpcs.get_google_channel_config.timeout = 60.0
    default_config.rpcs.get_google_channel_config.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.update_google_channel_config.timeout = 60.0

    default_config.rpcs.get_message_bus.timeout = 60.0
    default_config.rpcs.get_message_bus.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.list_message_buses.timeout = 60.0
    default_config.rpcs.list_message_buses.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.list_message_bus_enrollments.timeout = 60.0
    default_config.rpcs.list_message_bus_enrollments.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.create_message_bus.timeout = 60.0

    default_config.rpcs.update_message_bus.timeout = 60.0

    default_config.rpcs.delete_message_bus.timeout = 60.0

    default_config.rpcs.get_enrollment.timeout = 60.0
    default_config.rpcs.get_enrollment.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.list_enrollments.timeout = 60.0
    default_config.rpcs.list_enrollments.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.create_enrollment.timeout = 60.0

    default_config.rpcs.update_enrollment.timeout = 60.0

    default_config.rpcs.delete_enrollment.timeout = 60.0

    default_config.rpcs.get_pipeline.timeout = 60.0
    default_config.rpcs.get_pipeline.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.list_pipelines.timeout = 60.0
    default_config.rpcs.list_pipelines.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.create_pipeline.timeout = 60.0

    default_config.rpcs.update_pipeline.timeout = 60.0

    default_config.rpcs.delete_pipeline.timeout = 60.0

    default_config.rpcs.get_google_api_source.timeout = 60.0
    default_config.rpcs.get_google_api_source.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.list_google_api_sources.timeout = 60.0
    default_config.rpcs.list_google_api_sources.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.create_google_api_source.timeout = 60.0

    default_config.rpcs.update_google_api_source.timeout = 60.0

    default_config.rpcs.delete_google_api_source.timeout = 60.0

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#configure {|config| ... } ⇒ Client::Configuration

Configure the Eventarc Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



231
232
233
234
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 231

def configure
  yield @config if block_given?
  @config
end

#create_channel(request, options = nil) ⇒ ::Gapic::Operation #create_channel(parent: nil, channel: nil, channel_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Create a new channel in a particular project and location.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::CreateChannelRequest.new

# Call the create_channel method.
result = client.create_channel request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_channel(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_channel via a request object, either of type CreateChannelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::CreateChannelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_channel(parent: nil, channel: nil, channel_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_channel via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which to add this channel.

    • channel (::Google::Cloud::Eventarc::V1::Channel, ::Hash) (defaults to: nil)

      Required. The channel to create.

    • channel_id (::String) (defaults to: nil)

      Required. The user-provided ID to be assigned to the channel.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1040

def create_channel request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_channel..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_channel.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_channel.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.create_channel request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_channel_connection(request, options = nil) ⇒ ::Gapic::Operation #create_channel_connection(parent: nil, channel_connection: nil, channel_connection_id: nil) ⇒ ::Gapic::Operation

Create a new ChannelConnection in a particular project and location.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new

# Call the create_channel_connection method.
result = client.create_channel_connection request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_channel_connection(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_channel_connection via a request object, either of type CreateChannelConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_channel_connection(parent: nil, channel_connection: nil, channel_connection_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_channel_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which to add this channel connection.

    • channel_connection (::Google::Cloud::Eventarc::V1::ChannelConnection, ::Hash) (defaults to: nil)

      Required. Channel connection to create.

    • channel_connection_id (::String) (defaults to: nil)

      Required. The user-provided ID to be assigned to the channel connection.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1664

def create_channel_connection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_channel_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_channel_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_channel_connection.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.create_channel_connection request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_enrollment(request, options = nil) ⇒ ::Gapic::Operation #create_enrollment(parent: nil, enrollment: nil, enrollment_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Create a new Enrollment in a particular project and location.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new

# Call the create_enrollment method.
result = client.create_enrollment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_enrollment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_enrollment via a request object, either of type CreateEnrollmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_enrollment(parent: nil, enrollment: nil, enrollment_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_enrollment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which to add this enrollment.

    • enrollment (::Google::Cloud::Eventarc::V1::Enrollment, ::Hash) (defaults to: nil)

      Required. The enrollment to create.

    • enrollment_id (::String) (defaults to: nil)

      Required. The user-provided ID to be assigned to the Enrollment. It should match the format (^a-z?$).

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2745

def create_enrollment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_enrollment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_enrollment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_enrollment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.create_enrollment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_google_api_source(request, options = nil) ⇒ ::Gapic::Operation #create_google_api_source(parent: nil, google_api_source: nil, google_api_source_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Create a new GoogleApiSource in a particular project and location.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new

# Call the create_google_api_source method.
result = client.create_google_api_source request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_google_api_source(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_google_api_source via a request object, either of type CreateGoogleApiSourceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_google_api_source(parent: nil, google_api_source: nil, google_api_source_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_google_api_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which to add this google api source.

    • google_api_source (::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash) (defaults to: nil)

      Required. The google api source to create.

    • google_api_source_id (::String) (defaults to: nil)

      Required. The user-provided ID to be assigned to the GoogleApiSource. It should match the format (^a-z?$).

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3680

def create_google_api_source request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_google_api_source..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_google_api_source.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_google_api_source.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.create_google_api_source request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_message_bus(request, options = nil) ⇒ ::Gapic::Operation #create_message_bus(parent: nil, message_bus: nil, message_bus_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Create a new MessageBus in a particular project and location.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new

# Call the create_message_bus method.
result = client.create_message_bus request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_message_bus(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_message_bus via a request object, either of type CreateMessageBusRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_message_bus(parent: nil, message_bus: nil, message_bus_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_message_bus via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which to add this message bus.

    • message_bus (::Google::Cloud::Eventarc::V1::MessageBus, ::Hash) (defaults to: nil)

      Required. The message bus to create.

    • message_bus_id (::String) (defaults to: nil)

      Required. The user-provided ID to be assigned to the MessageBus. It should match the format (^a-z?$)

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2277

def create_message_bus request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_message_bus..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_message_bus.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_message_bus.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.create_message_bus request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_pipeline(request, options = nil) ⇒ ::Gapic::Operation #create_pipeline(parent: nil, pipeline: nil, pipeline_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Create a new Pipeline in a particular project and location.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::CreatePipelineRequest.new

# Call the create_pipeline method.
result = client.create_pipeline request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_pipeline(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_pipeline via a request object, either of type CreatePipelineRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::CreatePipelineRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_pipeline(parent: nil, pipeline: nil, pipeline_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_pipeline via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which to add this pipeline.

    • pipeline (::Google::Cloud::Eventarc::V1::Pipeline, ::Hash) (defaults to: nil)

      Required. The pipeline to create.

    • pipeline_id (::String) (defaults to: nil)

      Required. The user-provided ID to be assigned to the Pipeline.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3212

def create_pipeline request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreatePipelineRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_pipeline..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_pipeline.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_pipeline.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.create_pipeline request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_trigger(request, options = nil) ⇒ ::Gapic::Operation #create_trigger(parent: nil, trigger: nil, trigger_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Create a new trigger in a particular project and location.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::CreateTriggerRequest.new

# Call the create_trigger method.
result = client.create_trigger request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_trigger(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_trigger via a request object, either of type CreateTriggerRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::CreateTriggerRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_trigger(parent: nil, trigger: nil, trigger_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_trigger via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which to add this trigger.

    • trigger (::Google::Cloud::Eventarc::V1::Trigger, ::Hash) (defaults to: nil)

      Required. The trigger to create.

    • trigger_id (::String) (defaults to: nil)

      Required. The user-provided ID to be assigned to the trigger.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 576

def create_trigger request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateTriggerRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_trigger..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_trigger.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_trigger.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.create_trigger request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_channel(request, options = nil) ⇒ ::Gapic::Operation #delete_channel(name: nil, validate_only: nil) ⇒ ::Gapic::Operation

Delete a single channel.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::DeleteChannelRequest.new

# Call the delete_channel method.
result = client.delete_channel request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_channel(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_channel via a request object, either of type DeleteChannelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::DeleteChannelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_channel(name: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_channel via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the channel to be deleted.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1224

def delete_channel request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_channel..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_channel.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_channel.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.delete_channel request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_channel_connection(request, options = nil) ⇒ ::Gapic::Operation #delete_channel_connection(name: nil) ⇒ ::Gapic::Operation

Delete a single ChannelConnection.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new

# Call the delete_channel_connection method.
result = client.delete_channel_connection request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_channel_connection(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_channel_connection via a request object, either of type DeleteChannelConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_channel_connection(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_channel_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the channel connection to delete.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1751

def delete_channel_connection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_channel_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_channel_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_channel_connection.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.delete_channel_connection request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_enrollment(request, options = nil) ⇒ ::Gapic::Operation #delete_enrollment(name: nil, etag: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Delete a single Enrollment.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new

# Call the delete_enrollment method.
result = client.delete_enrollment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_enrollment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_enrollment via a request object, either of type DeleteEnrollmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_enrollment(name: nil, etag: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_enrollment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Enrollment to be deleted.

    • etag (::String) (defaults to: nil)

      Optional. If provided, the Enrollment will only be deleted if the etag matches the current etag on the resource.

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, and the Enrollment is not found, the request will succeed but no action will be taken on the server.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2938

def delete_enrollment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_enrollment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_enrollment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_enrollment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.delete_enrollment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_google_api_source(request, options = nil) ⇒ ::Gapic::Operation #delete_google_api_source(name: nil, etag: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Delete a single GoogleApiSource.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new

# Call the delete_google_api_source method.
result = client.delete_google_api_source request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_google_api_source(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_google_api_source via a request object, either of type DeleteGoogleApiSourceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_google_api_source(name: nil, etag: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_google_api_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the GoogleApiSource to be deleted.

    • etag (::String) (defaults to: nil)

      Optional. If provided, the MessageBus will only be deleted if the etag matches the current etag on the resource.

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, and the MessageBus is not found, the request will succeed but no action will be taken on the server.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3874

def delete_google_api_source request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_google_api_source..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_google_api_source.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_google_api_source.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.delete_google_api_source request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_message_bus(request, options = nil) ⇒ ::Gapic::Operation #delete_message_bus(name: nil, etag: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Delete a single message bus.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new

# Call the delete_message_bus method.
result = client.delete_message_bus request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_message_bus(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_message_bus via a request object, either of type DeleteMessageBusRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_message_bus(name: nil, etag: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_message_bus via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the MessageBus to be deleted.

    • etag (::String) (defaults to: nil)

      Optional. If provided, the MessageBus will only be deleted if the etag matches the current etag on the resource.

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, and the MessageBus is not found, the request will succeed but no action will be taken on the server.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2470

def delete_message_bus request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_message_bus..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_message_bus.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_message_bus.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.delete_message_bus request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_pipeline(request, options = nil) ⇒ ::Gapic::Operation #delete_pipeline(name: nil, etag: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Delete a single pipeline.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::DeletePipelineRequest.new

# Call the delete_pipeline method.
result = client.delete_pipeline request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_pipeline(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_pipeline via a request object, either of type DeletePipelineRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::DeletePipelineRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_pipeline(name: nil, etag: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_pipeline via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Pipeline to be deleted.

    • etag (::String) (defaults to: nil)

      Optional. If provided, the Pipeline will only be deleted if the etag matches the current etag on the resource.

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, and the Pipeline is not found, the request will succeed but no action will be taken on the server.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3405

def delete_pipeline request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeletePipelineRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_pipeline..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_pipeline.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_pipeline.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.delete_pipeline request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_trigger(request, options = nil) ⇒ ::Gapic::Operation #delete_trigger(name: nil, etag: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Delete a single trigger.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new

# Call the delete_trigger method.
result = client.delete_trigger request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_trigger(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_trigger via a request object, either of type DeleteTriggerRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::DeleteTriggerRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_trigger(name: nil, etag: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_trigger via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the trigger to be deleted.

    • etag (::String) (defaults to: nil)

      If provided, the trigger will only be deleted if the etag matches the current etag on the resource.

    • allow_missing (::Boolean) (defaults to: nil)

      If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 769

def delete_trigger request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_trigger..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_trigger.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_trigger.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.delete_trigger request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_channel(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::Channel #get_channel(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::Channel

Get a single Channel.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::GetChannelRequest.new

# Call the get_channel method.
result = client.get_channel request

# The returned object is of type Google::Cloud::Eventarc::V1::Channel.
p result

Overloads:

  • #get_channel(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::Channel

    Pass arguments to get_channel via a request object, either of type GetChannelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::GetChannelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_channel(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::Channel

    Pass arguments to get_channel via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the channel to get.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 849

def get_channel request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_channel..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_channel.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_channel.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.get_channel request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_channel_connection(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ChannelConnection #get_channel_connection(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::ChannelConnection

Get a single ChannelConnection.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new

# Call the get_channel_connection method.
result = client.get_channel_connection request

# The returned object is of type Google::Cloud::Eventarc::V1::ChannelConnection.
p result

Overloads:

  • #get_channel_connection(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ChannelConnection

    Pass arguments to get_channel_connection via a request object, either of type GetChannelConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_channel_connection(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::ChannelConnection

    Pass arguments to get_channel_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the channel connection to get.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1481

def get_channel_connection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_channel_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_channel_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_channel_connection.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.get_channel_connection request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_enrollment(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::Enrollment #get_enrollment(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::Enrollment

Get a single Enrollment.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new

# Call the get_enrollment method.
result = client.get_enrollment request

# The returned object is of type Google::Cloud::Eventarc::V1::Enrollment.
p result

Overloads:

  • #get_enrollment(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::Enrollment

    Pass arguments to get_enrollment via a request object, either of type GetEnrollmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_enrollment(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::Enrollment

    Pass arguments to get_enrollment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Enrollment to get.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2550

def get_enrollment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_enrollment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_enrollment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_enrollment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.get_enrollment request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_google_api_source(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleApiSource #get_google_api_source(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleApiSource

Get a single GoogleApiSource.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new

# Call the get_google_api_source method.
result = client.get_google_api_source request

# The returned object is of type Google::Cloud::Eventarc::V1::GoogleApiSource.
p result

Overloads:

  • #get_google_api_source(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleApiSource

    Pass arguments to get_google_api_source via a request object, either of type GetGoogleApiSourceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_google_api_source(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleApiSource

    Pass arguments to get_google_api_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the google api source to get.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3485

def get_google_api_source request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_google_api_source..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_google_api_source.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_google_api_source.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.get_google_api_source request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_google_channel_config(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleChannelConfig #get_google_channel_config(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleChannelConfig

Get a GoogleChannelConfig

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new

# Call the get_google_channel_config method.
result = client.get_google_channel_config request

# The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig.
p result

Overloads:

  • #get_google_channel_config(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleChannelConfig

    Pass arguments to get_google_channel_config via a request object, either of type GetGoogleChannelConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_google_channel_config(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleChannelConfig

    Pass arguments to get_google_channel_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the config to get.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1831

def get_google_channel_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_google_channel_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_google_channel_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_google_channel_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.get_google_channel_config request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_message_bus(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::MessageBus #get_message_bus(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::MessageBus

Get a single MessageBus.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::GetMessageBusRequest.new

# Call the get_message_bus method.
result = client.get_message_bus request

# The returned object is of type Google::Cloud::Eventarc::V1::MessageBus.
p result

Overloads:

  • #get_message_bus(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::MessageBus

    Pass arguments to get_message_bus via a request object, either of type GetMessageBusRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::GetMessageBusRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_message_bus(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::MessageBus

    Pass arguments to get_message_bus via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the message bus to get.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1993

def get_message_bus request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetMessageBusRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_message_bus..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_message_bus.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_message_bus.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.get_message_bus request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_pipeline(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::Pipeline #get_pipeline(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::Pipeline

Get a single Pipeline.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::GetPipelineRequest.new

# Call the get_pipeline method.
result = client.get_pipeline request

# The returned object is of type Google::Cloud::Eventarc::V1::Pipeline.
p result

Overloads:

  • #get_pipeline(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::Pipeline

    Pass arguments to get_pipeline via a request object, either of type GetPipelineRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::GetPipelineRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_pipeline(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::Pipeline

    Pass arguments to get_pipeline via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the pipeline to get.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3018

def get_pipeline request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetPipelineRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_pipeline..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_pipeline.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_pipeline.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.get_pipeline request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_provider(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::Provider #get_provider(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::Provider

Get a single Provider.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::GetProviderRequest.new

# Call the get_provider method.
result = client.get_provider request

# The returned object is of type Google::Cloud::Eventarc::V1::Provider.
p result

Overloads:

  • #get_provider(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::Provider

    Pass arguments to get_provider via a request object, either of type GetProviderRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::GetProviderRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_provider(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::Provider

    Pass arguments to get_provider via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the provider to get.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1304

def get_provider request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetProviderRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_provider..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_provider.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_provider.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.get_provider request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_trigger(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::Trigger #get_trigger(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::Trigger

Get a single trigger.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::GetTriggerRequest.new

# Call the get_trigger method.
result = client.get_trigger request

# The returned object is of type Google::Cloud::Eventarc::V1::Trigger.
p result

Overloads:

  • #get_trigger(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::Trigger

    Pass arguments to get_trigger via a request object, either of type GetTriggerRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::GetTriggerRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_trigger(name: nil) ⇒ ::Google::Cloud::Eventarc::V1::Trigger

    Pass arguments to get_trigger via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the trigger to get.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 381

def get_trigger request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetTriggerRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_trigger..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_trigger.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_trigger.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.get_trigger request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_channel_connections(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse #list_channel_connections(parent: nil, page_size: nil, page_token: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse

List channel connections.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.new

# Call the list_channel_connections method.
result = client.list_channel_connections request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Eventarc::V1::ChannelConnection.
  p item
end

Overloads:

  • #list_channel_connections(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse

    Pass arguments to list_channel_connections via a request object, either of type ListChannelConnectionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_channel_connections(parent: nil, page_size: nil, page_token: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse

    Pass arguments to list_channel_connections via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection from which to list channel connections.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of channel connections to return on each page.

      Note: The service may send fewer responses.

    • page_token (::String) (defaults to: nil)

      The page token; provide the value from the next_page_token field in a previous ListChannelConnections call to retrieve the subsequent page.

      When paginating, all other parameters provided to ListChannelConnetions match the call that provided the page token.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1574

def list_channel_connections request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_channel_connections..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_channel_connections.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_channel_connections.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.list_channel_connections request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_channels(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListChannelsResponse #list_channels(parent: nil, page_size: nil, page_token: nil, order_by: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListChannelsResponse

List channels.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::ListChannelsRequest.new

# Call the list_channels method.
result = client.list_channels request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Eventarc::V1::Channel.
  p item
end

Overloads:

  • #list_channels(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListChannelsResponse

    Pass arguments to list_channels via a request object, either of type ListChannelsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::ListChannelsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_channels(parent: nil, page_size: nil, page_token: nil, order_by: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListChannelsResponse

    Pass arguments to list_channels via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection to list channels on.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of channels to return on each page.

      Note: The service may send fewer.

    • page_token (::String) (defaults to: nil)

      The page token; provide the value from the next_page_token field in a previous ListChannels call to retrieve the subsequent page.

      When paginating, all other parameters provided to ListChannels must match the call that provided the page token.

    • order_by (::String) (defaults to: nil)

      The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting order is ascending. To specify descending order for a field, append a desc suffix; for example: name desc, channel_id.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 947

def list_channels request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_channels..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_channels.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_channels.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.list_channels request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_enrollments(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse #list_enrollments(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse

List Enrollments.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new

# Call the list_enrollments method.
result = client.list_enrollments request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Eventarc::V1::Enrollment.
  p item
end

Overloads:

  • #list_enrollments(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse

    Pass arguments to list_enrollments via a request object, either of type ListEnrollmentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_enrollments(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse

    Pass arguments to list_enrollments via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection to list triggers on.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of results to return on each page.

      Note: The service may send fewer.

    • page_token (::String) (defaults to: nil)

      Optional. The page token; provide the value from the next_page_token field in a previous call to retrieve the subsequent page.

      When paginating, all other parameters provided must match the previous call that provided the page token.

    • order_by (::String) (defaults to: nil)

      Optional. The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting order is ascending. To specify descending order for a field, append a desc suffix; for example: name desc, update_time.

    • filter (::String) (defaults to: nil)

      Optional. The filter field that the list request will filter on. Possible filtersare described in https://google.aip.dev/160.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2651

def list_enrollments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_enrollments..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_enrollments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_enrollments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.list_enrollments request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_google_api_sources(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse #list_google_api_sources(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse

List GoogleApiSources.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new

# Call the list_google_api_sources method.
result = client.list_google_api_sources request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Eventarc::V1::GoogleApiSource.
  p item
end

Overloads:

  • #list_google_api_sources(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse

    Pass arguments to list_google_api_sources via a request object, either of type ListGoogleApiSourcesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_google_api_sources(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse

    Pass arguments to list_google_api_sources via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection to list GoogleApiSources on.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of results to return on each page.

      Note: The service may send fewer.

    • page_token (::String) (defaults to: nil)

      Optional. The page token; provide the value from the next_page_token field in a previous call to retrieve the subsequent page.

      When paginating, all other parameters provided must match the previous call that provided the page token.

    • order_by (::String) (defaults to: nil)

      Optional. The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting order is ascending. To specify descending order for a field, append a desc suffix; for example: name desc, update_time.

    • filter (::String) (defaults to: nil)

      Optional. The filter field that the list request will filter on. Possible filtersare described in https://google.aip.dev/160.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3586

def list_google_api_sources request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_google_api_sources..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_google_api_sources.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_google_api_sources.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.list_google_api_sources request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_message_bus_enrollments(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse #list_message_bus_enrollments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse

List message bus enrollments.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new

# Call the list_message_bus_enrollments method.
result = client.list_message_bus_enrollments request

# The returned object is of type Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse.
p result

Overloads:

  • #list_message_bus_enrollments(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse

    Pass arguments to list_message_bus_enrollments via a request object, either of type ListMessageBusEnrollmentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_message_bus_enrollments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse

    Pass arguments to list_message_bus_enrollments via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent message bus to list enrollments on.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of results to return on each page.

      Note: The service may send fewer.

    • page_token (::String) (defaults to: nil)

      Optional. The page token; provide the value from the next_page_token field in a previous call to retrieve the subsequent page.

      When paginating, all other parameters provided must match the previous call that provided the page token.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2183

def list_message_bus_enrollments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_message_bus_enrollments..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_message_bus_enrollments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_message_bus_enrollments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.list_message_bus_enrollments request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_message_buses(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse #list_message_buses(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse

List message buses.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new

# Call the list_message_buses method.
result = client.list_message_buses request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Eventarc::V1::MessageBus.
  p item
end

Overloads:

  • #list_message_buses(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse

    Pass arguments to list_message_buses via a request object, either of type ListMessageBusesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_message_buses(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse

    Pass arguments to list_message_buses via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection to list triggers on.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of results to return on each page.

      Note: The service may send fewer.

    • page_token (::String) (defaults to: nil)

      Optional. The page token; provide the value from the next_page_token field in a previous call to retrieve the subsequent page.

      When paginating, all other parameters provided must match the previous call that provided the page token.

    • order_by (::String) (defaults to: nil)

      Optional. The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting order is ascending. To specify descending order for a field, append a desc suffix; for example: name desc, update_time.

    • filter (::String) (defaults to: nil)

      Optional. The filter field that the list request will filter on. Possible filtersare described in https://google.aip.dev/160.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2094

def list_message_buses request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_message_buses..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_message_buses.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_message_buses.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.list_message_buses request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_pipelines(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListPipelinesResponse #list_pipelines(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListPipelinesResponse

List pipelines.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::ListPipelinesRequest.new

# Call the list_pipelines method.
result = client.list_pipelines request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Eventarc::V1::Pipeline.
  p item
end

Overloads:

  • #list_pipelines(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListPipelinesResponse

    Pass arguments to list_pipelines via a request object, either of type ListPipelinesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::ListPipelinesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_pipelines(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListPipelinesResponse

    Pass arguments to list_pipelines via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection to list pipelines on.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of results to return on each page.

      Note: The service may send fewer.

    • page_token (::String) (defaults to: nil)

      Optional. The page token; provide the value from the next_page_token field in a previous call to retrieve the subsequent page.

      When paginating, all other parameters provided must match the previous call that provided the page token.

    • order_by (::String) (defaults to: nil)

      Optional. The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting order is ascending. To specify descending order for a field, append a desc suffix; for example: name desc, update_time.

    • filter (::String) (defaults to: nil)

      Optional. The filter field that the list request will filter on. Possible filters are described in https://google.aip.dev/160.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3119

def list_pipelines request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListPipelinesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_pipelines..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_pipelines.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_pipelines.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.list_pipelines request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_providers(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListProvidersResponse #list_providers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListProvidersResponse

List providers.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::ListProvidersRequest.new

# Call the list_providers method.
result = client.list_providers request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Eventarc::V1::Provider.
  p item
end

Overloads:

  • #list_providers(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListProvidersResponse

    Pass arguments to list_providers via a request object, either of type ListProvidersRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::ListProvidersRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_providers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListProvidersResponse

    Pass arguments to list_providers via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the provider to get.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of providers to return on each page.

    • page_token (::String) (defaults to: nil)

      The page token; provide the value from the next_page_token field in a previous ListProviders call to retrieve the subsequent page.

      When paginating, all other parameters provided to ListProviders must match the call that provided the page token.

    • order_by (::String) (defaults to: nil)

      The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting oder is ascending. To specify descending order for a field, append a desc suffix; for example: name desc, _id.

    • filter (::String) (defaults to: nil)

      The filter field that the list request will filter on.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1402

def list_providers request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListProvidersRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_providers..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_providers.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_providers.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.list_providers request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_triggers(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListTriggersResponse #list_triggers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListTriggersResponse

List triggers.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::ListTriggersRequest.new

# Call the list_triggers method.
result = client.list_triggers request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Eventarc::V1::Trigger.
  p item
end

Overloads:

  • #list_triggers(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::ListTriggersResponse

    Pass arguments to list_triggers via a request object, either of type ListTriggersRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::ListTriggersRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_triggers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Google::Cloud::Eventarc::V1::ListTriggersResponse

    Pass arguments to list_triggers via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection to list triggers on.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of triggers to return on each page.

      Note: The service may send fewer.

    • page_token (::String) (defaults to: nil)

      The page token; provide the value from the next_page_token field in a previous ListTriggers call to retrieve the subsequent page.

      When paginating, all other parameters provided to ListTriggers must match the call that provided the page token.

    • order_by (::String) (defaults to: nil)

      The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting order is ascending. To specify descending order for a field, append a desc suffix; for example: name desc, trigger_id.

    • filter (::String) (defaults to: nil)

      Filter field. Used to filter the Triggers to be listed. Possible filters are described in https://google.aip.dev/160. For example, using "?filter=destination:gke" would list only Triggers with a gke destination.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 483

def list_triggers request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListTriggersRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_triggers..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_triggers.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_triggers.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.list_triggers request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


241
242
243
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 241

def universe_domain
  @eventarc_stub.universe_domain
end

#update_channel(request, options = nil) ⇒ ::Gapic::Operation #update_channel(channel: nil, update_mask: nil, validate_only: nil) ⇒ ::Gapic::Operation

Update a single channel.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::UpdateChannelRequest.new

# Call the update_channel method.
result = client.update_channel request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_channel(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_channel via a request object, either of type UpdateChannelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::UpdateChannelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_channel(channel: nil, update_mask: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_channel via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • channel (::Google::Cloud::Eventarc::V1::Channel, ::Hash) (defaults to: nil)

      The channel to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*".

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1134

def update_channel request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateChannelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_channel..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_channel.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_channel.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.update_channel request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_enrollment(request, options = nil) ⇒ ::Gapic::Operation #update_enrollment(enrollment: nil, update_mask: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Update a single Enrollment.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new

# Call the update_enrollment method.
result = client.update_enrollment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_enrollment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_enrollment via a request object, either of type UpdateEnrollmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_enrollment(enrollment: nil, update_mask: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_enrollment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • enrollment (::Google::Cloud::Eventarc::V1::Enrollment, ::Hash) (defaults to: nil)

      Required. The Enrollment to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*".

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, and the Enrollment is not found, a new Enrollment will be created. In this situation, update_mask is ignored.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2842

def update_enrollment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_enrollment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_enrollment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_enrollment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.update_enrollment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_google_api_source(request, options = nil) ⇒ ::Gapic::Operation #update_google_api_source(google_api_source: nil, update_mask: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Update a single GoogleApiSource.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new

# Call the update_google_api_source method.
result = client.update_google_api_source request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_google_api_source(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_google_api_source via a request object, either of type UpdateGoogleApiSourceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_google_api_source(google_api_source: nil, update_mask: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_google_api_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • google_api_source (::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash) (defaults to: nil)

      Required. The GoogleApiSource to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*".

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, and the GoogleApiSource is not found, a new GoogleApiSource will be created. In this situation, update_mask is ignored.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3778

def update_google_api_source request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_google_api_source..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_google_api_source.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_google_api_source.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.update_google_api_source request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_google_channel_config(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleChannelConfig #update_google_channel_config(google_channel_config: nil, update_mask: nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleChannelConfig

Update a single GoogleChannelConfig

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new

# Call the update_google_channel_config method.
result = client.update_google_channel_config request

# The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig.
p result

Overloads:

  • #update_google_channel_config(request, options = nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleChannelConfig

    Pass arguments to update_google_channel_config via a request object, either of type UpdateGoogleChannelConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_google_channel_config(google_channel_config: nil, update_mask: nil) ⇒ ::Google::Cloud::Eventarc::V1::GoogleChannelConfig

    Pass arguments to update_google_channel_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • google_channel_config (::Google::Cloud::Eventarc::V1::GoogleChannelConfig, ::Hash) (defaults to: nil)

      Required. The config to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*".

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1914

def update_google_channel_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_google_channel_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_google_channel_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_google_channel_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.update_google_channel_config request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_message_bus(request, options = nil) ⇒ ::Gapic::Operation #update_message_bus(message_bus: nil, update_mask: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Update a single message bus.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new

# Call the update_message_bus method.
result = client.update_message_bus request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_message_bus(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_message_bus via a request object, either of type UpdateMessageBusRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_message_bus(message_bus: nil, update_mask: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_message_bus via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • message_bus (::Google::Cloud::Eventarc::V1::MessageBus, ::Hash) (defaults to: nil)

      Required. The MessageBus to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*".

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, and the MessageBus is not found, a new MessageBus will be created. In this situation, update_mask is ignored.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2374

def update_message_bus request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_message_bus..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_message_bus.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_message_bus.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.update_message_bus request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_pipeline(request, options = nil) ⇒ ::Gapic::Operation #update_pipeline(pipeline: nil, update_mask: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Update a single pipeline.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new

# Call the update_pipeline method.
result = client.update_pipeline request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_pipeline(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_pipeline via a request object, either of type UpdatePipelineRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_pipeline(pipeline: nil, update_mask: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_pipeline via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • pipeline (::Google::Cloud::Eventarc::V1::Pipeline, ::Hash) (defaults to: nil)

      Required. The Pipeline to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*".

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, and the Pipeline is not found, a new Pipeline will be created. In this situation, update_mask is ignored.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3309

def update_pipeline request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_pipeline..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_pipeline.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_pipeline.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.update_pipeline request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_trigger(request, options = nil) ⇒ ::Gapic::Operation #update_trigger(trigger: nil, update_mask: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Update a single trigger.

Examples:

Basic example

require "google/cloud/eventarc/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new

# Call the update_trigger method.
result = client.update_trigger request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_trigger(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_trigger via a request object, either of type UpdateTriggerRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Eventarc::V1::UpdateTriggerRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_trigger(trigger: nil, update_mask: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_trigger via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • trigger (::Google::Cloud::Eventarc::V1::Trigger, ::Hash) (defaults to: nil)

      The trigger to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*".

    • allow_missing (::Boolean) (defaults to: nil)

      If set to true, and the trigger is not found, a new trigger will be created. In this situation, update_mask is ignored.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not post it.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 673

def update_trigger request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_trigger..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Eventarc::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_trigger.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_trigger.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @eventarc_stub.update_trigger request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end