Class: Google::Apis::MonitoringV3::LabelDescriptor

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

Overview

A description of a label.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LabelDescriptor

Returns a new instance of LabelDescriptor.



2223
2224
2225
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2223

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

Instance Attribute Details

#descriptionString

A human-readable description for the label. Corresponds to the JSON property description

Returns:

  • (String)


2208
2209
2210
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2208

def description
  @description
end

#keyString

The key for this label. The key must meet the following criteria: Does not exceed 100 characters. Matches the following regular expression: [a-zA-Z][a-zA- Z0-9_]* The first character must be an upper- or lower-case letter. The remaining characters must be letters, digits, or underscores. Corresponds to the JSON property key

Returns:

  • (String)


2216
2217
2218
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2216

def key
  @key
end

#value_typeString

The type of data that can be assigned to the label. Corresponds to the JSON property valueType

Returns:

  • (String)


2221
2222
2223
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2221

def value_type
  @value_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2228
2229
2230
2231
2232
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2228

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @key = args[:key] if args.key?(:key)
  @value_type = args[:value_type] if args.key?(:value_type)
end