• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?php
2# Generated by the protocol buffer compiler.  DO NOT EDIT!
3# source: src/proto/grpc/testing/messages.proto
4
5namespace Grpc\Testing;
6
7use Google\Protobuf\Internal\GPBType;
8use Google\Protobuf\Internal\RepeatedField;
9use Google\Protobuf\Internal\GPBUtil;
10
11/**
12 * Metrics data the server will update and send to the client. It mirrors orca load report
13 * https://github.com/cncf/xds/blob/eded343319d09f30032952beda9840bbd3dcf7ac/xds/data/orca/v3/orca_load_report.proto#L15,
14 * but avoids orca dependency. Used by both per-query and out-of-band reporting tests.
15 *
16 * Generated from protobuf message <code>grpc.testing.TestOrcaReport</code>
17 */
18class TestOrcaReport extends \Google\Protobuf\Internal\Message
19{
20    /**
21     * Generated from protobuf field <code>double cpu_utilization = 1;</code>
22     */
23    protected $cpu_utilization = 0.0;
24    /**
25     * Generated from protobuf field <code>double memory_utilization = 2;</code>
26     */
27    protected $memory_utilization = 0.0;
28    /**
29     * Generated from protobuf field <code>map<string, double> request_cost = 3;</code>
30     */
31    private $request_cost;
32    /**
33     * Generated from protobuf field <code>map<string, double> utilization = 4;</code>
34     */
35    private $utilization;
36
37    /**
38     * Constructor.
39     *
40     * @param array $data {
41     *     Optional. Data for populating the Message object.
42     *
43     *     @type float $cpu_utilization
44     *     @type float $memory_utilization
45     *     @type array|\Google\Protobuf\Internal\MapField $request_cost
46     *     @type array|\Google\Protobuf\Internal\MapField $utilization
47     * }
48     */
49    public function __construct($data = NULL) {
50        \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
51        parent::__construct($data);
52    }
53
54    /**
55     * Generated from protobuf field <code>double cpu_utilization = 1;</code>
56     * @return float
57     */
58    public function getCpuUtilization()
59    {
60        return $this->cpu_utilization;
61    }
62
63    /**
64     * Generated from protobuf field <code>double cpu_utilization = 1;</code>
65     * @param float $var
66     * @return $this
67     */
68    public function setCpuUtilization($var)
69    {
70        GPBUtil::checkDouble($var);
71        $this->cpu_utilization = $var;
72
73        return $this;
74    }
75
76    /**
77     * Generated from protobuf field <code>double memory_utilization = 2;</code>
78     * @return float
79     */
80    public function getMemoryUtilization()
81    {
82        return $this->memory_utilization;
83    }
84
85    /**
86     * Generated from protobuf field <code>double memory_utilization = 2;</code>
87     * @param float $var
88     * @return $this
89     */
90    public function setMemoryUtilization($var)
91    {
92        GPBUtil::checkDouble($var);
93        $this->memory_utilization = $var;
94
95        return $this;
96    }
97
98    /**
99     * Generated from protobuf field <code>map<string, double> request_cost = 3;</code>
100     * @return \Google\Protobuf\Internal\MapField
101     */
102    public function getRequestCost()
103    {
104        return $this->request_cost;
105    }
106
107    /**
108     * Generated from protobuf field <code>map<string, double> request_cost = 3;</code>
109     * @param array|\Google\Protobuf\Internal\MapField $var
110     * @return $this
111     */
112    public function setRequestCost($var)
113    {
114        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE);
115        $this->request_cost = $arr;
116
117        return $this;
118    }
119
120    /**
121     * Generated from protobuf field <code>map<string, double> utilization = 4;</code>
122     * @return \Google\Protobuf\Internal\MapField
123     */
124    public function getUtilization()
125    {
126        return $this->utilization;
127    }
128
129    /**
130     * Generated from protobuf field <code>map<string, double> utilization = 4;</code>
131     * @param array|\Google\Protobuf\Internal\MapField $var
132     * @return $this
133     */
134    public function setUtilization($var)
135    {
136        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE);
137        $this->utilization = $arr;
138
139        return $this;
140    }
141
142}
143
144