Class: Google::Apis::LoggingV2::Linear
- Inherits:
-
Object
- Object
- Google::Apis::LoggingV2::Linear
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/logging_v2/classes.rb,
lib/google/apis/logging_v2/representations.rb,
lib/google/apis/logging_v2/representations.rb
Overview
Specifies a linear 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.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N- 1): offset + (width * i).Lower bound (1 <= i < N): offset + (width * (i - 1)).
Instance Attribute Summary collapse
-
#num_finite_buckets ⇒ Fixnum
Must be greater than 0.
-
#offset ⇒ Float
Lower bound of the first bucket.
-
#width ⇒ Float
Must be greater than 0.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Linear
constructor
A new instance of Linear.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Linear
Returns a new instance of Linear.
1092 1093 1094 |
# File 'lib/google/apis/logging_v2/classes.rb', line 1092 def initialize(**args) update!(**args) end |
Instance Attribute Details
#num_finite_buckets ⇒ Fixnum
Must be greater than 0.
Corresponds to the JSON property numFiniteBuckets
1080 1081 1082 |
# File 'lib/google/apis/logging_v2/classes.rb', line 1080 def num_finite_buckets @num_finite_buckets end |
#offset ⇒ Float
Lower bound of the first bucket.
Corresponds to the JSON property offset
1085 1086 1087 |
# File 'lib/google/apis/logging_v2/classes.rb', line 1085 def offset @offset end |
#width ⇒ Float
Must be greater than 0.
Corresponds to the JSON property width
1090 1091 1092 |
# File 'lib/google/apis/logging_v2/classes.rb', line 1090 def width @width end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1097 1098 1099 1100 1101 |
# File 'lib/google/apis/logging_v2/classes.rb', line 1097 def update!(**args) @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) @offset = args[:offset] if args.key?(:offset) @width = args[:width] if args.key?(:width) end |