Class: Google::Apis::ContainerV1::Metric

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

Overview

Progress metric is (string, int|float|string) pair.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Metric

Returns a new instance of Metric.



2573
2574
2575
# File 'lib/google/apis/container_v1/classes.rb', line 2573

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

Instance Attribute Details

#double_valueFloat

For metrics with floating point value. Corresponds to the JSON property doubleValue

Returns:

  • (Float)


2556
2557
2558
# File 'lib/google/apis/container_v1/classes.rb', line 2556

def double_value
  @double_value
end

#int_valueFixnum

For metrics with integer value. Corresponds to the JSON property intValue

Returns:

  • (Fixnum)


2561
2562
2563
# File 'lib/google/apis/container_v1/classes.rb', line 2561

def int_value
  @int_value
end

#nameString

Required. Metric name, e.g., "nodes total", "percent done". Corresponds to the JSON property name

Returns:

  • (String)


2566
2567
2568
# File 'lib/google/apis/container_v1/classes.rb', line 2566

def name
  @name
end

#string_valueString

For metrics with custom values (ratios, visual progress, etc.). Corresponds to the JSON property stringValue

Returns:

  • (String)


2571
2572
2573
# File 'lib/google/apis/container_v1/classes.rb', line 2571

def string_value
  @string_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2578
2579
2580
2581
2582
2583
# File 'lib/google/apis/container_v1/classes.rb', line 2578

def update!(**args)
  @double_value = args[:double_value] if args.key?(:double_value)
  @int_value = args[:int_value] if args.key?(:int_value)
  @name = args[:name] if args.key?(:name)
  @string_value = args[:string_value] if args.key?(:string_value)
end