• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    protected $min_seen = 0.0;
26    /**
27     * Generated from protobuf field <code>double max_seen = 3;</code>
28     */
29    protected $max_seen = 0.0;
30    /**
31     * Generated from protobuf field <code>double sum = 4;</code>
32     */
33    protected $sum = 0.0;
34    /**
35     * Generated from protobuf field <code>double sum_of_squares = 5;</code>
36     */
37    protected $sum_of_squares = 0.0;
38    /**
39     * Generated from protobuf field <code>double count = 6;</code>
40     */
41    protected $count = 0.0;
42
43    /**
44     * Constructor.
45     *
46     * @param array $data {
47     *     Optional. Data for populating the Message object.
48     *
49     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $bucket
50     *     @type float $min_seen
51     *     @type float $max_seen
52     *     @type float $sum
53     *     @type float $sum_of_squares
54     *     @type float $count
55     * }
56     */
57    public function __construct($data = NULL) {
58        \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
59        parent::__construct($data);
60    }
61
62    /**
63     * Generated from protobuf field <code>repeated uint32 bucket = 1;</code>
64     * @return \Google\Protobuf\Internal\RepeatedField
65     */
66    public function getBucket()
67    {
68        return $this->bucket;
69    }
70
71    /**
72     * Generated from protobuf field <code>repeated uint32 bucket = 1;</code>
73     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
74     * @return $this
75     */
76    public function setBucket($var)
77    {
78        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32);
79        $this->bucket = $arr;
80
81        return $this;
82    }
83
84    /**
85     * Generated from protobuf field <code>double min_seen = 2;</code>
86     * @return float
87     */
88    public function getMinSeen()
89    {
90        return $this->min_seen;
91    }
92
93    /**
94     * Generated from protobuf field <code>double min_seen = 2;</code>
95     * @param float $var
96     * @return $this
97     */
98    public function setMinSeen($var)
99    {
100        GPBUtil::checkDouble($var);
101        $this->min_seen = $var;
102
103        return $this;
104    }
105
106    /**
107     * Generated from protobuf field <code>double max_seen = 3;</code>
108     * @return float
109     */
110    public function getMaxSeen()
111    {
112        return $this->max_seen;
113    }
114
115    /**
116     * Generated from protobuf field <code>double max_seen = 3;</code>
117     * @param float $var
118     * @return $this
119     */
120    public function setMaxSeen($var)
121    {
122        GPBUtil::checkDouble($var);
123        $this->max_seen = $var;
124
125        return $this;
126    }
127
128    /**
129     * Generated from protobuf field <code>double sum = 4;</code>
130     * @return float
131     */
132    public function getSum()
133    {
134        return $this->sum;
135    }
136
137    /**
138     * Generated from protobuf field <code>double sum = 4;</code>
139     * @param float $var
140     * @return $this
141     */
142    public function setSum($var)
143    {
144        GPBUtil::checkDouble($var);
145        $this->sum = $var;
146
147        return $this;
148    }
149
150    /**
151     * Generated from protobuf field <code>double sum_of_squares = 5;</code>
152     * @return float
153     */
154    public function getSumOfSquares()
155    {
156        return $this->sum_of_squares;
157    }
158
159    /**
160     * Generated from protobuf field <code>double sum_of_squares = 5;</code>
161     * @param float $var
162     * @return $this
163     */
164    public function setSumOfSquares($var)
165    {
166        GPBUtil::checkDouble($var);
167        $this->sum_of_squares = $var;
168
169        return $this;
170    }
171
172    /**
173     * Generated from protobuf field <code>double count = 6;</code>
174     * @return float
175     */
176    public function getCount()
177    {
178        return $this->count;
179    }
180
181    /**
182     * Generated from protobuf field <code>double count = 6;</code>
183     * @param float $var
184     * @return $this
185     */
186    public function setCount($var)
187    {
188        GPBUtil::checkDouble($var);
189        $this->count = $var;
190
191        return $this;
192    }
193
194}
195
196