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
314
315
316
317
318
319
320
321
322
323
324
325
326
# 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,
    logger: @config.logger
  )

  @eventarc_stub.logger(stub: true)&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @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
    config.logger = @eventarc_stub.logger if config.respond_to? :logger=
  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
    config.logger = @eventarc_stub.logger if config.respond_to? :logger=
  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)


347
348
349
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 347

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)


340
341
342
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 340

def location_client
  @location_client
end

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

Get the associated client for long-running operations.



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

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.



1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1062

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?
    throw :response, 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.



1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1686

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?
    throw :response, 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.



2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2764

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?
    throw :response, 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.



3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3699

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?
    throw :response, 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.



2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2296

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?
    throw :response, 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.



3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3231

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?
    throw :response, 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.



598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 598

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?
    throw :response, 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.



1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1246

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?
    throw :response, 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.



1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1773

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?
    throw :response, 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.



2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2957

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?
    throw :response, 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.



3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3893

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?
    throw :response, 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.



2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2489

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?
    throw :response, 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.



3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3424

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?
    throw :response, 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.



791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 791

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?
    throw :response, 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.



871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 871

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?
  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.



1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1503

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?
  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.



2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2569

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?
  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.



3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3504

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?
  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.



1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1853

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?
  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.



2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2013

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?
  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.



3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3037

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?
  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.



1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1326

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?
  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.



403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 403

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?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_channel_connections(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::ChannelConnection> #list_channel_connections(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::ChannelConnection>

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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::ChannelConnection>

    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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::ChannelConnection>

    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.



1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1595

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|
    result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_channel_connections, "channel_connections", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_channels(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel> #list_channels(parent: nil, page_size: nil, page_token: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>

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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>

    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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>

    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.



968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 968

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|
    result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_channels, "channels", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_enrollments(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment> #list_enrollments(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>

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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>

    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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>

    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.



2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2669

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|
    result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_enrollments, "enrollments", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_google_api_sources(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource> #list_google_api_sources(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>

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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>

    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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>

    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.



3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3604

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|
    result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_google_api_sources, "google_api_sources", request, result, options
    yield result, operation if block_given?
    throw :response, 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.



2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2203

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?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_message_buses(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus> #list_message_buses(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>

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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>

    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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>

    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.



2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2113

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|
    result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_message_buses, "message_buses", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_pipelines(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline> #list_pipelines(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>

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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>

    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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>

    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.



3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3137

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|
    result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_pipelines, "pipelines", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_providers(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider> #list_providers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>

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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>

    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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>

    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.



1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1423

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|
    result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_providers, "providers", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_triggers(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger> #list_triggers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>

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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>

    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) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>

    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.



504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 504

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|
    result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_triggers, "triggers", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


354
355
356
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 354

def logger
  @eventarc_stub.logger
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.



1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1156

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?
    throw :response, 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.



2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2861

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?
    throw :response, 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.



3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3797

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?
    throw :response, 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.



1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 1935

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?
  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.



2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 2393

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?
    throw :response, 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.



3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 3328

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?
    throw :response, 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.



695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/google/cloud/eventarc/v1/eventarc/rest/client.rb', line 695

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?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end