Class: Google::Apis::MonitoringV1::TemplateVariableCondition

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

A condition whose evaluation is based on the value of a template variable.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TemplateVariableCondition

Returns a new instance of TemplateVariableCondition.



2385
2386
2387
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2385

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

Instance Attribute Details

#comparatorString

Comparator to use to evaluate whether the value of the template variable matches the template_variable_value. For example, if the comparator is REGEX_FULL_MATCH, template_variable_value would contain a regex that is matched against the value of the template variable. Corresponds to the JSON property comparator

Returns:

  • (String)


2372
2373
2374
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2372

def comparator
  @comparator
end

#template_variableString

The template variable whose value is evaluated. Corresponds to the JSON property templateVariable

Returns:

  • (String)


2377
2378
2379
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2377

def template_variable
  @template_variable
end

#template_variable_valueString

The value to compare the template variable to. For example, if the comparator is REGEX_FULL_MATCH, this field should contain a regex. Corresponds to the JSON property templateVariableValue

Returns:

  • (String)


2383
2384
2385
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2383

def template_variable_value
  @template_variable_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2390
2391
2392
2393
2394
# File 'lib/google/apis/monitoring_v1/classes.rb', line 2390

def update!(**args)
  @comparator = args[:comparator] if args.key?(:comparator)
  @template_variable = args[:template_variable] if args.key?(:template_variable)
  @template_variable_value = args[:template_variable_value] if args.key?(:template_variable_value)
end