0) is the same as the upper bound of bucket i - 1.
* The buckets span the whole range of finite values: lower bound of the
* underflow bucket is -infinity and the upper bound of the overflow bucket is
* +infinity. The finite buckets are so-called because both bounds are
* finite.
* `BucketOptions` describes bucket boundaries in one of three ways. Two
* describe the boundaries by giving parameters for a formula to generate
* boundaries and one gives the bucket boundaries explicitly.
* If `bucket_boundaries` is not given, then no `bucket_counts` may be given.
*
* Generated from protobuf message google.api.Distribution.BucketOptions
*/
class BucketOptions extends \Google\Protobuf\Internal\Message
{
protected $options;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Google\Api\Distribution\BucketOptions\Linear $linear_buckets
* The linear bucket.
* @type \Google\Api\Distribution\BucketOptions\Exponential $exponential_buckets
* The exponential buckets.
* @type \Google\Api\Distribution\BucketOptions\Explicit $explicit_buckets
* The explicit buckets.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Api\Distribution::initOnce();
parent::__construct($data);
}
/**
* The linear bucket.
*
* Generated from protobuf field .google.api.Distribution.BucketOptions.Linear linear_buckets = 1;
* @return \Google\Api\Distribution\BucketOptions\Linear
*/
public function getLinearBuckets()
{
return $this->readOneof(1);
}
/**
* The linear bucket.
*
* Generated from protobuf field .google.api.Distribution.BucketOptions.Linear linear_buckets = 1;
* @param \Google\Api\Distribution\BucketOptions\Linear $var
* @return $this
*/
public function setLinearBuckets($var)
{
GPBUtil::checkMessage($var, \Google\Api\Distribution_BucketOptions_Linear::class);
$this->writeOneof(1, $var);
return $this;
}
/**
* The exponential buckets.
*
* Generated from protobuf field .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;
* @return \Google\Api\Distribution\BucketOptions\Exponential
*/
public function getExponentialBuckets()
{
return $this->readOneof(2);
}
/**
* The exponential buckets.
*
* Generated from protobuf field .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;
* @param \Google\Api\Distribution\BucketOptions\Exponential $var
* @return $this
*/
public function setExponentialBuckets($var)
{
GPBUtil::checkMessage($var, \Google\Api\Distribution_BucketOptions_Exponential::class);
$this->writeOneof(2, $var);
return $this;
}
/**
* The explicit buckets.
*
* Generated from protobuf field .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;
* @return \Google\Api\Distribution\BucketOptions\Explicit
*/
public function getExplicitBuckets()
{
return $this->readOneof(3);
}
/**
* The explicit buckets.
*
* Generated from protobuf field .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;
* @param \Google\Api\Distribution\BucketOptions\Explicit $var
* @return $this
*/
public function setExplicitBuckets($var)
{
GPBUtil::checkMessage($var, \Google\Api\Distribution_BucketOptions_Explicit::class);
$this->writeOneof(3, $var);
return $this;
}
/**
* @return string
*/
public function getOptions()
{
return $this->whichOneof("options");
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BucketOptions::class, \Google\Api\Distribution_BucketOptions::class);