summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint/Buckets.php
blob: e1a90a34af781b44e416043e999467e9b401a3f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: opentelemetry/proto/metrics/v1/metrics.proto

namespace Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Buckets are a set of bucket counts, encoded in a contiguous array
 * of counts.
 *
 * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets</code>
 */
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 <code>sint32 offset = 1;</code>
     */
    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 <code>repeated uint64 bucket_counts = 2;</code>
     */
    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 <code>sint32 offset = 1;</code>
     * @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 <code>sint32 offset = 1;</code>
     * @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 <code>repeated uint64 bucket_counts = 2;</code>
     * @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 <code>repeated uint64 bucket_counts = 2;</code>
     * @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);