EnumOptions.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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.EnumOptions</code>
  12. */
  13. class EnumOptions extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Set this option to true to allow mapping different tag names to the same
  17. * value.
  18. *
  19. * Generated from protobuf field <code>optional bool allow_alias = 2;</code>
  20. */
  21. protected $allow_alias = null;
  22. /**
  23. * Is this enum deprecated?
  24. * Depending on the target platform, this can emit Deprecated annotations
  25. * for the enum, or it will be completely ignored; in the very least, this
  26. * is a formalization for deprecating enums.
  27. *
  28. * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
  29. */
  30. protected $deprecated = null;
  31. /**
  32. * The parser stores options it doesn't recognize here. See above.
  33. *
  34. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  35. */
  36. private $uninterpreted_option;
  37. /**
  38. * Constructor.
  39. *
  40. * @param array $data {
  41. * Optional. Data for populating the Message object.
  42. *
  43. * @type bool $allow_alias
  44. * Set this option to true to allow mapping different tag names to the same
  45. * value.
  46. * @type bool $deprecated
  47. * Is this enum deprecated?
  48. * Depending on the target platform, this can emit Deprecated annotations
  49. * for the enum, or it will be completely ignored; in the very least, this
  50. * is a formalization for deprecating enums.
  51. * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
  52. * The parser stores options it doesn't recognize here. See above.
  53. * }
  54. */
  55. public function __construct($data = NULL) {
  56. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  57. parent::__construct($data);
  58. }
  59. /**
  60. * Set this option to true to allow mapping different tag names to the same
  61. * value.
  62. *
  63. * Generated from protobuf field <code>optional bool allow_alias = 2;</code>
  64. * @return bool
  65. */
  66. public function getAllowAlias()
  67. {
  68. return isset($this->allow_alias) ? $this->allow_alias : false;
  69. }
  70. public function hasAllowAlias()
  71. {
  72. return isset($this->allow_alias);
  73. }
  74. public function clearAllowAlias()
  75. {
  76. unset($this->allow_alias);
  77. }
  78. /**
  79. * Set this option to true to allow mapping different tag names to the same
  80. * value.
  81. *
  82. * Generated from protobuf field <code>optional bool allow_alias = 2;</code>
  83. * @param bool $var
  84. * @return $this
  85. */
  86. public function setAllowAlias($var)
  87. {
  88. GPBUtil::checkBool($var);
  89. $this->allow_alias = $var;
  90. return $this;
  91. }
  92. /**
  93. * Is this enum deprecated?
  94. * Depending on the target platform, this can emit Deprecated annotations
  95. * for the enum, or it will be completely ignored; in the very least, this
  96. * is a formalization for deprecating enums.
  97. *
  98. * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
  99. * @return bool
  100. */
  101. public function getDeprecated()
  102. {
  103. return isset($this->deprecated) ? $this->deprecated : false;
  104. }
  105. public function hasDeprecated()
  106. {
  107. return isset($this->deprecated);
  108. }
  109. public function clearDeprecated()
  110. {
  111. unset($this->deprecated);
  112. }
  113. /**
  114. * Is this enum deprecated?
  115. * Depending on the target platform, this can emit Deprecated annotations
  116. * for the enum, or it will be completely ignored; in the very least, this
  117. * is a formalization for deprecating enums.
  118. *
  119. * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
  120. * @param bool $var
  121. * @return $this
  122. */
  123. public function setDeprecated($var)
  124. {
  125. GPBUtil::checkBool($var);
  126. $this->deprecated = $var;
  127. return $this;
  128. }
  129. /**
  130. * The parser stores options it doesn't recognize here. See above.
  131. *
  132. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  133. * @return \Google\Protobuf\Internal\RepeatedField
  134. */
  135. public function getUninterpretedOption()
  136. {
  137. return $this->uninterpreted_option;
  138. }
  139. /**
  140. * The parser stores options it doesn't recognize here. See above.
  141. *
  142. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  143. * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
  144. * @return $this
  145. */
  146. public function setUninterpretedOption($var)
  147. {
  148. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
  149. $this->uninterpreted_option = $arr;
  150. return $this;
  151. }
  152. }