opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets
*/
class Buckets extends \Google\Protobuf\Internal\Message
{
/**
* Offset is the bucket index of the first entry in the bucket_counts array.
*
* Note: This uses a varint encoding as a simple form of compression.
*
* Generated from protobuf field sint32 offset = 1;
*/
protected $offset = 0;
/**
* bucket_counts is an array of count values, where bucket_counts[i] carries
* the count of the bucket at index (offset+i). bucket_counts[i] is the count
* of values greater than base^(offset+i) and less than or equal to
* base^(offset+i+1).
* Note: By contrast, the explicit HistogramDataPoint uses
* fixed64. This field is expected to have many buckets,
* especially zeros, so uint64 has been selected to ensure
* varint encoding.
*
* Generated from protobuf field repeated uint64 bucket_counts = 2;
*/
private $bucket_counts;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $offset
* Offset is the bucket index of the first entry in the bucket_counts array.
*
* Note: This uses a varint encoding as a simple form of compression.
* @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $bucket_counts
* bucket_counts is an array of count values, where bucket_counts[i] carries
* the count of the bucket at index (offset+i). bucket_counts[i] is the count
* of values greater than base^(offset+i) and less than or equal to
* base^(offset+i+1).
* Note: By contrast, the explicit HistogramDataPoint uses
* fixed64. This field is expected to have many buckets,
* especially zeros, so uint64 has been selected to ensure
* varint encoding.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
parent::__construct($data);
}
/**
* Offset is the bucket index of the first entry in the bucket_counts array.
*
* Note: This uses a varint encoding as a simple form of compression.
*
* Generated from protobuf field sint32 offset = 1;
* @return int
*/
public function getOffset()
{
return $this->offset;
}
/**
* Offset is the bucket index of the first entry in the bucket_counts array.
*
* Note: This uses a varint encoding as a simple form of compression.
*
* Generated from protobuf field sint32 offset = 1;
* @param int $var
* @return $this
*/
public function setOffset($var)
{
GPBUtil::checkInt32($var);
$this->offset = $var;
return $this;
}
/**
* bucket_counts is an array of count values, where bucket_counts[i] carries
* the count of the bucket at index (offset+i). bucket_counts[i] is the count
* of values greater than base^(offset+i) and less than or equal to
* base^(offset+i+1).
* Note: By contrast, the explicit HistogramDataPoint uses
* fixed64. This field is expected to have many buckets,
* especially zeros, so uint64 has been selected to ensure
* varint encoding.
*
* Generated from protobuf field repeated uint64 bucket_counts = 2;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getBucketCounts()
{
return $this->bucket_counts;
}
/**
* bucket_counts is an array of count values, where bucket_counts[i] carries
* the count of the bucket at index (offset+i). bucket_counts[i] is the count
* of values greater than base^(offset+i) and less than or equal to
* base^(offset+i+1).
* Note: By contrast, the explicit HistogramDataPoint uses
* fixed64. This field is expected to have many buckets,
* especially zeros, so uint64 has been selected to ensure
* varint encoding.
*
* Generated from protobuf field repeated uint64 bucket_counts = 2;
* @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setBucketCounts($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT64);
$this->bucket_counts = $arr;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Buckets::class, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint_Buckets::class);