Class: Google::Apis::ApigeeV1::GoogleCloudApigeeV1Metric

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

Overview

This message type encapsulates the metric data point. Example: "name": "sum( message_count)", "values" : [ "timestamp": 1549004400000, "value": "39.0" , "timestamp" : 1548997200000, "value" : "0.0" ] or "name": "sum( message_count)", "values" : ["39.0"]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudApigeeV1Metric

Returns a new instance of GoogleCloudApigeeV1Metric.



4537
4538
4539
# File 'lib/google/apis/apigee_v1/classes.rb', line 4537

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

Instance Attribute Details

#nameString

This field contains the metric name. Corresponds to the JSON property name

Returns:

  • (String)


4529
4530
4531
# File 'lib/google/apis/apigee_v1/classes.rb', line 4529

def name
  @name
end

#valuesArray<Object>

List of metric values. Possible value format: "values":["39.0"] or "values":[ "value": "39.0", "timestamp": 1232434354 ] Corresponds to the JSON property values

Returns:

  • (Array<Object>)


4535
4536
4537
# File 'lib/google/apis/apigee_v1/classes.rb', line 4535

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4542
4543
4544
4545
# File 'lib/google/apis/apigee_v1/classes.rb', line 4542

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