Class: Google::Apis::MonitoringV1::Threshold

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

Overview

Defines a threshold for categorizing time series values.

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

Returns a new instance of Threshold.



866
867
868
# File 'generated/google/apis/monitoring_v1/classes.rb', line 866

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

Instance Attribute Details

#colorString

The state color for this threshold. Color is not allowed in a XyChart. Corresponds to the JSON property color

Returns:

  • (String)


848
849
850
# File 'generated/google/apis/monitoring_v1/classes.rb', line 848

def color
  @color
end

#directionString

The direction for the current threshold. Direction is not allowed in a XyChart. Corresponds to the JSON property direction

Returns:

  • (String)


853
854
855
# File 'generated/google/apis/monitoring_v1/classes.rb', line 853

def direction
  @direction
end

#labelString

A label for the threshold. Corresponds to the JSON property label

Returns:

  • (String)


858
859
860
# File 'generated/google/apis/monitoring_v1/classes.rb', line 858

def label
  @label
end

#valueFloat

The value of the threshold. The value should be defined in the native scale of the metric. Corresponds to the JSON property value

Returns:

  • (Float)


864
865
866
# File 'generated/google/apis/monitoring_v1/classes.rb', line 864

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



871
872
873
874
875
876
# File 'generated/google/apis/monitoring_v1/classes.rb', line 871

def update!(**args)
  @color = args[:color] if args.key?(:color)
  @direction = args[:direction] if args.key?(:direction)
  @label = args[:label] if args.key?(:label)
  @value = args[:value] if args.key?(:value)
end