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

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Threshold

Returns a new instance of Threshold.



2101
2102
2103
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2101

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)


2077
2078
2079
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2077

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)


2082
2083
2084
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2082

def direction
  @direction
end

#labelString

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

Returns:

  • (String)


2087
2088
2089
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2087

def label
  @label
end

#target_axisString

The target axis to use for plotting the threshold. Target axis is not allowed in a Scorecard. Corresponds to the JSON property targetAxis

Returns:

  • (String)


2093
2094
2095
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2093

def target_axis
  @target_axis
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)


2099
2100
2101
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2099

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2106
2107
2108
2109
2110
2111
2112
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2106

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