Class: Google::Apis::RunV1alpha1::TriggerSpec

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

Overview

The desired state of the Trigger.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TriggerSpec

Returns a new instance of TriggerSpec



4076
4077
4078
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4076

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

Instance Attribute Details

#brokerString

Broker is the broker that this trigger receives events from. If not specified, will default to 'default'. Not currently supported by Cloud Run. Corresponds to the JSON property broker

Returns:

  • (String)


4058
4059
4060
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4058

def broker
  @broker
end

#filterGoogle::Apis::RunV1alpha1::TriggerFilter

Filter is the filter to apply against all events from the Broker. Only events that pass this filter will be sent to the Subscriber. If not specified, will default to allowing all events. This must be specified in Cloud Run. Corresponds to the JSON property filter



4066
4067
4068
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4066

def filter
  @filter
end

#subscriberGoogle::Apis::RunV1alpha1::SubscriberSpec

Subscriber is the addressable that receives events from the Broker that pass the Filter. It is required. E.g. https://us-central1-myproject.cloudfunctions.net/myfunction or /namespaces/my-project/services/my-service. Corresponds to the JSON property subscriber



4074
4075
4076
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4074

def subscriber
  @subscriber
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4081
4082
4083
4084
4085
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4081

def update!(**args)
  @broker = args[:broker] if args.key?(:broker)
  @filter = args[:filter] if args.key?(:filter)
  @subscriber = args[:subscriber] if args.key?(:subscriber)
end