FileDescriptorProto.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  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. * Describes a complete .proto file.
  12. *
  13. * Generated from protobuf message <code>google.protobuf.FileDescriptorProto</code>
  14. */
  15. class FileDescriptorProto extends \Google\Protobuf\Internal\Message
  16. {
  17. /**
  18. * file name, relative to root of source tree
  19. *
  20. * Generated from protobuf field <code>optional string name = 1;</code>
  21. */
  22. private $name = '';
  23. private $has_name = false;
  24. /**
  25. * e.g. "foo", "foo.bar", etc.
  26. *
  27. * Generated from protobuf field <code>optional string package = 2;</code>
  28. */
  29. private $package = '';
  30. private $has_package = false;
  31. /**
  32. * Names of files imported by this file.
  33. *
  34. * Generated from protobuf field <code>repeated string dependency = 3;</code>
  35. */
  36. private $dependency;
  37. private $has_dependency = false;
  38. /**
  39. * Indexes of the public imported files in the dependency list above.
  40. *
  41. * Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
  42. */
  43. private $public_dependency;
  44. private $has_public_dependency = false;
  45. /**
  46. * Indexes of the weak imported files in the dependency list.
  47. * For Google-internal migration only. Do not use.
  48. *
  49. * Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
  50. */
  51. private $weak_dependency;
  52. private $has_weak_dependency = false;
  53. /**
  54. * All top-level definitions in this file.
  55. *
  56. * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
  57. */
  58. private $message_type;
  59. private $has_message_type = false;
  60. /**
  61. * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
  62. */
  63. private $enum_type;
  64. private $has_enum_type = false;
  65. /**
  66. * Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
  67. */
  68. private $service;
  69. private $has_service = false;
  70. /**
  71. * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
  72. */
  73. private $extension;
  74. private $has_extension = false;
  75. /**
  76. * Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
  77. */
  78. private $options = null;
  79. private $has_options = false;
  80. /**
  81. * This field contains optional information about the original source code.
  82. * You may safely remove this entire field without harming runtime
  83. * functionality of the descriptors -- the information is needed only by
  84. * development tools.
  85. *
  86. * Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
  87. */
  88. private $source_code_info = null;
  89. private $has_source_code_info = false;
  90. /**
  91. * The syntax of the proto file.
  92. * The supported values are "proto2" and "proto3".
  93. *
  94. * Generated from protobuf field <code>optional string syntax = 12;</code>
  95. */
  96. private $syntax = '';
  97. private $has_syntax = false;
  98. public function __construct() {
  99. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  100. parent::__construct();
  101. }
  102. /**
  103. * file name, relative to root of source tree
  104. *
  105. * Generated from protobuf field <code>optional string name = 1;</code>
  106. * @return string
  107. */
  108. public function getName()
  109. {
  110. return $this->name;
  111. }
  112. /**
  113. * file name, relative to root of source tree
  114. *
  115. * Generated from protobuf field <code>optional string name = 1;</code>
  116. * @param string $var
  117. * @return $this
  118. */
  119. public function setName($var)
  120. {
  121. GPBUtil::checkString($var, True);
  122. $this->name = $var;
  123. $this->has_name = true;
  124. return $this;
  125. }
  126. public function hasName()
  127. {
  128. return $this->has_name;
  129. }
  130. /**
  131. * e.g. "foo", "foo.bar", etc.
  132. *
  133. * Generated from protobuf field <code>optional string package = 2;</code>
  134. * @return string
  135. */
  136. public function getPackage()
  137. {
  138. return $this->package;
  139. }
  140. /**
  141. * e.g. "foo", "foo.bar", etc.
  142. *
  143. * Generated from protobuf field <code>optional string package = 2;</code>
  144. * @param string $var
  145. * @return $this
  146. */
  147. public function setPackage($var)
  148. {
  149. GPBUtil::checkString($var, True);
  150. $this->package = $var;
  151. $this->has_package = true;
  152. return $this;
  153. }
  154. public function hasPackage()
  155. {
  156. return $this->has_package;
  157. }
  158. /**
  159. * Names of files imported by this file.
  160. *
  161. * Generated from protobuf field <code>repeated string dependency = 3;</code>
  162. * @return \Google\Protobuf\Internal\RepeatedField
  163. */
  164. public function getDependency()
  165. {
  166. return $this->dependency;
  167. }
  168. /**
  169. * Names of files imported by this file.
  170. *
  171. * Generated from protobuf field <code>repeated string dependency = 3;</code>
  172. * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
  173. * @return $this
  174. */
  175. public function setDependency(&$var)
  176. {
  177. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  178. $this->dependency = $arr;
  179. $this->has_dependency = true;
  180. return $this;
  181. }
  182. public function hasDependency()
  183. {
  184. return $this->has_dependency;
  185. }
  186. /**
  187. * Indexes of the public imported files in the dependency list above.
  188. *
  189. * Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
  190. * @return \Google\Protobuf\Internal\RepeatedField
  191. */
  192. public function getPublicDependency()
  193. {
  194. return $this->public_dependency;
  195. }
  196. /**
  197. * Indexes of the public imported files in the dependency list above.
  198. *
  199. * Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
  200. * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
  201. * @return $this
  202. */
  203. public function setPublicDependency(&$var)
  204. {
  205. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
  206. $this->public_dependency = $arr;
  207. $this->has_public_dependency = true;
  208. return $this;
  209. }
  210. public function hasPublicDependency()
  211. {
  212. return $this->has_public_dependency;
  213. }
  214. /**
  215. * Indexes of the weak imported files in the dependency list.
  216. * For Google-internal migration only. Do not use.
  217. *
  218. * Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
  219. * @return \Google\Protobuf\Internal\RepeatedField
  220. */
  221. public function getWeakDependency()
  222. {
  223. return $this->weak_dependency;
  224. }
  225. /**
  226. * Indexes of the weak imported files in the dependency list.
  227. * For Google-internal migration only. Do not use.
  228. *
  229. * Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
  230. * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
  231. * @return $this
  232. */
  233. public function setWeakDependency(&$var)
  234. {
  235. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
  236. $this->weak_dependency = $arr;
  237. $this->has_weak_dependency = true;
  238. return $this;
  239. }
  240. public function hasWeakDependency()
  241. {
  242. return $this->has_weak_dependency;
  243. }
  244. /**
  245. * All top-level definitions in this file.
  246. *
  247. * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
  248. * @return \Google\Protobuf\Internal\RepeatedField
  249. */
  250. public function getMessageType()
  251. {
  252. return $this->message_type;
  253. }
  254. /**
  255. * All top-level definitions in this file.
  256. *
  257. * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
  258. * @param \Google\Protobuf\Internal\DescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
  259. * @return $this
  260. */
  261. public function setMessageType(&$var)
  262. {
  263. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
  264. $this->message_type = $arr;
  265. $this->has_message_type = true;
  266. return $this;
  267. }
  268. public function hasMessageType()
  269. {
  270. return $this->has_message_type;
  271. }
  272. /**
  273. * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
  274. * @return \Google\Protobuf\Internal\RepeatedField
  275. */
  276. public function getEnumType()
  277. {
  278. return $this->enum_type;
  279. }
  280. /**
  281. * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
  282. * @param \Google\Protobuf\Internal\EnumDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
  283. * @return $this
  284. */
  285. public function setEnumType(&$var)
  286. {
  287. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
  288. $this->enum_type = $arr;
  289. $this->has_enum_type = true;
  290. return $this;
  291. }
  292. public function hasEnumType()
  293. {
  294. return $this->has_enum_type;
  295. }
  296. /**
  297. * Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
  298. * @return \Google\Protobuf\Internal\RepeatedField
  299. */
  300. public function getService()
  301. {
  302. return $this->service;
  303. }
  304. /**
  305. * Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
  306. * @param \Google\Protobuf\Internal\ServiceDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
  307. * @return $this
  308. */
  309. public function setService(&$var)
  310. {
  311. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\ServiceDescriptorProto::class);
  312. $this->service = $arr;
  313. $this->has_service = true;
  314. return $this;
  315. }
  316. public function hasService()
  317. {
  318. return $this->has_service;
  319. }
  320. /**
  321. * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
  322. * @return \Google\Protobuf\Internal\RepeatedField
  323. */
  324. public function getExtension()
  325. {
  326. return $this->extension;
  327. }
  328. /**
  329. * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
  330. * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
  331. * @return $this
  332. */
  333. public function setExtension(&$var)
  334. {
  335. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
  336. $this->extension = $arr;
  337. $this->has_extension = true;
  338. return $this;
  339. }
  340. public function hasExtension()
  341. {
  342. return $this->has_extension;
  343. }
  344. /**
  345. * Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
  346. * @return \Google\Protobuf\Internal\FileOptions
  347. */
  348. public function getOptions()
  349. {
  350. return $this->options;
  351. }
  352. /**
  353. * Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
  354. * @param \Google\Protobuf\Internal\FileOptions $var
  355. * @return $this
  356. */
  357. public function setOptions(&$var)
  358. {
  359. GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FileOptions::class);
  360. $this->options = $var;
  361. $this->has_options = true;
  362. return $this;
  363. }
  364. public function hasOptions()
  365. {
  366. return $this->has_options;
  367. }
  368. /**
  369. * This field contains optional information about the original source code.
  370. * You may safely remove this entire field without harming runtime
  371. * functionality of the descriptors -- the information is needed only by
  372. * development tools.
  373. *
  374. * Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
  375. * @return \Google\Protobuf\Internal\SourceCodeInfo
  376. */
  377. public function getSourceCodeInfo()
  378. {
  379. return $this->source_code_info;
  380. }
  381. /**
  382. * This field contains optional information about the original source code.
  383. * You may safely remove this entire field without harming runtime
  384. * functionality of the descriptors -- the information is needed only by
  385. * development tools.
  386. *
  387. * Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
  388. * @param \Google\Protobuf\Internal\SourceCodeInfo $var
  389. * @return $this
  390. */
  391. public function setSourceCodeInfo(&$var)
  392. {
  393. GPBUtil::checkMessage($var, \Google\Protobuf\Internal\SourceCodeInfo::class);
  394. $this->source_code_info = $var;
  395. $this->has_source_code_info = true;
  396. return $this;
  397. }
  398. public function hasSourceCodeInfo()
  399. {
  400. return $this->has_source_code_info;
  401. }
  402. /**
  403. * The syntax of the proto file.
  404. * The supported values are "proto2" and "proto3".
  405. *
  406. * Generated from protobuf field <code>optional string syntax = 12;</code>
  407. * @return string
  408. */
  409. public function getSyntax()
  410. {
  411. return $this->syntax;
  412. }
  413. /**
  414. * The syntax of the proto file.
  415. * The supported values are "proto2" and "proto3".
  416. *
  417. * Generated from protobuf field <code>optional string syntax = 12;</code>
  418. * @param string $var
  419. * @return $this
  420. */
  421. public function setSyntax($var)
  422. {
  423. GPBUtil::checkString($var, True);
  424. $this->syntax = $var;
  425. $this->has_syntax = true;
  426. return $this;
  427. }
  428. public function hasSyntax()
  429. {
  430. return $this->has_syntax;
  431. }
  432. }