• 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.ChannelArg</code>
13 */
14class ChannelArg extends \Google\Protobuf\Internal\Message
15{
16    /**
17     * Generated from protobuf field <code>string name = 1;</code>
18     */
19    protected $name = '';
20    protected $value;
21
22    /**
23     * Constructor.
24     *
25     * @param array $data {
26     *     Optional. Data for populating the Message object.
27     *
28     *     @type string $name
29     *     @type string $str_value
30     *     @type int $int_value
31     * }
32     */
33    public function __construct($data = NULL) {
34        \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
35        parent::__construct($data);
36    }
37
38    /**
39     * Generated from protobuf field <code>string name = 1;</code>
40     * @return string
41     */
42    public function getName()
43    {
44        return $this->name;
45    }
46
47    /**
48     * Generated from protobuf field <code>string name = 1;</code>
49     * @param string $var
50     * @return $this
51     */
52    public function setName($var)
53    {
54        GPBUtil::checkString($var, True);
55        $this->name = $var;
56
57        return $this;
58    }
59
60    /**
61     * Generated from protobuf field <code>string str_value = 2;</code>
62     * @return string
63     */
64    public function getStrValue()
65    {
66        return $this->readOneof(2);
67    }
68
69    /**
70     * Generated from protobuf field <code>string str_value = 2;</code>
71     * @param string $var
72     * @return $this
73     */
74    public function setStrValue($var)
75    {
76        GPBUtil::checkString($var, True);
77        $this->writeOneof(2, $var);
78
79        return $this;
80    }
81
82    /**
83     * Generated from protobuf field <code>int32 int_value = 3;</code>
84     * @return int
85     */
86    public function getIntValue()
87    {
88        return $this->readOneof(3);
89    }
90
91    /**
92     * Generated from protobuf field <code>int32 int_value = 3;</code>
93     * @param int $var
94     * @return $this
95     */
96    public function setIntValue($var)
97    {
98        GPBUtil::checkInt32($var);
99        $this->writeOneof(3, $var);
100
101        return $this;
102    }
103
104    /**
105     * @return string
106     */
107    public function getValue()
108    {
109        return $this->whichOneof("value");
110    }
111
112}
113
114