FileDescriptorProto.php 16 KB

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