Class: Google::Apis::EventarcV1::EventFilter

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

Overview

Filters events based on exact matches on the CloudEvents attributes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EventFilter

Returns a new instance of EventFilter.



473
474
475
# File 'lib/google/apis/eventarc_v1/classes.rb', line 473

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

Instance Attribute Details

#attributeString

Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. You can retrieve a specific provider' s supported event types. All triggers MUST provide a filter for the 'type' attribute. Corresponds to the JSON property attribute

Returns:

  • (String)


458
459
460
# File 'lib/google/apis/eventarc_v1/classes.rb', line 458

def attribute
  @attribute
end

#operatorString

Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The allowed values are path_pattern and match-path-pattern. path_pattern is only allowed for GCFv1 triggers. Corresponds to the JSON property operator

Returns:

  • (String)


466
467
468
# File 'lib/google/apis/eventarc_v1/classes.rb', line 466

def operator
  @operator
end

#valueString

Required. The value for the attribute. Corresponds to the JSON property value

Returns:

  • (String)


471
472
473
# File 'lib/google/apis/eventarc_v1/classes.rb', line 471

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



478
479
480
481
482
# File 'lib/google/apis/eventarc_v1/classes.rb', line 478

def update!(**args)
  @attribute = args[:attribute] if args.key?(:attribute)
  @operator = args[:operator] if args.key?(:operator)
  @value = args[:value] if args.key?(:value)
end