UninterpretedOption.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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. * A message representing a option the parser does not recognize. This only
  12. * appears in options protos created by the compiler::Parser class.
  13. * DescriptorPool resolves these when building Descriptor objects. Therefore,
  14. * options protos in descriptor objects (e.g. returned by Descriptor::options(),
  15. * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
  16. * in them.
  17. *
  18. * Generated from protobuf message <code>google.protobuf.UninterpretedOption</code>
  19. */
  20. class UninterpretedOption extends \Google\Protobuf\Internal\Message
  21. {
  22. /**
  23. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
  24. */
  25. private $name;
  26. private $has_name = false;
  27. /**
  28. * The value of the uninterpreted option, in whatever type the tokenizer
  29. * identified it as during parsing. Exactly one of these should be set.
  30. *
  31. * Generated from protobuf field <code>optional string identifier_value = 3;</code>
  32. */
  33. private $identifier_value = '';
  34. private $has_identifier_value = false;
  35. /**
  36. * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
  37. */
  38. private $positive_int_value = 0;
  39. private $has_positive_int_value = false;
  40. /**
  41. * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
  42. */
  43. private $negative_int_value = 0;
  44. private $has_negative_int_value = false;
  45. /**
  46. * Generated from protobuf field <code>optional double double_value = 6;</code>
  47. */
  48. private $double_value = 0.0;
  49. private $has_double_value = false;
  50. /**
  51. * Generated from protobuf field <code>optional bytes string_value = 7;</code>
  52. */
  53. private $string_value = '';
  54. private $has_string_value = false;
  55. /**
  56. * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
  57. */
  58. private $aggregate_value = '';
  59. private $has_aggregate_value = false;
  60. /**
  61. * Constructor.
  62. *
  63. * @param array $data {
  64. * Optional. Data for populating the Message object.
  65. *
  66. * @type \Google\Protobuf\Internal\UninterpretedOption_NamePart[]|\Google\Protobuf\Internal\RepeatedField $name
  67. * @type string $identifier_value
  68. * The value of the uninterpreted option, in whatever type the tokenizer
  69. * identified it as during parsing. Exactly one of these should be set.
  70. * @type int|string $positive_int_value
  71. * @type int|string $negative_int_value
  72. * @type float $double_value
  73. * @type string $string_value
  74. * @type string $aggregate_value
  75. * }
  76. */
  77. public function __construct($data = NULL) {
  78. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  79. parent::__construct($data);
  80. }
  81. /**
  82. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
  83. * @return \Google\Protobuf\Internal\RepeatedField
  84. */
  85. public function getName()
  86. {
  87. return $this->name;
  88. }
  89. /**
  90. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
  91. * @param \Google\Protobuf\Internal\UninterpretedOption_NamePart[]|\Google\Protobuf\Internal\RepeatedField $var
  92. * @return $this
  93. */
  94. public function setName($var)
  95. {
  96. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption_NamePart::class);
  97. $this->name = $arr;
  98. $this->has_name = true;
  99. return $this;
  100. }
  101. public function hasName()
  102. {
  103. return $this->has_name;
  104. }
  105. /**
  106. * The value of the uninterpreted option, in whatever type the tokenizer
  107. * identified it as during parsing. Exactly one of these should be set.
  108. *
  109. * Generated from protobuf field <code>optional string identifier_value = 3;</code>
  110. * @return string
  111. */
  112. public function getIdentifierValue()
  113. {
  114. return $this->identifier_value;
  115. }
  116. /**
  117. * The value of the uninterpreted option, in whatever type the tokenizer
  118. * identified it as during parsing. Exactly one of these should be set.
  119. *
  120. * Generated from protobuf field <code>optional string identifier_value = 3;</code>
  121. * @param string $var
  122. * @return $this
  123. */
  124. public function setIdentifierValue($var)
  125. {
  126. GPBUtil::checkString($var, True);
  127. $this->identifier_value = $var;
  128. $this->has_identifier_value = true;
  129. return $this;
  130. }
  131. public function hasIdentifierValue()
  132. {
  133. return $this->has_identifier_value;
  134. }
  135. /**
  136. * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
  137. * @return int|string
  138. */
  139. public function getPositiveIntValue()
  140. {
  141. return $this->positive_int_value;
  142. }
  143. /**
  144. * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
  145. * @param int|string $var
  146. * @return $this
  147. */
  148. public function setPositiveIntValue($var)
  149. {
  150. GPBUtil::checkUint64($var);
  151. $this->positive_int_value = $var;
  152. $this->has_positive_int_value = true;
  153. return $this;
  154. }
  155. public function hasPositiveIntValue()
  156. {
  157. return $this->has_positive_int_value;
  158. }
  159. /**
  160. * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
  161. * @return int|string
  162. */
  163. public function getNegativeIntValue()
  164. {
  165. return $this->negative_int_value;
  166. }
  167. /**
  168. * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
  169. * @param int|string $var
  170. * @return $this
  171. */
  172. public function setNegativeIntValue($var)
  173. {
  174. GPBUtil::checkInt64($var);
  175. $this->negative_int_value = $var;
  176. $this->has_negative_int_value = true;
  177. return $this;
  178. }
  179. public function hasNegativeIntValue()
  180. {
  181. return $this->has_negative_int_value;
  182. }
  183. /**
  184. * Generated from protobuf field <code>optional double double_value = 6;</code>
  185. * @return float
  186. */
  187. public function getDoubleValue()
  188. {
  189. return $this->double_value;
  190. }
  191. /**
  192. * Generated from protobuf field <code>optional double double_value = 6;</code>
  193. * @param float $var
  194. * @return $this
  195. */
  196. public function setDoubleValue($var)
  197. {
  198. GPBUtil::checkDouble($var);
  199. $this->double_value = $var;
  200. $this->has_double_value = true;
  201. return $this;
  202. }
  203. public function hasDoubleValue()
  204. {
  205. return $this->has_double_value;
  206. }
  207. /**
  208. * Generated from protobuf field <code>optional bytes string_value = 7;</code>
  209. * @return string
  210. */
  211. public function getStringValue()
  212. {
  213. return $this->string_value;
  214. }
  215. /**
  216. * Generated from protobuf field <code>optional bytes string_value = 7;</code>
  217. * @param string $var
  218. * @return $this
  219. */
  220. public function setStringValue($var)
  221. {
  222. GPBUtil::checkString($var, False);
  223. $this->string_value = $var;
  224. $this->has_string_value = true;
  225. return $this;
  226. }
  227. public function hasStringValue()
  228. {
  229. return $this->has_string_value;
  230. }
  231. /**
  232. * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
  233. * @return string
  234. */
  235. public function getAggregateValue()
  236. {
  237. return $this->aggregate_value;
  238. }
  239. /**
  240. * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
  241. * @param string $var
  242. * @return $this
  243. */
  244. public function setAggregateValue($var)
  245. {
  246. GPBUtil::checkString($var, True);
  247. $this->aggregate_value = $var;
  248. $this->has_aggregate_value = true;
  249. return $this;
  250. }
  251. public function hasAggregateValue()
  252. {
  253. return $this->has_aggregate_value;
  254. }
  255. }