Class: Google::Apis::CloudfunctionsV1beta2::EventTrigger
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::CloudfunctionsV1beta2::EventTrigger
 
- 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
- 
  
    
      #event_type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    event_typenames contain the service that is sending an event and the kind of event that was fired.
- 
  
    
      #failure_policy  ⇒ Google::Apis::CloudfunctionsV1beta2::FailurePolicy 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Describes the policy in case of function's execution failure. 
- 
  
    
      #resource  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Which instance of the source's service should send events. 
- 
  
    
      #service  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The hostname of the service that should be observed. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ EventTrigger 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of EventTrigger. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ EventTrigger
Returns a new instance of EventTrigger
| 262 263 264 | # File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 262 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#event_type ⇒ String
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
| 237 238 239 | # File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 237 def event_type @event_type end | 
#failure_policy ⇒ Google::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
| 243 244 245 | # File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 243 def failure_policy @failure_policy end | 
#resource ⇒ String
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
| 252 253 254 | # File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 252 def resource @resource end | 
#service ⇒ String
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
| 260 261 262 | # File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 260 def service @service end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 267 268 269 270 271 272 | # File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 267 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 |