MessageOptions.php 15 KB

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