• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?php
2# Generated by the protocol buffer compiler.  DO NOT EDIT!
3# source: google/protobuf/descriptor.proto
4
5namespace Google\Protobuf\Internal;
6
7use Google\Protobuf\Internal\GPBType;
8use Google\Protobuf\Internal\GPBWire;
9use Google\Protobuf\Internal\RepeatedField;
10use Google\Protobuf\Internal\InputStream;
11use Google\Protobuf\Internal\GPBUtil;
12
13/**
14 * Describes a method of a service.
15 *
16 * Generated from protobuf message <code>google.protobuf.MethodDescriptorProto</code>
17 */
18class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
19{
20    /**
21     * Generated from protobuf field <code>optional string name = 1;</code>
22     */
23    private $name = '';
24    private $has_name = false;
25    /**
26     * Input and output type names.  These are resolved in the same way as
27     * FieldDescriptorProto.type_name, but must refer to a message type.
28     *
29     * Generated from protobuf field <code>optional string input_type = 2;</code>
30     */
31    private $input_type = '';
32    private $has_input_type = false;
33    /**
34     * Generated from protobuf field <code>optional string output_type = 3;</code>
35     */
36    private $output_type = '';
37    private $has_output_type = false;
38    /**
39     * Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
40     */
41    private $options = null;
42    private $has_options = false;
43    /**
44     * Identifies if client streams multiple client messages
45     *
46     * Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
47     */
48    private $client_streaming = false;
49    private $has_client_streaming = false;
50    /**
51     * Identifies if server streams multiple server messages
52     *
53     * Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
54     */
55    private $server_streaming = false;
56    private $has_server_streaming = false;
57
58    /**
59     * Constructor.
60     *
61     * @param array $data {
62     *     Optional. Data for populating the Message object.
63     *
64     *     @type string $name
65     *     @type string $input_type
66     *           Input and output type names.  These are resolved in the same way as
67     *           FieldDescriptorProto.type_name, but must refer to a message type.
68     *     @type string $output_type
69     *     @type \Google\Protobuf\Internal\MethodOptions $options
70     *     @type bool $client_streaming
71     *           Identifies if client streams multiple client messages
72     *     @type bool $server_streaming
73     *           Identifies if server streams multiple server messages
74     * }
75     */
76    public function __construct($data = NULL) {
77        \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
78        parent::__construct($data);
79    }
80
81    /**
82     * Generated from protobuf field <code>optional string name = 1;</code>
83     * @return string
84     */
85    public function getName()
86    {
87        return $this->name;
88    }
89
90    /**
91     * Generated from protobuf field <code>optional string name = 1;</code>
92     * @param string $var
93     * @return $this
94     */
95    public function setName($var)
96    {
97        GPBUtil::checkString($var, True);
98        $this->name = $var;
99        $this->has_name = true;
100
101        return $this;
102    }
103
104    public function hasName()
105    {
106        return $this->has_name;
107    }
108
109    /**
110     * Input and output type names.  These are resolved in the same way as
111     * FieldDescriptorProto.type_name, but must refer to a message type.
112     *
113     * Generated from protobuf field <code>optional string input_type = 2;</code>
114     * @return string
115     */
116    public function getInputType()
117    {
118        return $this->input_type;
119    }
120
121    /**
122     * Input and output type names.  These are resolved in the same way as
123     * FieldDescriptorProto.type_name, but must refer to a message type.
124     *
125     * Generated from protobuf field <code>optional string input_type = 2;</code>
126     * @param string $var
127     * @return $this
128     */
129    public function setInputType($var)
130    {
131        GPBUtil::checkString($var, True);
132        $this->input_type = $var;
133        $this->has_input_type = true;
134
135        return $this;
136    }
137
138    public function hasInputType()
139    {
140        return $this->has_input_type;
141    }
142
143    /**
144     * Generated from protobuf field <code>optional string output_type = 3;</code>
145     * @return string
146     */
147    public function getOutputType()
148    {
149        return $this->output_type;
150    }
151
152    /**
153     * Generated from protobuf field <code>optional string output_type = 3;</code>
154     * @param string $var
155     * @return $this
156     */
157    public function setOutputType($var)
158    {
159        GPBUtil::checkString($var, True);
160        $this->output_type = $var;
161        $this->has_output_type = true;
162
163        return $this;
164    }
165
166    public function hasOutputType()
167    {
168        return $this->has_output_type;
169    }
170
171    /**
172     * Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
173     * @return \Google\Protobuf\Internal\MethodOptions
174     */
175    public function getOptions()
176    {
177        return $this->options;
178    }
179
180    /**
181     * Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
182     * @param \Google\Protobuf\Internal\MethodOptions $var
183     * @return $this
184     */
185    public function setOptions($var)
186    {
187        GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MethodOptions::class);
188        $this->options = $var;
189        $this->has_options = true;
190
191        return $this;
192    }
193
194    public function hasOptions()
195    {
196        return $this->has_options;
197    }
198
199    /**
200     * Identifies if client streams multiple client messages
201     *
202     * Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
203     * @return bool
204     */
205    public function getClientStreaming()
206    {
207        return $this->client_streaming;
208    }
209
210    /**
211     * Identifies if client streams multiple client messages
212     *
213     * Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
214     * @param bool $var
215     * @return $this
216     */
217    public function setClientStreaming($var)
218    {
219        GPBUtil::checkBool($var);
220        $this->client_streaming = $var;
221        $this->has_client_streaming = true;
222
223        return $this;
224    }
225
226    public function hasClientStreaming()
227    {
228        return $this->has_client_streaming;
229    }
230
231    /**
232     * Identifies if server streams multiple server messages
233     *
234     * Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
235     * @return bool
236     */
237    public function getServerStreaming()
238    {
239        return $this->server_streaming;
240    }
241
242    /**
243     * Identifies if server streams multiple server messages
244     *
245     * Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
246     * @param bool $var
247     * @return $this
248     */
249    public function setServerStreaming($var)
250    {
251        GPBUtil::checkBool($var);
252        $this->server_streaming = $var;
253        $this->has_server_streaming = true;
254
255        return $this;
256    }
257
258    public function hasServerStreaming()
259    {
260        return $this->has_server_streaming;
261    }
262
263}
264
265