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



226
227
228
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 226

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/firebase.database/eventTypes/data.write Corresponds to the JSON property eventType

Returns:

  • (String)


209
210
211
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 209

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



215
216
217
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 215

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)


224
225
226
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 224

def resource
  @resource
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



231
232
233
234
235
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 231

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)
end