Class: Google::Apis::CloudmonitoringV2beta2::Point

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

Overview

Point is a single point in a time series. It consists of a start time, an end time, and a value.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Point

Returns a new instance of Point.


382
383
384
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 382

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

Instance Attribute Details

#bool_valueBoolean Also known as: bool_value?

The value of this data point. Either “true” or “false”. Corresponds to the JSON property boolValue

Returns:

  • (Boolean)

338
339
340
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 338

def bool_value
  @bool_value
end

#distribution_valueGoogle::Apis::CloudmonitoringV2beta2::PointDistribution

Distribution data point value type. When writing distribution points, try to be consistent with the boundaries of your buckets. If you must modify the bucket boundaries, then do so by merging, partitioning, or appending rather than skewing them. Corresponds to the JSON property distributionValue


347
348
349
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 347

def distribution_value
  @distribution_value
end

#double_valueFloat

The value of this data point as a double-precision floating-point number. Corresponds to the JSON property doubleValue

Returns:

  • (Float)

352
353
354
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 352

def double_value
  @double_value
end

#endDateTime

The interval [start, end] is the time period to which the point’s value applies. For gauge metrics, whose values are instantaneous measurements, this interval should be empty (start should equal end). For cumulative metrics (of which deltas and rates are special cases), the interval should be non-empty. Both start and end are RFC 3339 strings. Corresponds to the JSON property end

Returns:

  • (DateTime)

361
362
363
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 361

def end
  @end
end

#int64_valueString

The value of this data point as a 64-bit integer. Corresponds to the JSON property int64Value

Returns:

  • (String)

366
367
368
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 366

def int64_value
  @int64_value
end

#startDateTime

The interval [start, end] is the time period to which the point’s value applies. For gauge metrics, whose values are instantaneous measurements, this interval should be empty (start should equal end). For cumulative metrics (of which deltas and rates are special cases), the interval should be non-empty. Both start and end are RFC 3339 strings. Corresponds to the JSON property start

Returns:

  • (DateTime)

375
376
377
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 375

def start
  @start
end

#string_valueString

The value of this data point in string format. Corresponds to the JSON property stringValue

Returns:

  • (String)

380
381
382
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 380

def string_value
  @string_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


387
388
389
390
391
392
393
394
395
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 387

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