Class: Google::Apis::CloudfunctionsV1beta2::EventTrigger

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudfunctions_v1beta2/classes.rb,
generated/google/apis/cloudfunctions_v1beta2/representations.rb,
generated/google/apis/cloudfunctions_v1beta2/representations.rb

Overview

Describes EventTrigger, used to request events be sent from another service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ EventTrigger

Returns a new instance of EventTrigger



312
313
314
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 312

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#event_typeString

event_type names contain the service that is sending an event and the kind of event that was fired. Must be of the form providers/*/eventTypes/* e.g. Directly handle a Message published to Google Cloud Pub/Sub providers/cloud.pubsub/eventTypes/topic.publish. Handle an object changing in Google Cloud Storage: providers/cloud.storage/eventTypes/object.change Handle a write to the Firebase Realtime Database: providers/google.firebase.database/eventTypes/ref.write Corresponds to the JSON property eventType

Returns:

  • (String)


287
288
289
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 287

def event_type
  @event_type
end

#failure_policyGoogle::Apis::CloudfunctionsV1beta2::FailurePolicy

Describes the policy in case of function's execution failure. If empty, then defaults to ignoring failures (i.e. not retrying them). Corresponds to the JSON property failurePolicy



293
294
295
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 293

def failure_policy
  @failure_policy
end

#resourceString

Which instance of the source's service should send events. E.g. for Pub/Sub this would be a Pub/Sub topic at projects/*/topics/*. For Google Cloud Storage this would be a bucket at projects/*/buckets/*. For any source that only supports one instance per-project, this should be the name of the project (projects/*) Corresponds to the JSON property resource

Returns:

  • (String)


302
303
304
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 302

def resource
  @resource
end

#serviceString

The hostname of the service that should be observed. If no string is provided, the default service implementing the API will be used. For example, storage.googleapis.com is the default for all event types in the google.storage namespace. Corresponds to the JSON property service

Returns:

  • (String)


310
311
312
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 310

def service
  @service
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



317
318
319
320
321
322
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 317

def update!(**args)
  @event_type = args[:event_type] if args.key?(:event_type)
  @failure_policy = args[:failure_policy] if args.key?(:failure_policy)
  @resource = args[:resource] if args.key?(:resource)
  @service = args[:service] if args.key?(:service)
end