Class: Google::Apis::MonitoringV3::Linear

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

Overview

Specify a sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with these boundaries for bucket i:Upper bound (0 <= i < N-1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)).

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) ⇒ Linear

Returns a new instance of Linear



585
586
587
# File 'generated/google/apis/monitoring_v3/classes.rb', line 585

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

Instance Attribute Details

#num_finite_bucketsFixnum

Must be greater than 0. Corresponds to the JSON property numFiniteBuckets

Returns:

  • (Fixnum)


578
579
580
# File 'generated/google/apis/monitoring_v3/classes.rb', line 578

def num_finite_buckets
  @num_finite_buckets
end

#offsetFloat

Lower bound of the first bucket. Corresponds to the JSON property offset

Returns:

  • (Float)


573
574
575
# File 'generated/google/apis/monitoring_v3/classes.rb', line 573

def offset
  @offset
end

#widthFloat

Must be greater than 0. Corresponds to the JSON property width

Returns:

  • (Float)


583
584
585
# File 'generated/google/apis/monitoring_v3/classes.rb', line 583

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



590
591
592
593
594
# File 'generated/google/apis/monitoring_v3/classes.rb', line 590

def update!(**args)
  @offset = args[:offset] if args.key?(:offset)
  @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
  @width = args[:width] if args.key?(:width)
end