Class: Google::Apis::ServicecontrolV1::MetricValue

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

Overview

Represents a single metric value.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ MetricValue

Returns a new instance of MetricValue



793
794
795
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 793

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

Instance Attribute Details

#bool_valueBoolean Also known as: bool_value?

A boolean value. Corresponds to the JSON property boolValue

Returns:

  • (Boolean)


784
785
786
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 784

def bool_value
  @bool_value
end

#distribution_valueGoogle::Apis::ServicecontrolV1::Distribution

Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information:

  • the arithmetic mean of the samples
  • the minimum and maximum of the samples
  • the sum-squared-deviation of the samples, used to compute variance
  • a histogram of the values of the sample points Corresponds to the JSON property distributionValue


779
780
781
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 779

def distribution_value
  @distribution_value
end

#double_valueFloat

A double precision floating point value. Corresponds to the JSON property doubleValue

Returns:

  • (Float)


763
764
765
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 763

def double_value
  @double_value
end

#end_timeString

The end of the time period over which this metric value's measurement applies. Corresponds to the JSON property endTime

Returns:

  • (String)


791
792
793
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 791

def end_time
  @end_time
end

#int64_valueFixnum

A signed 64-bit integer value. Corresponds to the JSON property int64Value

Returns:

  • (Fixnum)


768
769
770
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 768

def int64_value
  @int64_value
end

#labelsHash<String,String>

The labels describing the metric value. See comments on google.api.servicecontrol.v1.Operation.labels for the overriding relationship. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


753
754
755
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 753

def labels
  @labels
end

#money_valueGoogle::Apis::ServicecontrolV1::Money

Represents an amount of money with its currency type. Corresponds to the JSON property moneyValue



746
747
748
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 746

def money_value
  @money_value
end

#start_timeString

The start of the time period over which this metric value's measurement applies. The time period has different semantics for different metric types (cumulative, delta, and gauge). See the metric definition documentation in the service configuration for details. Corresponds to the JSON property startTime

Returns:

  • (String)


741
742
743
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 741

def start_time
  @start_time
end

#string_valueString

A text string value. Corresponds to the JSON property stringValue

Returns:

  • (String)


758
759
760
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 758

def string_value
  @string_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



798
799
800
801
802
803
804
805
806
807
808
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 798

def update!(**args)
  @start_time = args[:start_time] if args.key?(:start_time)
  @money_value = args[:money_value] if args.key?(:money_value)
  @labels = args[:labels] if args.key?(:labels)
  @string_value = args[:string_value] if args.key?(:string_value)
  @double_value = args[:double_value] if args.key?(:double_value)
  @int64_value = args[:int64_value] if args.key?(:int64_value)
  @distribution_value = args[:distribution_value] if args.key?(:distribution_value)
  @bool_value = args[:bool_value] if args.key?(:bool_value)
  @end_time = args[:end_time] if args.key?(:end_time)
end