UninterpretedOption.php 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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. /**
  27. * The value of the uninterpreted option, in whatever type the tokenizer
  28. * identified it as during parsing. Exactly one of these should be set.
  29. *
  30. * Generated from protobuf field <code>optional string identifier_value = 3;</code>
  31. */
  32. protected $identifier_value = null;
  33. /**
  34. * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
  35. */
  36. protected $positive_int_value = null;
  37. /**
  38. * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
  39. */
  40. protected $negative_int_value = null;
  41. /**
  42. * Generated from protobuf field <code>optional double double_value = 6;</code>
  43. */
  44. protected $double_value = null;
  45. /**
  46. * Generated from protobuf field <code>optional bytes string_value = 7;</code>
  47. */
  48. protected $string_value = null;
  49. /**
  50. * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
  51. */
  52. protected $aggregate_value = null;
  53. /**
  54. * Constructor.
  55. *
  56. * @param array $data {
  57. * Optional. Data for populating the Message object.
  58. *
  59. * @type \Google\Protobuf\Internal\UninterpretedOption\NamePart[]|\Google\Protobuf\Internal\RepeatedField $name
  60. * @type string $identifier_value
  61. * The value of the uninterpreted option, in whatever type the tokenizer
  62. * identified it as during parsing. Exactly one of these should be set.
  63. * @type int|string $positive_int_value
  64. * @type int|string $negative_int_value
  65. * @type float $double_value
  66. * @type string $string_value
  67. * @type string $aggregate_value
  68. * }
  69. */
  70. public function __construct($data = NULL) {
  71. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  72. parent::__construct($data);
  73. }
  74. /**
  75. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
  76. * @return \Google\Protobuf\Internal\RepeatedField
  77. */
  78. public function getName()
  79. {
  80. return $this->name;
  81. }
  82. /**
  83. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
  84. * @param \Google\Protobuf\Internal\UninterpretedOption\NamePart[]|\Google\Protobuf\Internal\RepeatedField $var
  85. * @return $this
  86. */
  87. public function setName($var)
  88. {
  89. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption\NamePart::class);
  90. $this->name = $arr;
  91. return $this;
  92. }
  93. /**
  94. * The value of the uninterpreted option, in whatever type the tokenizer
  95. * identified it as during parsing. Exactly one of these should be set.
  96. *
  97. * Generated from protobuf field <code>optional string identifier_value = 3;</code>
  98. * @return string
  99. */
  100. public function getIdentifierValue()
  101. {
  102. return isset($this->identifier_value) ? $this->identifier_value : '';
  103. }
  104. public function hasIdentifierValue()
  105. {
  106. return isset($this->identifier_value);
  107. }
  108. public function clearIdentifierValue()
  109. {
  110. unset($this->identifier_value);
  111. }
  112. /**
  113. * The value of the uninterpreted option, in whatever type the tokenizer
  114. * identified it as during parsing. Exactly one of these should be set.
  115. *
  116. * Generated from protobuf field <code>optional string identifier_value = 3;</code>
  117. * @param string $var
  118. * @return $this
  119. */
  120. public function setIdentifierValue($var)
  121. {
  122. GPBUtil::checkString($var, True);
  123. $this->identifier_value = $var;
  124. return $this;
  125. }
  126. /**
  127. * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
  128. * @return int|string
  129. */
  130. public function getPositiveIntValue()
  131. {
  132. return isset($this->positive_int_value) ? $this->positive_int_value : 0;
  133. }
  134. public function hasPositiveIntValue()
  135. {
  136. return isset($this->positive_int_value);
  137. }
  138. public function clearPositiveIntValue()
  139. {
  140. unset($this->positive_int_value);
  141. }
  142. /**
  143. * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
  144. * @param int|string $var
  145. * @return $this
  146. */
  147. public function setPositiveIntValue($var)
  148. {
  149. GPBUtil::checkUint64($var);
  150. $this->positive_int_value = $var;
  151. return $this;
  152. }
  153. /**
  154. * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
  155. * @return int|string
  156. */
  157. public function getNegativeIntValue()
  158. {
  159. return isset($this->negative_int_value) ? $this->negative_int_value : 0;
  160. }
  161. public function hasNegativeIntValue()
  162. {
  163. return isset($this->negative_int_value);
  164. }
  165. public function clearNegativeIntValue()
  166. {
  167. unset($this->negative_int_value);
  168. }
  169. /**
  170. * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
  171. * @param int|string $var
  172. * @return $this
  173. */
  174. public function setNegativeIntValue($var)
  175. {
  176. GPBUtil::checkInt64($var);
  177. $this->negative_int_value = $var;
  178. return $this;
  179. }
  180. /**
  181. * Generated from protobuf field <code>optional double double_value = 6;</code>
  182. * @return float
  183. */
  184. public function getDoubleValue()
  185. {
  186. return isset($this->double_value) ? $this->double_value : 0.0;
  187. }
  188. public function hasDoubleValue()
  189. {
  190. return isset($this->double_value);
  191. }
  192. public function clearDoubleValue()
  193. {
  194. unset($this->double_value);
  195. }
  196. /**
  197. * Generated from protobuf field <code>optional double double_value = 6;</code>
  198. * @param float $var
  199. * @return $this
  200. */
  201. public function setDoubleValue($var)
  202. {
  203. GPBUtil::checkDouble($var);
  204. $this->double_value = $var;
  205. return $this;
  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 isset($this->string_value) ? $this->string_value : '';
  214. }
  215. public function hasStringValue()
  216. {
  217. return isset($this->string_value);
  218. }
  219. public function clearStringValue()
  220. {
  221. unset($this->string_value);
  222. }
  223. /**
  224. * Generated from protobuf field <code>optional bytes string_value = 7;</code>
  225. * @param string $var
  226. * @return $this
  227. */
  228. public function setStringValue($var)
  229. {
  230. GPBUtil::checkString($var, False);
  231. $this->string_value = $var;
  232. return $this;
  233. }
  234. /**
  235. * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
  236. * @return string
  237. */
  238. public function getAggregateValue()
  239. {
  240. return isset($this->aggregate_value) ? $this->aggregate_value : '';
  241. }
  242. public function hasAggregateValue()
  243. {
  244. return isset($this->aggregate_value);
  245. }
  246. public function clearAggregateValue()
  247. {
  248. unset($this->aggregate_value);
  249. }
  250. /**
  251. * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
  252. * @param string $var
  253. * @return $this
  254. */
  255. public function setAggregateValue($var)
  256. {
  257. GPBUtil::checkString($var, True);
  258. $this->aggregate_value = $var;
  259. return $this;
  260. }
  261. }