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
Name
Description
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
Type
Description
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
Name
Description
var
int
Returns
Type
Description
$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
Type
Description
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
Name
Description
var
float
Returns
Type
Description
$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
Type
Description
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Service Control V1 Client - Class LinearBuckets (2.0.4)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.4 (latest)](/php/docs/reference/cloud-service-control/latest/V1.Distribution.LinearBuckets)\n- [2.0.3](/php/docs/reference/cloud-service-control/2.0.3/V1.Distribution.LinearBuckets)\n- [1.4.4](/php/docs/reference/cloud-service-control/1.4.4/V1.Distribution.LinearBuckets)\n- [1.3.0](/php/docs/reference/cloud-service-control/1.3.0/V1.Distribution.LinearBuckets)\n- [1.2.1](/php/docs/reference/cloud-service-control/1.2.1/V1.Distribution.LinearBuckets)\n- [1.1.1](/php/docs/reference/cloud-service-control/1.1.1/V1.Distribution.LinearBuckets)\n- [1.0.6](/php/docs/reference/cloud-service-control/1.0.6/V1.Distribution.LinearBuckets) \nReference documentation and code samples for the Google Cloud Service Control V1 Client class LinearBuckets.\n\nDescribing buckets with constant width.\n\nGenerated from protobuf message `google.api.servicecontrol.v1.Distribution.LinearBuckets`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ServiceControl \\\\ V1 \\\\ Distribution\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getNumFiniteBuckets\n\nThe number of finite buckets. With the underflow and overflow buckets,\nthe total number of buckets is `num_finite_buckets` + 2.\n\nSee comments on `bucket_options` for details.\n\n### setNumFiniteBuckets\n\nThe number of finite buckets. With the underflow and overflow buckets,\nthe total number of buckets is `num_finite_buckets` + 2.\n\nSee comments on `bucket_options` for details.\n\n### getWidth\n\nThe i'th linear bucket covers the interval\n\\[offset + (i-1) \\* width, offset + i \\* width)\nwhere i ranges from 1 to num_finite_buckets, inclusive.\n\nMust be strictly positive.\n\n### setWidth\n\nThe i'th linear bucket covers the interval\n\\[offset + (i-1) \\* width, offset + i \\* width)\nwhere i ranges from 1 to num_finite_buckets, inclusive.\n\nMust be strictly positive.\n\n### getOffset\n\nThe i'th linear bucket covers the interval\n\\[offset + (i-1) \\* width, offset + i \\* width)\nwhere i ranges from 1 to num_finite_buckets, inclusive.\n\n### setOffset\n\nThe i'th linear bucket covers the interval\n\\[offset + (i-1) \\* width, offset + i \\* width)\nwhere i ranges from 1 to num_finite_buckets, inclusive."]]