Class: Google::Apis::MonitoringV1::Threshold
- Inherits:
-
Object
- Object
- Google::Apis::MonitoringV1::Threshold
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/monitoring_v1/classes.rb,
lib/google/apis/monitoring_v1/representations.rb,
lib/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.
-
#target_axis ⇒ String
The target axis to use for plotting 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.
2127 2128 2129 |
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2127 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
2103 2104 2105 |
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2103 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
2108 2109 2110 |
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2108 def direction @direction end |
#label ⇒ String
A label for the threshold.
Corresponds to the JSON property label
2113 2114 2115 |
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2113 def label @label end |
#target_axis ⇒ String
The target axis to use for plotting the threshold. Target axis is not allowed
in a Scorecard.
Corresponds to the JSON property targetAxis
2119 2120 2121 |
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2119 def target_axis @target_axis 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
2125 2126 2127 |
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2125 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2132 2133 2134 2135 2136 2137 2138 |
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2132 def update!(**args) @color = args[:color] if args.key?(:color) @direction = args[:direction] if args.key?(:direction) @label = args[:label] if args.key?(:label) @target_axis = args[:target_axis] if args.key?(:target_axis) @value = args[:value] if args.key?(:value) end |