MessageOptions.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  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. use Google\Protobuf\Internal\GPBWrapperUtils;
  11. /**
  12. * Generated from protobuf message <code>google.protobuf.MessageOptions</code>
  13. */
  14. class MessageOptions extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * Set true to use the old proto1 MessageSet wire format for extensions.
  18. * This is provided for backwards-compatibility with the MessageSet wire
  19. * format. You should not use this for any other reason: It's less
  20. * efficient, has fewer features, and is more complicated.
  21. * The message must be defined exactly as follows:
  22. * message Foo {
  23. * option message_set_wire_format = true;
  24. * extensions 4 to max;
  25. * }
  26. * Note that the message cannot have any defined fields; MessageSets only
  27. * have extensions.
  28. * All extensions of your type must be singular messages; e.g. they cannot
  29. * be int32s, enums, or repeated messages.
  30. * Because this is an option, the above two restrictions are not enforced by
  31. * the protocol compiler.
  32. *
  33. * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
  34. */
  35. private $message_set_wire_format = false;
  36. private $has_message_set_wire_format = false;
  37. /**
  38. * Disables the generation of the standard "descriptor()" accessor, which can
  39. * conflict with a field of the same name. This is meant to make migration
  40. * from proto1 easier; new code should avoid fields named "descriptor".
  41. *
  42. * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
  43. */
  44. private $no_standard_descriptor_accessor = false;
  45. private $has_no_standard_descriptor_accessor = false;
  46. /**
  47. * Is this message deprecated?
  48. * Depending on the target platform, this can emit Deprecated annotations
  49. * for the message, or it will be completely ignored; in the very least,
  50. * this is a formalization for deprecating messages.
  51. *
  52. * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
  53. */
  54. private $deprecated = false;
  55. private $has_deprecated = false;
  56. /**
  57. * Whether the message is an automatically generated map entry type for the
  58. * maps field.
  59. * For maps fields:
  60. * map<KeyType, ValueType> map_field = 1;
  61. * The parsed descriptor looks like:
  62. * message MapFieldEntry {
  63. * option map_entry = true;
  64. * optional KeyType key = 1;
  65. * optional ValueType value = 2;
  66. * }
  67. * repeated MapFieldEntry map_field = 1;
  68. * Implementations may choose not to generate the map_entry=true message, but
  69. * use a native map in the target language to hold the keys and values.
  70. * The reflection APIs in such implementions still need to work as
  71. * if the field is a repeated message field.
  72. * NOTE: Do not set the option in .proto files. Always use the maps syntax
  73. * instead. The option should only be implicitly set by the proto compiler
  74. * parser.
  75. *
  76. * Generated from protobuf field <code>optional bool map_entry = 7;</code>
  77. */
  78. private $map_entry = false;
  79. private $has_map_entry = false;
  80. /**
  81. * The parser stores options it doesn't recognize here. See above.
  82. *
  83. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  84. */
  85. private $uninterpreted_option;
  86. private $has_uninterpreted_option = false;
  87. /**
  88. * Constructor.
  89. *
  90. * @param array $data {
  91. * Optional. Data for populating the Message object.
  92. *
  93. * @type bool $message_set_wire_format
  94. * Set true to use the old proto1 MessageSet wire format for extensions.
  95. * This is provided for backwards-compatibility with the MessageSet wire
  96. * format. You should not use this for any other reason: It's less
  97. * efficient, has fewer features, and is more complicated.
  98. * The message must be defined exactly as follows:
  99. * message Foo {
  100. * option message_set_wire_format = true;
  101. * extensions 4 to max;
  102. * }
  103. * Note that the message cannot have any defined fields; MessageSets only
  104. * have extensions.
  105. * All extensions of your type must be singular messages; e.g. they cannot
  106. * be int32s, enums, or repeated messages.
  107. * Because this is an option, the above two restrictions are not enforced by
  108. * the protocol compiler.
  109. * @type bool $no_standard_descriptor_accessor
  110. * Disables the generation of the standard "descriptor()" accessor, which can
  111. * conflict with a field of the same name. This is meant to make migration
  112. * from proto1 easier; new code should avoid fields named "descriptor".
  113. * @type bool $deprecated
  114. * Is this message deprecated?
  115. * Depending on the target platform, this can emit Deprecated annotations
  116. * for the message, or it will be completely ignored; in the very least,
  117. * this is a formalization for deprecating messages.
  118. * @type bool $map_entry
  119. * Whether the message is an automatically generated map entry type for the
  120. * maps field.
  121. * For maps fields:
  122. * map<KeyType, ValueType> map_field = 1;
  123. * The parsed descriptor looks like:
  124. * message MapFieldEntry {
  125. * option map_entry = true;
  126. * optional KeyType key = 1;
  127. * optional ValueType value = 2;
  128. * }
  129. * repeated MapFieldEntry map_field = 1;
  130. * Implementations may choose not to generate the map_entry=true message, but
  131. * use a native map in the target language to hold the keys and values.
  132. * The reflection APIs in such implementions still need to work as
  133. * if the field is a repeated message field.
  134. * NOTE: Do not set the option in .proto files. Always use the maps syntax
  135. * instead. The option should only be implicitly set by the proto compiler
  136. * parser.
  137. * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
  138. * The parser stores options it doesn't recognize here. See above.
  139. * }
  140. */
  141. public function __construct($data = NULL) {
  142. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  143. parent::__construct($data);
  144. }
  145. /**
  146. * Set true to use the old proto1 MessageSet wire format for extensions.
  147. * This is provided for backwards-compatibility with the MessageSet wire
  148. * format. You should not use this for any other reason: It's less
  149. * efficient, has fewer features, and is more complicated.
  150. * The message must be defined exactly as follows:
  151. * message Foo {
  152. * option message_set_wire_format = true;
  153. * extensions 4 to max;
  154. * }
  155. * Note that the message cannot have any defined fields; MessageSets only
  156. * have extensions.
  157. * All extensions of your type must be singular messages; e.g. they cannot
  158. * be int32s, enums, or repeated messages.
  159. * Because this is an option, the above two restrictions are not enforced by
  160. * the protocol compiler.
  161. *
  162. * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
  163. * @return bool
  164. */
  165. public function getMessageSetWireFormat()
  166. {
  167. return $this->message_set_wire_format;
  168. }
  169. /**
  170. * Set true to use the old proto1 MessageSet wire format for extensions.
  171. * This is provided for backwards-compatibility with the MessageSet wire
  172. * format. You should not use this for any other reason: It's less
  173. * efficient, has fewer features, and is more complicated.
  174. * The message must be defined exactly as follows:
  175. * message Foo {
  176. * option message_set_wire_format = true;
  177. * extensions 4 to max;
  178. * }
  179. * Note that the message cannot have any defined fields; MessageSets only
  180. * have extensions.
  181. * All extensions of your type must be singular messages; e.g. they cannot
  182. * be int32s, enums, or repeated messages.
  183. * Because this is an option, the above two restrictions are not enforced by
  184. * the protocol compiler.
  185. *
  186. * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
  187. * @param bool $var
  188. * @return $this
  189. */
  190. public function setMessageSetWireFormat($var)
  191. {
  192. GPBUtil::checkBool($var);
  193. $this->message_set_wire_format = $var;
  194. $this->has_message_set_wire_format = true;
  195. return $this;
  196. }
  197. public function hasMessageSetWireFormat()
  198. {
  199. return $this->has_message_set_wire_format;
  200. }
  201. /**
  202. * Disables the generation of the standard "descriptor()" accessor, which can
  203. * conflict with a field of the same name. This is meant to make migration
  204. * from proto1 easier; new code should avoid fields named "descriptor".
  205. *
  206. * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
  207. * @return bool
  208. */
  209. public function getNoStandardDescriptorAccessor()
  210. {
  211. return $this->no_standard_descriptor_accessor;
  212. }
  213. /**
  214. * Disables the generation of the standard "descriptor()" accessor, which can
  215. * conflict with a field of the same name. This is meant to make migration
  216. * from proto1 easier; new code should avoid fields named "descriptor".
  217. *
  218. * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
  219. * @param bool $var
  220. * @return $this
  221. */
  222. public function setNoStandardDescriptorAccessor($var)
  223. {
  224. GPBUtil::checkBool($var);
  225. $this->no_standard_descriptor_accessor = $var;
  226. $this->has_no_standard_descriptor_accessor = true;
  227. return $this;
  228. }
  229. public function hasNoStandardDescriptorAccessor()
  230. {
  231. return $this->has_no_standard_descriptor_accessor;
  232. }
  233. /**
  234. * Is this message deprecated?
  235. * Depending on the target platform, this can emit Deprecated annotations
  236. * for the message, or it will be completely ignored; in the very least,
  237. * this is a formalization for deprecating messages.
  238. *
  239. * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
  240. * @return bool
  241. */
  242. public function getDeprecated()
  243. {
  244. return $this->deprecated;
  245. }
  246. /**
  247. * Is this message deprecated?
  248. * Depending on the target platform, this can emit Deprecated annotations
  249. * for the message, or it will be completely ignored; in the very least,
  250. * this is a formalization for deprecating messages.
  251. *
  252. * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
  253. * @param bool $var
  254. * @return $this
  255. */
  256. public function setDeprecated($var)
  257. {
  258. GPBUtil::checkBool($var);
  259. $this->deprecated = $var;
  260. $this->has_deprecated = true;
  261. return $this;
  262. }
  263. public function hasDeprecated()
  264. {
  265. return $this->has_deprecated;
  266. }
  267. /**
  268. * Whether the message is an automatically generated map entry type for the
  269. * maps field.
  270. * For maps fields:
  271. * map<KeyType, ValueType> map_field = 1;
  272. * The parsed descriptor looks like:
  273. * message MapFieldEntry {
  274. * option map_entry = true;
  275. * optional KeyType key = 1;
  276. * optional ValueType value = 2;
  277. * }
  278. * repeated MapFieldEntry map_field = 1;
  279. * Implementations may choose not to generate the map_entry=true message, but
  280. * use a native map in the target language to hold the keys and values.
  281. * The reflection APIs in such implementions still need to work as
  282. * if the field is a repeated message field.
  283. * NOTE: Do not set the option in .proto files. Always use the maps syntax
  284. * instead. The option should only be implicitly set by the proto compiler
  285. * parser.
  286. *
  287. * Generated from protobuf field <code>optional bool map_entry = 7;</code>
  288. * @return bool
  289. */
  290. public function getMapEntry()
  291. {
  292. return $this->map_entry;
  293. }
  294. /**
  295. * Whether the message is an automatically generated map entry type for the
  296. * maps field.
  297. * For maps fields:
  298. * map<KeyType, ValueType> map_field = 1;
  299. * The parsed descriptor looks like:
  300. * message MapFieldEntry {
  301. * option map_entry = true;
  302. * optional KeyType key = 1;
  303. * optional ValueType value = 2;
  304. * }
  305. * repeated MapFieldEntry map_field = 1;
  306. * Implementations may choose not to generate the map_entry=true message, but
  307. * use a native map in the target language to hold the keys and values.
  308. * The reflection APIs in such implementions still need to work as
  309. * if the field is a repeated message field.
  310. * NOTE: Do not set the option in .proto files. Always use the maps syntax
  311. * instead. The option should only be implicitly set by the proto compiler
  312. * parser.
  313. *
  314. * Generated from protobuf field <code>optional bool map_entry = 7;</code>
  315. * @param bool $var
  316. * @return $this
  317. */
  318. public function setMapEntry($var)
  319. {
  320. GPBUtil::checkBool($var);
  321. $this->map_entry = $var;
  322. $this->has_map_entry = true;
  323. return $this;
  324. }
  325. public function hasMapEntry()
  326. {
  327. return $this->has_map_entry;
  328. }
  329. /**
  330. * The parser stores options it doesn't recognize here. See above.
  331. *
  332. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  333. * @return \Google\Protobuf\Internal\RepeatedField
  334. */
  335. public function getUninterpretedOption()
  336. {
  337. return $this->uninterpreted_option;
  338. }
  339. /**
  340. * The parser stores options it doesn't recognize here. See above.
  341. *
  342. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  343. * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
  344. * @return $this
  345. */
  346. public function setUninterpretedOption($var)
  347. {
  348. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
  349. $this->uninterpreted_option = $arr;
  350. $this->has_uninterpreted_option = true;
  351. return $this;
  352. }
  353. public function hasUninterpretedOption()
  354. {
  355. return $this->has_uninterpreted_option;
  356. }
  357. }