FileDescriptorProto.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  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. /**
  99. * Constructor.
  100. *
  101. * @param array $data {
  102. * Optional. Data for populating the Message object.
  103. *
  104. * @type string $name
  105. * file name, relative to root of source tree
  106. * @type string $package
  107. * e.g. "foo", "foo.bar", etc.
  108. * @type string[]|\Google\Protobuf\Internal\RepeatedField $dependency
  109. * Names of files imported by this file.
  110. * @type int[]|\Google\Protobuf\Internal\RepeatedField $public_dependency
  111. * Indexes of the public imported files in the dependency list above.
  112. * @type int[]|\Google\Protobuf\Internal\RepeatedField $weak_dependency
  113. * Indexes of the weak imported files in the dependency list.
  114. * For Google-internal migration only. Do not use.
  115. * @type \Google\Protobuf\Internal\DescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $message_type
  116. * All top-level definitions in this file.
  117. * @type \Google\Protobuf\Internal\EnumDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $enum_type
  118. * @type \Google\Protobuf\Internal\ServiceDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $service
  119. * @type \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $extension
  120. * @type \Google\Protobuf\Internal\FileOptions $options
  121. * @type \Google\Protobuf\Internal\SourceCodeInfo $source_code_info
  122. * This field contains optional information about the original source code.
  123. * You may safely remove this entire field without harming runtime
  124. * functionality of the descriptors -- the information is needed only by
  125. * development tools.
  126. * @type string $syntax
  127. * The syntax of the proto file.
  128. * The supported values are "proto2" and "proto3".
  129. * }
  130. */
  131. public function __construct($data = NULL) {
  132. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  133. parent::__construct($data);
  134. }
  135. /**
  136. * file name, relative to root of source tree
  137. *
  138. * Generated from protobuf field <code>optional string name = 1;</code>
  139. * @return string
  140. */
  141. public function getName()
  142. {
  143. return $this->name;
  144. }
  145. /**
  146. * file name, relative to root of source tree
  147. *
  148. * Generated from protobuf field <code>optional string name = 1;</code>
  149. * @param string $var
  150. * @return $this
  151. */
  152. public function setName($var)
  153. {
  154. GPBUtil::checkString($var, True);
  155. $this->name = $var;
  156. $this->has_name = true;
  157. return $this;
  158. }
  159. public function hasName()
  160. {
  161. return $this->has_name;
  162. }
  163. /**
  164. * e.g. "foo", "foo.bar", etc.
  165. *
  166. * Generated from protobuf field <code>optional string package = 2;</code>
  167. * @return string
  168. */
  169. public function getPackage()
  170. {
  171. return $this->package;
  172. }
  173. /**
  174. * e.g. "foo", "foo.bar", etc.
  175. *
  176. * Generated from protobuf field <code>optional string package = 2;</code>
  177. * @param string $var
  178. * @return $this
  179. */
  180. public function setPackage($var)
  181. {
  182. GPBUtil::checkString($var, True);
  183. $this->package = $var;
  184. $this->has_package = true;
  185. return $this;
  186. }
  187. public function hasPackage()
  188. {
  189. return $this->has_package;
  190. }
  191. /**
  192. * Names of files imported by this file.
  193. *
  194. * Generated from protobuf field <code>repeated string dependency = 3;</code>
  195. * @return \Google\Protobuf\Internal\RepeatedField
  196. */
  197. public function getDependency()
  198. {
  199. return $this->dependency;
  200. }
  201. /**
  202. * Names of files imported by this file.
  203. *
  204. * Generated from protobuf field <code>repeated string dependency = 3;</code>
  205. * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
  206. * @return $this
  207. */
  208. public function setDependency($var)
  209. {
  210. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  211. $this->dependency = $arr;
  212. $this->has_dependency = true;
  213. return $this;
  214. }
  215. public function hasDependency()
  216. {
  217. return $this->has_dependency;
  218. }
  219. /**
  220. * Indexes of the public imported files in the dependency list above.
  221. *
  222. * Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
  223. * @return \Google\Protobuf\Internal\RepeatedField
  224. */
  225. public function getPublicDependency()
  226. {
  227. return $this->public_dependency;
  228. }
  229. /**
  230. * Indexes of the public imported files in the dependency list above.
  231. *
  232. * Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
  233. * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
  234. * @return $this
  235. */
  236. public function setPublicDependency($var)
  237. {
  238. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
  239. $this->public_dependency = $arr;
  240. $this->has_public_dependency = true;
  241. return $this;
  242. }
  243. public function hasPublicDependency()
  244. {
  245. return $this->has_public_dependency;
  246. }
  247. /**
  248. * Indexes of the weak imported files in the dependency list.
  249. * For Google-internal migration only. Do not use.
  250. *
  251. * Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
  252. * @return \Google\Protobuf\Internal\RepeatedField
  253. */
  254. public function getWeakDependency()
  255. {
  256. return $this->weak_dependency;
  257. }
  258. /**
  259. * Indexes of the weak imported files in the dependency list.
  260. * For Google-internal migration only. Do not use.
  261. *
  262. * Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
  263. * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
  264. * @return $this
  265. */
  266. public function setWeakDependency($var)
  267. {
  268. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
  269. $this->weak_dependency = $arr;
  270. $this->has_weak_dependency = true;
  271. return $this;
  272. }
  273. public function hasWeakDependency()
  274. {
  275. return $this->has_weak_dependency;
  276. }
  277. /**
  278. * All top-level definitions in this file.
  279. *
  280. * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
  281. * @return \Google\Protobuf\Internal\RepeatedField
  282. */
  283. public function getMessageType()
  284. {
  285. return $this->message_type;
  286. }
  287. /**
  288. * All top-level definitions in this file.
  289. *
  290. * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
  291. * @param \Google\Protobuf\Internal\DescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
  292. * @return $this
  293. */
  294. public function setMessageType($var)
  295. {
  296. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
  297. $this->message_type = $arr;
  298. $this->has_message_type = true;
  299. return $this;
  300. }
  301. public function hasMessageType()
  302. {
  303. return $this->has_message_type;
  304. }
  305. /**
  306. * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
  307. * @return \Google\Protobuf\Internal\RepeatedField
  308. */
  309. public function getEnumType()
  310. {
  311. return $this->enum_type;
  312. }
  313. /**
  314. * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
  315. * @param \Google\Protobuf\Internal\EnumDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
  316. * @return $this
  317. */
  318. public function setEnumType($var)
  319. {
  320. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
  321. $this->enum_type = $arr;
  322. $this->has_enum_type = true;
  323. return $this;
  324. }
  325. public function hasEnumType()
  326. {
  327. return $this->has_enum_type;
  328. }
  329. /**
  330. * Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
  331. * @return \Google\Protobuf\Internal\RepeatedField
  332. */
  333. public function getService()
  334. {
  335. return $this->service;
  336. }
  337. /**
  338. * Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
  339. * @param \Google\Protobuf\Internal\ServiceDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
  340. * @return $this
  341. */
  342. public function setService($var)
  343. {
  344. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\ServiceDescriptorProto::class);
  345. $this->service = $arr;
  346. $this->has_service = true;
  347. return $this;
  348. }
  349. public function hasService()
  350. {
  351. return $this->has_service;
  352. }
  353. /**
  354. * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
  355. * @return \Google\Protobuf\Internal\RepeatedField
  356. */
  357. public function getExtension()
  358. {
  359. return $this->extension;
  360. }
  361. /**
  362. * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
  363. * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
  364. * @return $this
  365. */
  366. public function setExtension($var)
  367. {
  368. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
  369. $this->extension = $arr;
  370. $this->has_extension = true;
  371. return $this;
  372. }
  373. public function hasExtension()
  374. {
  375. return $this->has_extension;
  376. }
  377. /**
  378. * Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
  379. * @return \Google\Protobuf\Internal\FileOptions
  380. */
  381. public function getOptions()
  382. {
  383. return $this->options;
  384. }
  385. /**
  386. * Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
  387. * @param \Google\Protobuf\Internal\FileOptions $var
  388. * @return $this
  389. */
  390. public function setOptions($var)
  391. {
  392. GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FileOptions::class);
  393. $this->options = $var;
  394. $this->has_options = true;
  395. return $this;
  396. }
  397. public function hasOptions()
  398. {
  399. return $this->has_options;
  400. }
  401. /**
  402. * This field contains optional information about the original source code.
  403. * You may safely remove this entire field without harming runtime
  404. * functionality of the descriptors -- the information is needed only by
  405. * development tools.
  406. *
  407. * Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
  408. * @return \Google\Protobuf\Internal\SourceCodeInfo
  409. */
  410. public function getSourceCodeInfo()
  411. {
  412. return $this->source_code_info;
  413. }
  414. /**
  415. * This field contains optional information about the original source code.
  416. * You may safely remove this entire field without harming runtime
  417. * functionality of the descriptors -- the information is needed only by
  418. * development tools.
  419. *
  420. * Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
  421. * @param \Google\Protobuf\Internal\SourceCodeInfo $var
  422. * @return $this
  423. */
  424. public function setSourceCodeInfo($var)
  425. {
  426. GPBUtil::checkMessage($var, \Google\Protobuf\Internal\SourceCodeInfo::class);
  427. $this->source_code_info = $var;
  428. $this->has_source_code_info = true;
  429. return $this;
  430. }
  431. public function hasSourceCodeInfo()
  432. {
  433. return $this->has_source_code_info;
  434. }
  435. /**
  436. * The syntax of the proto file.
  437. * The supported values are "proto2" and "proto3".
  438. *
  439. * Generated from protobuf field <code>optional string syntax = 12;</code>
  440. * @return string
  441. */
  442. public function getSyntax()
  443. {
  444. return $this->syntax;
  445. }
  446. /**
  447. * The syntax of the proto file.
  448. * The supported values are "proto2" and "proto3".
  449. *
  450. * Generated from protobuf field <code>optional string syntax = 12;</code>
  451. * @param string $var
  452. * @return $this
  453. */
  454. public function setSyntax($var)
  455. {
  456. GPBUtil::checkString($var, True);
  457. $this->syntax = $var;
  458. $this->has_syntax = true;
  459. return $this;
  460. }
  461. public function hasSyntax()
  462. {
  463. return $this->has_syntax;
  464. }
  465. }