ExtensionRange.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. class ExtensionRange extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Generated from protobuf field <code>optional int32 start = 1;</code>
  17. */
  18. private $start = 0;
  19. private $has_start = false;
  20. /**
  21. * Generated from protobuf field <code>optional int32 end = 2;</code>
  22. */
  23. private $end = 0;
  24. private $has_end = false;
  25. /**
  26. * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
  27. */
  28. private $options = null;
  29. private $has_options = false;
  30. /**
  31. * Constructor.
  32. *
  33. * @param array $data {
  34. * Optional. Data for populating the Message object.
  35. *
  36. * @type int $start
  37. * @type int $end
  38. * @type \Google\Protobuf\Internal\ExtensionRangeOptions $options
  39. * }
  40. */
  41. public function __construct($data = NULL) {
  42. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  43. parent::__construct($data);
  44. }
  45. /**
  46. * Generated from protobuf field <code>optional int32 start = 1;</code>
  47. * @return int
  48. */
  49. public function getStart()
  50. {
  51. return $this->start;
  52. }
  53. /**
  54. * Generated from protobuf field <code>optional int32 start = 1;</code>
  55. * @param int $var
  56. * @return $this
  57. */
  58. public function setStart($var)
  59. {
  60. GPBUtil::checkInt32($var);
  61. $this->start = $var;
  62. $this->has_start = true;
  63. return $this;
  64. }
  65. public function hasStart()
  66. {
  67. return $this->has_start;
  68. }
  69. /**
  70. * Generated from protobuf field <code>optional int32 end = 2;</code>
  71. * @return int
  72. */
  73. public function getEnd()
  74. {
  75. return $this->end;
  76. }
  77. /**
  78. * Generated from protobuf field <code>optional int32 end = 2;</code>
  79. * @param int $var
  80. * @return $this
  81. */
  82. public function setEnd($var)
  83. {
  84. GPBUtil::checkInt32($var);
  85. $this->end = $var;
  86. $this->has_end = true;
  87. return $this;
  88. }
  89. public function hasEnd()
  90. {
  91. return $this->has_end;
  92. }
  93. /**
  94. * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
  95. * @return \Google\Protobuf\Internal\ExtensionRangeOptions
  96. */
  97. public function getOptions()
  98. {
  99. return $this->options;
  100. }
  101. /**
  102. * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
  103. * @param \Google\Protobuf\Internal\ExtensionRangeOptions $var
  104. * @return $this
  105. */
  106. public function setOptions($var)
  107. {
  108. GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ExtensionRangeOptions::class);
  109. $this->options = $var;
  110. $this->has_options = true;
  111. return $this;
  112. }
  113. public function hasOptions()
  114. {
  115. return $this->has_options;
  116. }
  117. }
  118. // Adding a class alias for backwards compatibility with the previous class name.
  119. class_alias(ExtensionRange::class, \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class);