Class: Google::Apis::ServicecontrolV1::LinearBuckets

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

Describing buckets with constant width.

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

Returns a new instance of LinearBuckets.



1100
1101
1102
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1100

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

Instance Attribute Details

#num_finite_bucketsFixnum

The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is num_finite_buckets + 2. See comments on bucket_options for details. Corresponds to the JSON property numFiniteBuckets

Returns:

  • (Fixnum)


1083
1084
1085
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1083

def num_finite_buckets
  @num_finite_buckets
end

#offsetFloat

The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive. Corresponds to the JSON property offset

Returns:

  • (Float)


1090
1091
1092
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1090

def offset
  @offset
end

#widthFloat

The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive. Must be strictly positive. Corresponds to the JSON property width

Returns:

  • (Float)


1098
1099
1100
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1098

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1105
1106
1107
1108
1109
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1105

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