MethodDescriptorProto.php 7.4 KB

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