EnumReservedRange.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/protobuf/descriptor.proto
  4. namespace Google\Protobuf\Internal\EnumDescriptorProto;
  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. * Range of reserved numeric values. Reserved values may not be used by
  12. * entries in the same enum. Reserved ranges may not overlap.
  13. * Note that this is distinct from DescriptorProto.ReservedRange in that it
  14. * is inclusive such that it can appropriately represent the entire int32
  15. * domain.
  16. *
  17. * Generated from protobuf message <code>google.protobuf.EnumDescriptorProto.EnumReservedRange</code>
  18. */
  19. class EnumReservedRange extends \Google\Protobuf\Internal\Message
  20. {
  21. /**
  22. * Inclusive.
  23. *
  24. * Generated from protobuf field <code>optional int32 start = 1;</code>
  25. */
  26. private $start = 0;
  27. private $has_start = false;
  28. /**
  29. * Inclusive.
  30. *
  31. * Generated from protobuf field <code>optional int32 end = 2;</code>
  32. */
  33. private $end = 0;
  34. private $has_end = false;
  35. /**
  36. * Constructor.
  37. *
  38. * @param array $data {
  39. * Optional. Data for populating the Message object.
  40. *
  41. * @type int $start
  42. * Inclusive.
  43. * @type int $end
  44. * Inclusive.
  45. * }
  46. */
  47. public function __construct($data = NULL) {
  48. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  49. parent::__construct($data);
  50. }
  51. /**
  52. * Inclusive.
  53. *
  54. * Generated from protobuf field <code>optional int32 start = 1;</code>
  55. * @return int
  56. */
  57. public function getStart()
  58. {
  59. return $this->start;
  60. }
  61. /**
  62. * Inclusive.
  63. *
  64. * Generated from protobuf field <code>optional int32 start = 1;</code>
  65. * @param int $var
  66. * @return $this
  67. */
  68. public function setStart($var)
  69. {
  70. GPBUtil::checkInt32($var);
  71. $this->start = $var;
  72. $this->has_start = true;
  73. return $this;
  74. }
  75. public function hasStart()
  76. {
  77. return $this->has_start;
  78. }
  79. /**
  80. * Inclusive.
  81. *
  82. * Generated from protobuf field <code>optional int32 end = 2;</code>
  83. * @return int
  84. */
  85. public function getEnd()
  86. {
  87. return $this->end;
  88. }
  89. /**
  90. * Inclusive.
  91. *
  92. * Generated from protobuf field <code>optional int32 end = 2;</code>
  93. * @param int $var
  94. * @return $this
  95. */
  96. public function setEnd($var)
  97. {
  98. GPBUtil::checkInt32($var);
  99. $this->end = $var;
  100. $this->has_end = true;
  101. return $this;
  102. }
  103. public function hasEnd()
  104. {
  105. return $this->has_end;
  106. }
  107. }
  108. // Adding a class alias for backwards compatibility with the previous class name.
  109. class_alias(EnumReservedRange::class, \Google\Protobuf\Internal\EnumDescriptorProto_EnumReservedRange::class);