ExtensionRange.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/protobuf/descriptor.proto
  4. namespace Google\Protobuf\Internal\DescriptorProto;
  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.DescriptorProto.ExtensionRange</code>
  12. */
  13. final class ExtensionRange extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Inclusive.
  17. *
  18. * Generated from protobuf field <code>optional int32 start = 1;</code>
  19. */
  20. private $start = 0;
  21. private $has_start = false;
  22. /**
  23. * Exclusive.
  24. *
  25. * Generated from protobuf field <code>optional int32 end = 2;</code>
  26. */
  27. private $end = 0;
  28. private $has_end = false;
  29. /**
  30. * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
  31. */
  32. private $options = null;
  33. private $has_options = false;
  34. /**
  35. * Constructor.
  36. *
  37. * @param array $data {
  38. * Optional. Data for populating the Message object.
  39. *
  40. * @type int $start
  41. * Inclusive.
  42. * @type int $end
  43. * Exclusive.
  44. * @type \Google\Protobuf\Internal\ExtensionRangeOptions $options
  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. * Exclusive.
  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. * Exclusive.
  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. * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
  109. * @return \Google\Protobuf\Internal\ExtensionRangeOptions
  110. */
  111. public function getOptions()
  112. {
  113. return $this->options;
  114. }
  115. /**
  116. * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
  117. * @param \Google\Protobuf\Internal\ExtensionRangeOptions $var
  118. * @return $this
  119. */
  120. public function setOptions($var)
  121. {
  122. GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ExtensionRangeOptions::class);
  123. $this->options = $var;
  124. $this->has_options = true;
  125. return $this;
  126. }
  127. public function hasOptions()
  128. {
  129. return $this->has_options;
  130. }
  131. }
  132. // Adding a class alias for backwards compatibility with the previous class name.
  133. class_alias(ExtensionRange::class, \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class);