1<?php
2# Generated by the protocol buffer compiler.  DO NOT EDIT!
3# source: src/proto/grpc/testing/stats.proto
4
5namespace Grpc\Testing;
6
7use Google\Protobuf\Internal\GPBType;
8use Google\Protobuf\Internal\RepeatedField;
9use Google\Protobuf\Internal\GPBUtil;
10
11/**
12 * Histogram data based on grpc/support/histogram.c
13 *
14 * Generated from protobuf message <code>grpc.testing.HistogramData</code>
15 */
16class HistogramData extends \Google\Protobuf\Internal\Message
17{
18    /**
19     * Generated from protobuf field <code>repeated uint32 bucket = 1;</code>
20     */
21    private $bucket;
22    /**
23     * Generated from protobuf field <code>double min_seen = 2;</code>
24     */
25    private $min_seen = 0.0;
26    /**
27     * Generated from protobuf field <code>double max_seen = 3;</code>
28     */
29    private $max_seen = 0.0;
30    /**
31     * Generated from protobuf field <code>double sum = 4;</code>
32     */
33    private $sum = 0.0;
34    /**
35     * Generated from protobuf field <code>double sum_of_squares = 5;</code>
36     */
37    private $sum_of_squares = 0.0;
38    /**
39     * Generated from protobuf field <code>double count = 6;</code>
40     */
41    private $count = 0.0;
42
43    public function __construct() {
44        \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
45        parent::__construct();
46    }
47
48    /**
49     * Generated from protobuf field <code>repeated uint32 bucket = 1;</code>
50     * @return \Google\Protobuf\Internal\RepeatedField
51     */
52    public function getBucket()
53    {
54        return $this->bucket;
55    }
56
57    /**
58     * Generated from protobuf field <code>repeated uint32 bucket = 1;</code>
59     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
60     * @return $this
61     */
62    public function setBucket($var)
63    {
64        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32);
65        $this->bucket = $arr;
66
67        return $this;
68    }
69
70    /**
71     * Generated from protobuf field <code>double min_seen = 2;</code>
72     * @return float
73     */
74    public function getMinSeen()
75    {
76        return $this->min_seen;
77    }
78
79    /**
80     * Generated from protobuf field <code>double min_seen = 2;</code>
81     * @param float $var
82     * @return $this
83     */
84    public function setMinSeen($var)
85    {
86        GPBUtil::checkDouble($var);
87        $this->min_seen = $var;
88
89        return $this;
90    }
91
92    /**
93     * Generated from protobuf field <code>double max_seen = 3;</code>
94     * @return float
95     */
96    public function getMaxSeen()
97    {
98        return $this->max_seen;
99    }
100
101    /**
102     * Generated from protobuf field <code>double max_seen = 3;</code>
103     * @param float $var
104     * @return $this
105     */
106    public function setMaxSeen($var)
107    {
108        GPBUtil::checkDouble($var);
109        $this->max_seen = $var;
110
111        return $this;
112    }
113
114    /**
115     * Generated from protobuf field <code>double sum = 4;</code>
116     * @return float
117     */
118    public function getSum()
119    {
120        return $this->sum;
121    }
122
123    /**
124     * Generated from protobuf field <code>double sum = 4;</code>
125     * @param float $var
126     * @return $this
127     */
128    public function setSum($var)
129    {
130        GPBUtil::checkDouble($var);
131        $this->sum = $var;
132
133        return $this;
134    }
135
136    /**
137     * Generated from protobuf field <code>double sum_of_squares = 5;</code>
138     * @return float
139     */
140    public function getSumOfSquares()
141    {
142        return $this->sum_of_squares;
143    }
144
145    /**
146     * Generated from protobuf field <code>double sum_of_squares = 5;</code>
147     * @param float $var
148     * @return $this
149     */
150    public function setSumOfSquares($var)
151    {
152        GPBUtil::checkDouble($var);
153        $this->sum_of_squares = $var;
154
155        return $this;
156    }
157
158    /**
159     * Generated from protobuf field <code>double count = 6;</code>
160     * @return float
161     */
162    public function getCount()
163    {
164        return $this->count;
165    }
166
167    /**
168     * Generated from protobuf field <code>double count = 6;</code>
169     * @param float $var
170     * @return $this
171     */
172    public function setCount($var)
173    {
174        GPBUtil::checkDouble($var);
175        $this->count = $var;
176
177        return $this;
178    }
179
180}
181
182