MethodDescriptorProto.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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. public function __construct() {
  55. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  56. parent::__construct();
  57. }
  58. /**
  59. * Generated from protobuf field <code>optional string name = 1;</code>
  60. * @return string
  61. */
  62. public function getName()
  63. {
  64. return $this->name;
  65. }
  66. /**
  67. * Generated from protobuf field <code>optional string name = 1;</code>
  68. * @param string $var
  69. * @return $this
  70. */
  71. public function setName($var)
  72. {
  73. GPBUtil::checkString($var, True);
  74. $this->name = $var;
  75. $this->has_name = true;
  76. return $this;
  77. }
  78. public function hasName()
  79. {
  80. return $this->has_name;
  81. }
  82. /**
  83. * Input and output type names. These are resolved in the same way as
  84. * FieldDescriptorProto.type_name, but must refer to a message type.
  85. *
  86. * Generated from protobuf field <code>optional string input_type = 2;</code>
  87. * @return string
  88. */
  89. public function getInputType()
  90. {
  91. return $this->input_type;
  92. }
  93. /**
  94. * Input and output type names. These are resolved in the same way as
  95. * FieldDescriptorProto.type_name, but must refer to a message type.
  96. *
  97. * Generated from protobuf field <code>optional string input_type = 2;</code>
  98. * @param string $var
  99. * @return $this
  100. */
  101. public function setInputType($var)
  102. {
  103. GPBUtil::checkString($var, True);
  104. $this->input_type = $var;
  105. $this->has_input_type = true;
  106. return $this;
  107. }
  108. public function hasInputType()
  109. {
  110. return $this->has_input_type;
  111. }
  112. /**
  113. * Generated from protobuf field <code>optional string output_type = 3;</code>
  114. * @return string
  115. */
  116. public function getOutputType()
  117. {
  118. return $this->output_type;
  119. }
  120. /**
  121. * Generated from protobuf field <code>optional string output_type = 3;</code>
  122. * @param string $var
  123. * @return $this
  124. */
  125. public function setOutputType($var)
  126. {
  127. GPBUtil::checkString($var, True);
  128. $this->output_type = $var;
  129. $this->has_output_type = true;
  130. return $this;
  131. }
  132. public function hasOutputType()
  133. {
  134. return $this->has_output_type;
  135. }
  136. /**
  137. * Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
  138. * @return \Google\Protobuf\Internal\MethodOptions
  139. */
  140. public function getOptions()
  141. {
  142. return $this->options;
  143. }
  144. /**
  145. * Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
  146. * @param \Google\Protobuf\Internal\MethodOptions $var
  147. * @return $this
  148. */
  149. public function setOptions($var)
  150. {
  151. GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MethodOptions::class);
  152. $this->options = $var;
  153. $this->has_options = true;
  154. return $this;
  155. }
  156. public function hasOptions()
  157. {
  158. return $this->has_options;
  159. }
  160. /**
  161. * Identifies if client streams multiple client messages
  162. *
  163. * Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
  164. * @return bool
  165. */
  166. public function getClientStreaming()
  167. {
  168. return $this->client_streaming;
  169. }
  170. /**
  171. * Identifies if client streams multiple client messages
  172. *
  173. * Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
  174. * @param bool $var
  175. * @return $this
  176. */
  177. public function setClientStreaming($var)
  178. {
  179. GPBUtil::checkBool($var);
  180. $this->client_streaming = $var;
  181. $this->has_client_streaming = true;
  182. return $this;
  183. }
  184. public function hasClientStreaming()
  185. {
  186. return $this->has_client_streaming;
  187. }
  188. /**
  189. * Identifies if server streams multiple server messages
  190. *
  191. * Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
  192. * @return bool
  193. */
  194. public function getServerStreaming()
  195. {
  196. return $this->server_streaming;
  197. }
  198. /**
  199. * Identifies if server streams multiple server messages
  200. *
  201. * Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
  202. * @param bool $var
  203. * @return $this
  204. */
  205. public function setServerStreaming($var)
  206. {
  207. GPBUtil::checkBool($var);
  208. $this->server_streaming = $var;
  209. $this->has_server_streaming = true;
  210. return $this;
  211. }
  212. public function hasServerStreaming()
  213. {
  214. return $this->has_server_streaming;
  215. }
  216. }