Google Cloud Service Control V1 Client - Class LinearBuckets (1.3.0)

Reference documentation and code samples for the Google Cloud Service Control V1 Client class LinearBuckets.

Describing buckets with constant width.

Generated from protobuf message google.api.servicecontrol.v1.Distribution.LinearBuckets

Namespace

Google \ Cloud \ ServiceControl \ V1 \ Distribution

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ num_finite_buckets int

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.

↳ width float

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.

↳ offset float

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.

getNumFiniteBuckets

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.

Returns
TypeDescription
int

setNumFiniteBuckets

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.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getWidth

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.

Returns
TypeDescription
float

setWidth

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.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getOffset

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.

Returns
TypeDescription
float

setOffset

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.

Parameter
NameDescription
var float
Returns
TypeDescription
$this