• 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 params based on grpc/support/histogram.c
13 *
14 * Generated from protobuf message <code>grpc.testing.HistogramParams</code>
15 */
16class HistogramParams extends \Google\Protobuf\Internal\Message
17{
18    /**
19     * first bucket is [0, 1 + resolution)
20     *
21     * Generated from protobuf field <code>double resolution = 1;</code>
22     */
23    protected $resolution = 0.0;
24    /**
25     * use enough buckets to allow this value
26     *
27     * Generated from protobuf field <code>double max_possible = 2;</code>
28     */
29    protected $max_possible = 0.0;
30
31    /**
32     * Constructor.
33     *
34     * @param array $data {
35     *     Optional. Data for populating the Message object.
36     *
37     *     @type float $resolution
38     *           first bucket is [0, 1 + resolution)
39     *     @type float $max_possible
40     *           use enough buckets to allow this value
41     * }
42     */
43    public function __construct($data = NULL) {
44        \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
45        parent::__construct($data);
46    }
47
48    /**
49     * first bucket is [0, 1 + resolution)
50     *
51     * Generated from protobuf field <code>double resolution = 1;</code>
52     * @return float
53     */
54    public function getResolution()
55    {
56        return $this->resolution;
57    }
58
59    /**
60     * first bucket is [0, 1 + resolution)
61     *
62     * Generated from protobuf field <code>double resolution = 1;</code>
63     * @param float $var
64     * @return $this
65     */
66    public function setResolution($var)
67    {
68        GPBUtil::checkDouble($var);
69        $this->resolution = $var;
70
71        return $this;
72    }
73
74    /**
75     * use enough buckets to allow this value
76     *
77     * Generated from protobuf field <code>double max_possible = 2;</code>
78     * @return float
79     */
80    public function getMaxPossible()
81    {
82        return $this->max_possible;
83    }
84
85    /**
86     * use enough buckets to allow this value
87     *
88     * Generated from protobuf field <code>double max_possible = 2;</code>
89     * @param float $var
90     * @return $this
91     */
92    public function setMaxPossible($var)
93    {
94        GPBUtil::checkDouble($var);
95        $this->max_possible = $var;
96
97        return $this;
98    }
99
100}
101
102