Class: Google::Apis::MonitoringV1::Threshold
- Inherits:
-
Object
- Object
- Google::Apis::MonitoringV1::Threshold
- 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
-
#color ⇒ String
The state color for this threshold.
-
#direction ⇒ String
The direction for the current threshold.
-
#label ⇒ String
A label for the threshold.
-
#value ⇒ Float
The value of the threshold.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Threshold
constructor
A new instance of Threshold.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Threshold
Returns a new instance of Threshold.
933 934 935 |
# File 'generated/google/apis/monitoring_v1/classes.rb', line 933 def initialize(**args) update!(**args) end |
Instance Attribute Details
#color ⇒ String
The state color for this threshold. Color is not allowed in a XyChart.
Corresponds to the JSON property color
915 916 917 |
# File 'generated/google/apis/monitoring_v1/classes.rb', line 915 def color @color end |
#direction ⇒ String
The direction for the current threshold. Direction is not allowed in a XyChart.
Corresponds to the JSON property direction
920 921 922 |
# File 'generated/google/apis/monitoring_v1/classes.rb', line 920 def direction @direction end |
#label ⇒ String
A label for the threshold.
Corresponds to the JSON property label
925 926 927 |
# File 'generated/google/apis/monitoring_v1/classes.rb', line 925 def label @label end |
#value ⇒ Float
The value of the threshold. The value should be defined in the native scale of
the metric.
Corresponds to the JSON property value
931 932 933 |
# File 'generated/google/apis/monitoring_v1/classes.rb', line 931 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
938 939 940 941 942 943 |
# File 'generated/google/apis/monitoring_v1/classes.rb', line 938 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 |