EnumOptions.php 5.5 KB

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