MethodDescriptorProto.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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. private $name = '';
  21. private $has_name = false;
  22. /**
  23. * Input and output type names. These are resolved in the same way as
  24. * FieldDescriptorProto.type_name, but must refer to a message type.
  25. *
  26. * Generated from protobuf field <code>optional string input_type = 2;</code>
  27. */
  28. private $input_type = '';
  29. private $has_input_type = false;
  30. /**
  31. * Generated from protobuf field <code>optional string output_type = 3;</code>
  32. */
  33. private $output_type = '';
  34. private $has_output_type = false;
  35. /**
  36. * Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
  37. */
  38. private $options = null;
  39. private $has_options = false;
  40. /**
  41. * Identifies if client streams multiple client messages
  42. *
  43. * Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
  44. */
  45. private $client_streaming = false;
  46. private $has_client_streaming = false;
  47. /**
  48. * Identifies if server streams multiple server messages
  49. *
  50. * Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
  51. */
  52. private $server_streaming = false;
  53. private $has_server_streaming = false;
  54. /**
  55. * Constructor.
  56. *
  57. * @param array $data {
  58. * Optional. Data for populating the Message object.
  59. *
  60. * @type string $name
  61. * @type string $input_type
  62. * Input and output type names. These are resolved in the same way as
  63. * FieldDescriptorProto.type_name, but must refer to a message type.
  64. * @type string $output_type
  65. * @type \Google\Protobuf\Internal\MethodOptions $options
  66. * @type bool $client_streaming
  67. * Identifies if client streams multiple client messages
  68. * @type bool $server_streaming
  69. * Identifies if server streams multiple server messages
  70. * }
  71. */
  72. public function __construct($data = NULL) {
  73. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  74. parent::__construct($data);
  75. }
  76. /**
  77. * Generated from protobuf field <code>optional string name = 1;</code>
  78. * @return string
  79. */
  80. public function getName()
  81. {
  82. return $this->name;
  83. }
  84. /**
  85. * Generated from protobuf field <code>optional string name = 1;</code>
  86. * @param string $var
  87. * @return $this
  88. */
  89. public function setName($var)
  90. {
  91. GPBUtil::checkString($var, True);
  92. $this->name = $var;
  93. $this->has_name = true;
  94. return $this;
  95. }
  96. public function hasName()
  97. {
  98. return $this->has_name;
  99. }
  100. /**
  101. * Input and output type names. These are resolved in the same way as
  102. * FieldDescriptorProto.type_name, but must refer to a message type.
  103. *
  104. * Generated from protobuf field <code>optional string input_type = 2;</code>
  105. * @return string
  106. */
  107. public function getInputType()
  108. {
  109. return $this->input_type;
  110. }
  111. /**
  112. * Input and output type names. These are resolved in the same way as
  113. * FieldDescriptorProto.type_name, but must refer to a message type.
  114. *
  115. * Generated from protobuf field <code>optional string input_type = 2;</code>
  116. * @param string $var
  117. * @return $this
  118. */
  119. public function setInputType($var)
  120. {
  121. GPBUtil::checkString($var, True);
  122. $this->input_type = $var;
  123. $this->has_input_type = true;
  124. return $this;
  125. }
  126. public function hasInputType()
  127. {
  128. return $this->has_input_type;
  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 $this->output_type;
  137. }
  138. /**
  139. * Generated from protobuf field <code>optional string output_type = 3;</code>
  140. * @param string $var
  141. * @return $this
  142. */
  143. public function setOutputType($var)
  144. {
  145. GPBUtil::checkString($var, True);
  146. $this->output_type = $var;
  147. $this->has_output_type = true;
  148. return $this;
  149. }
  150. public function hasOutputType()
  151. {
  152. return $this->has_output_type;
  153. }
  154. /**
  155. * Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
  156. * @return \Google\Protobuf\Internal\MethodOptions
  157. */
  158. public function getOptions()
  159. {
  160. return $this->options;
  161. }
  162. /**
  163. * Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
  164. * @param \Google\Protobuf\Internal\MethodOptions $var
  165. * @return $this
  166. */
  167. public function setOptions($var)
  168. {
  169. GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MethodOptions::class);
  170. $this->options = $var;
  171. $this->has_options = true;
  172. return $this;
  173. }
  174. public function hasOptions()
  175. {
  176. return $this->has_options;
  177. }
  178. /**
  179. * Identifies if client streams multiple client messages
  180. *
  181. * Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
  182. * @return bool
  183. */
  184. public function getClientStreaming()
  185. {
  186. return $this->client_streaming;
  187. }
  188. /**
  189. * Identifies if client streams multiple client messages
  190. *
  191. * Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
  192. * @param bool $var
  193. * @return $this
  194. */
  195. public function setClientStreaming($var)
  196. {
  197. GPBUtil::checkBool($var);
  198. $this->client_streaming = $var;
  199. $this->has_client_streaming = true;
  200. return $this;
  201. }
  202. public function hasClientStreaming()
  203. {
  204. return $this->has_client_streaming;
  205. }
  206. /**
  207. * Identifies if server streams multiple server messages
  208. *
  209. * Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
  210. * @return bool
  211. */
  212. public function getServerStreaming()
  213. {
  214. return $this->server_streaming;
  215. }
  216. /**
  217. * Identifies if server streams multiple server messages
  218. *
  219. * Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
  220. * @param bool $var
  221. * @return $this
  222. */
  223. public function setServerStreaming($var)
  224. {
  225. GPBUtil::checkBool($var);
  226. $this->server_streaming = $var;
  227. $this->has_server_streaming = true;
  228. return $this;
  229. }
  230. public function hasServerStreaming()
  231. {
  232. return $this->has_server_streaming;
  233. }
  234. }