EnumOptions.php 5.5 KB

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