• 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 * Generated from protobuf message <code>grpc.testing.LoadBalancerStatsResponse</code>
13 */
14class LoadBalancerStatsResponse extends \Google\Protobuf\Internal\Message
15{
16    /**
17     * The number of completed RPCs for each peer.
18     *
19     * Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code>
20     */
21    private $rpcs_by_peer;
22    /**
23     * The number of RPCs that failed to record a remote peer.
24     *
25     * Generated from protobuf field <code>int32 num_failures = 2;</code>
26     */
27    protected $num_failures = 0;
28
29    /**
30     * Constructor.
31     *
32     * @param array $data {
33     *     Optional. Data for populating the Message object.
34     *
35     *     @type array|\Google\Protobuf\Internal\MapField $rpcs_by_peer
36     *           The number of completed RPCs for each peer.
37     *     @type int $num_failures
38     *           The number of RPCs that failed to record a remote peer.
39     * }
40     */
41    public function __construct($data = NULL) {
42        \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
43        parent::__construct($data);
44    }
45
46    /**
47     * The number of completed RPCs for each peer.
48     *
49     * Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code>
50     * @return \Google\Protobuf\Internal\MapField
51     */
52    public function getRpcsByPeer()
53    {
54        return $this->rpcs_by_peer;
55    }
56
57    /**
58     * The number of completed RPCs for each peer.
59     *
60     * Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code>
61     * @param array|\Google\Protobuf\Internal\MapField $var
62     * @return $this
63     */
64    public function setRpcsByPeer($var)
65    {
66        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32);
67        $this->rpcs_by_peer = $arr;
68
69        return $this;
70    }
71
72    /**
73     * The number of RPCs that failed to record a remote peer.
74     *
75     * Generated from protobuf field <code>int32 num_failures = 2;</code>
76     * @return int
77     */
78    public function getNumFailures()
79    {
80        return $this->num_failures;
81    }
82
83    /**
84     * The number of RPCs that failed to record a remote peer.
85     *
86     * Generated from protobuf field <code>int32 num_failures = 2;</code>
87     * @param int $var
88     * @return $this
89     */
90    public function setNumFailures($var)
91    {
92        GPBUtil::checkInt32($var);
93        $this->num_failures = $var;
94
95        return $this;
96    }
97
98}
99
100