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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/monitoring_v3/classes.rb,
lib/google/apis/monitoring_v3/representations.rb,
lib/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

Constructor Details

#initialize(**args) ⇒ Trigger

Returns a new instance of Trigger.



4732
4733
4734
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4732

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)


4724
4725
4726
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4724

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)


4730
4731
4732
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4730

def percent
  @percent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4737
4738
4739
4740
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4737

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