Class: Google::Apis::MonitoringV3::Trigger

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

Overview

Specifies how many time series must fail a predicate to trigger a condition. If not specified, then a count: 1 trigger is used.

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) ⇒ Trigger

Returns a new instance of Trigger.



3726
3727
3728
# File 'generated/google/apis/monitoring_v3/classes.rb', line 3726

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

Instance Attribute Details

#countFixnum

The absolute number of time series that must fail the predicate for the condition to be triggered. Corresponds to the JSON property count

Returns:

  • (Fixnum)


3718
3719
3720
# File 'generated/google/apis/monitoring_v3/classes.rb', line 3718

def count
  @count
end

#percentFloat

The percentage of time series that must fail the predicate for the condition to be triggered. Corresponds to the JSON property percent

Returns:

  • (Float)


3724
3725
3726
# File 'generated/google/apis/monitoring_v3/classes.rb', line 3724

def percent
  @percent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3731
3732
3733
3734
# File 'generated/google/apis/monitoring_v3/classes.rb', line 3731

def update!(**args)
  @count = args[:count] if args.key?(:count)
  @percent = args[:percent] if args.key?(:percent)
end