• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?php
2# Generated by the protocol buffer compiler.  DO NOT EDIT!
3# source: src/proto/grpc/testing/control.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.ServerStatus</code>
13 */
14class ServerStatus extends \Google\Protobuf\Internal\Message
15{
16    /**
17     * Generated from protobuf field <code>.grpc.testing.ServerStats stats = 1;</code>
18     */
19    protected $stats = null;
20    /**
21     * the port bound by the server
22     *
23     * Generated from protobuf field <code>int32 port = 2;</code>
24     */
25    protected $port = 0;
26    /**
27     * Number of cores available to the server
28     *
29     * Generated from protobuf field <code>int32 cores = 3;</code>
30     */
31    protected $cores = 0;
32
33    /**
34     * Constructor.
35     *
36     * @param array $data {
37     *     Optional. Data for populating the Message object.
38     *
39     *     @type \Grpc\Testing\ServerStats $stats
40     *     @type int $port
41     *           the port bound by the server
42     *     @type int $cores
43     *           Number of cores available to the server
44     * }
45     */
46    public function __construct($data = NULL) {
47        \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
48        parent::__construct($data);
49    }
50
51    /**
52     * Generated from protobuf field <code>.grpc.testing.ServerStats stats = 1;</code>
53     * @return \Grpc\Testing\ServerStats
54     */
55    public function getStats()
56    {
57        return $this->stats;
58    }
59
60    /**
61     * Generated from protobuf field <code>.grpc.testing.ServerStats stats = 1;</code>
62     * @param \Grpc\Testing\ServerStats $var
63     * @return $this
64     */
65    public function setStats($var)
66    {
67        GPBUtil::checkMessage($var, \Grpc\Testing\ServerStats::class);
68        $this->stats = $var;
69
70        return $this;
71    }
72
73    /**
74     * the port bound by the server
75     *
76     * Generated from protobuf field <code>int32 port = 2;</code>
77     * @return int
78     */
79    public function getPort()
80    {
81        return $this->port;
82    }
83
84    /**
85     * the port bound by the server
86     *
87     * Generated from protobuf field <code>int32 port = 2;</code>
88     * @param int $var
89     * @return $this
90     */
91    public function setPort($var)
92    {
93        GPBUtil::checkInt32($var);
94        $this->port = $var;
95
96        return $this;
97    }
98
99    /**
100     * Number of cores available to the server
101     *
102     * Generated from protobuf field <code>int32 cores = 3;</code>
103     * @return int
104     */
105    public function getCores()
106    {
107        return $this->cores;
108    }
109
110    /**
111     * Number of cores available to the server
112     *
113     * Generated from protobuf field <code>int32 cores = 3;</code>
114     * @param int $var
115     * @return $this
116     */
117    public function setCores($var)
118    {
119        GPBUtil::checkInt32($var);
120        $this->cores = $var;
121
122        return $this;
123    }
124
125}
126
127