FileOptions.php 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046
  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. * Generated from protobuf message <code>google.protobuf.FileOptions</code>
  12. */
  13. class FileOptions extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Sets the Java package where classes generated from this .proto will be
  17. * placed. By default, the proto package is used, but this is often
  18. * inappropriate because proto packages do not normally start with backwards
  19. * domain names.
  20. *
  21. * Generated from protobuf field <code>optional string java_package = 1;</code>
  22. */
  23. protected $java_package = '';
  24. private $has_java_package = false;
  25. /**
  26. * If set, all the classes from the .proto file are wrapped in a single
  27. * outer class with the given name. This applies to both Proto1
  28. * (equivalent to the old "--one_java_file" option) and Proto2 (where
  29. * a .proto always translates to a single class, but you may want to
  30. * explicitly choose the class name).
  31. *
  32. * Generated from protobuf field <code>optional string java_outer_classname = 8;</code>
  33. */
  34. protected $java_outer_classname = '';
  35. private $has_java_outer_classname = false;
  36. /**
  37. * If set true, then the Java code generator will generate a separate .java
  38. * file for each top-level message, enum, and service defined in the .proto
  39. * file. Thus, these types will *not* be nested inside the outer class
  40. * named by java_outer_classname. However, the outer class will still be
  41. * generated to contain the file's getDescriptor() method as well as any
  42. * top-level extensions defined in the file.
  43. *
  44. * Generated from protobuf field <code>optional bool java_multiple_files = 10 [default = false];</code>
  45. */
  46. protected $java_multiple_files = false;
  47. private $has_java_multiple_files = false;
  48. /**
  49. * This option does nothing.
  50. *
  51. * Generated from protobuf field <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
  52. */
  53. protected $java_generate_equals_and_hash = false;
  54. private $has_java_generate_equals_and_hash = false;
  55. /**
  56. * If set true, then the Java2 code generator will generate code that
  57. * throws an exception whenever an attempt is made to assign a non-UTF-8
  58. * byte sequence to a string field.
  59. * Message reflection will do the same.
  60. * However, an extension field still accepts non-UTF-8 byte sequences.
  61. * This option has no effect on when used with the lite runtime.
  62. *
  63. * Generated from protobuf field <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
  64. */
  65. protected $java_string_check_utf8 = false;
  66. private $has_java_string_check_utf8 = false;
  67. /**
  68. * Generated from protobuf field <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
  69. */
  70. protected $optimize_for = 0;
  71. private $has_optimize_for = false;
  72. /**
  73. * Sets the Go package where structs generated from this .proto will be
  74. * placed. If omitted, the Go package will be derived from the following:
  75. * - The basename of the package import path, if provided.
  76. * - Otherwise, the package statement in the .proto file, if present.
  77. * - Otherwise, the basename of the .proto file, without extension.
  78. *
  79. * Generated from protobuf field <code>optional string go_package = 11;</code>
  80. */
  81. protected $go_package = '';
  82. private $has_go_package = false;
  83. /**
  84. * Should generic services be generated in each language? "Generic" services
  85. * are not specific to any particular RPC system. They are generated by the
  86. * main code generators in each language (without additional plugins).
  87. * Generic services were the only kind of service generation supported by
  88. * early versions of google.protobuf.
  89. * Generic services are now considered deprecated in favor of using plugins
  90. * that generate code specific to your particular RPC system. Therefore,
  91. * these default to false. Old code which depends on generic services should
  92. * explicitly set them to true.
  93. *
  94. * Generated from protobuf field <code>optional bool cc_generic_services = 16 [default = false];</code>
  95. */
  96. protected $cc_generic_services = false;
  97. private $has_cc_generic_services = false;
  98. /**
  99. * Generated from protobuf field <code>optional bool java_generic_services = 17 [default = false];</code>
  100. */
  101. protected $java_generic_services = false;
  102. private $has_java_generic_services = false;
  103. /**
  104. * Generated from protobuf field <code>optional bool py_generic_services = 18 [default = false];</code>
  105. */
  106. protected $py_generic_services = false;
  107. private $has_py_generic_services = false;
  108. /**
  109. * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code>
  110. */
  111. protected $php_generic_services = false;
  112. private $has_php_generic_services = false;
  113. /**
  114. * Is this file deprecated?
  115. * Depending on the target platform, this can emit Deprecated annotations
  116. * for everything in the file, or it will be completely ignored; in the very
  117. * least, this is a formalization for deprecating files.
  118. *
  119. * Generated from protobuf field <code>optional bool deprecated = 23 [default = false];</code>
  120. */
  121. protected $deprecated = false;
  122. private $has_deprecated = false;
  123. /**
  124. * Enables the use of arenas for the proto messages in this file. This applies
  125. * only to generated classes for C++.
  126. *
  127. * Generated from protobuf field <code>optional bool cc_enable_arenas = 31 [default = false];</code>
  128. */
  129. protected $cc_enable_arenas = false;
  130. private $has_cc_enable_arenas = false;
  131. /**
  132. * Sets the objective c class prefix which is prepended to all objective c
  133. * generated classes from this .proto. There is no default.
  134. *
  135. * Generated from protobuf field <code>optional string objc_class_prefix = 36;</code>
  136. */
  137. protected $objc_class_prefix = '';
  138. private $has_objc_class_prefix = false;
  139. /**
  140. * Namespace for generated classes; defaults to the package.
  141. *
  142. * Generated from protobuf field <code>optional string csharp_namespace = 37;</code>
  143. */
  144. protected $csharp_namespace = '';
  145. private $has_csharp_namespace = false;
  146. /**
  147. * By default Swift generators will take the proto package and CamelCase it
  148. * replacing '.' with underscore and use that to prefix the types/symbols
  149. * defined. When this options is provided, they will use this value instead
  150. * to prefix the types/symbols defined.
  151. *
  152. * Generated from protobuf field <code>optional string swift_prefix = 39;</code>
  153. */
  154. protected $swift_prefix = '';
  155. private $has_swift_prefix = false;
  156. /**
  157. * Sets the php class prefix which is prepended to all php generated classes
  158. * from this .proto. Default is empty.
  159. *
  160. * Generated from protobuf field <code>optional string php_class_prefix = 40;</code>
  161. */
  162. protected $php_class_prefix = '';
  163. private $has_php_class_prefix = false;
  164. /**
  165. * Use this option to change the namespace of php generated classes. Default
  166. * is empty. When this option is empty, the package name will be used for
  167. * determining the namespace.
  168. *
  169. * Generated from protobuf field <code>optional string php_namespace = 41;</code>
  170. */
  171. protected $php_namespace = '';
  172. private $has_php_namespace = false;
  173. /**
  174. * Use this option to change the namespace of php generated metadata classes.
  175. * Default is empty. When this option is empty, the proto file name will be
  176. * used for determining the namespace.
  177. *
  178. * Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
  179. */
  180. protected $php_metadata_namespace = '';
  181. private $has_php_metadata_namespace = false;
  182. /**
  183. * Use this option to change the package of ruby generated classes. Default
  184. * is empty. When this option is not set, the package name will be used for
  185. * determining the ruby package.
  186. *
  187. * Generated from protobuf field <code>optional string ruby_package = 45;</code>
  188. */
  189. protected $ruby_package = '';
  190. private $has_ruby_package = false;
  191. /**
  192. * The parser stores options it doesn't recognize here.
  193. * See the documentation for the "Options" section above.
  194. *
  195. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  196. */
  197. private $uninterpreted_option;
  198. private $has_uninterpreted_option = false;
  199. /**
  200. * Constructor.
  201. *
  202. * @param array $data {
  203. * Optional. Data for populating the Message object.
  204. *
  205. * @type string $java_package
  206. * Sets the Java package where classes generated from this .proto will be
  207. * placed. By default, the proto package is used, but this is often
  208. * inappropriate because proto packages do not normally start with backwards
  209. * domain names.
  210. * @type string $java_outer_classname
  211. * If set, all the classes from the .proto file are wrapped in a single
  212. * outer class with the given name. This applies to both Proto1
  213. * (equivalent to the old "--one_java_file" option) and Proto2 (where
  214. * a .proto always translates to a single class, but you may want to
  215. * explicitly choose the class name).
  216. * @type bool $java_multiple_files
  217. * If set true, then the Java code generator will generate a separate .java
  218. * file for each top-level message, enum, and service defined in the .proto
  219. * file. Thus, these types will *not* be nested inside the outer class
  220. * named by java_outer_classname. However, the outer class will still be
  221. * generated to contain the file's getDescriptor() method as well as any
  222. * top-level extensions defined in the file.
  223. * @type bool $java_generate_equals_and_hash
  224. * This option does nothing.
  225. * @type bool $java_string_check_utf8
  226. * If set true, then the Java2 code generator will generate code that
  227. * throws an exception whenever an attempt is made to assign a non-UTF-8
  228. * byte sequence to a string field.
  229. * Message reflection will do the same.
  230. * However, an extension field still accepts non-UTF-8 byte sequences.
  231. * This option has no effect on when used with the lite runtime.
  232. * @type int $optimize_for
  233. * @type string $go_package
  234. * Sets the Go package where structs generated from this .proto will be
  235. * placed. If omitted, the Go package will be derived from the following:
  236. * - The basename of the package import path, if provided.
  237. * - Otherwise, the package statement in the .proto file, if present.
  238. * - Otherwise, the basename of the .proto file, without extension.
  239. * @type bool $cc_generic_services
  240. * Should generic services be generated in each language? "Generic" services
  241. * are not specific to any particular RPC system. They are generated by the
  242. * main code generators in each language (without additional plugins).
  243. * Generic services were the only kind of service generation supported by
  244. * early versions of google.protobuf.
  245. * Generic services are now considered deprecated in favor of using plugins
  246. * that generate code specific to your particular RPC system. Therefore,
  247. * these default to false. Old code which depends on generic services should
  248. * explicitly set them to true.
  249. * @type bool $java_generic_services
  250. * @type bool $py_generic_services
  251. * @type bool $php_generic_services
  252. * @type bool $deprecated
  253. * Is this file deprecated?
  254. * Depending on the target platform, this can emit Deprecated annotations
  255. * for everything in the file, or it will be completely ignored; in the very
  256. * least, this is a formalization for deprecating files.
  257. * @type bool $cc_enable_arenas
  258. * Enables the use of arenas for the proto messages in this file. This applies
  259. * only to generated classes for C++.
  260. * @type string $objc_class_prefix
  261. * Sets the objective c class prefix which is prepended to all objective c
  262. * generated classes from this .proto. There is no default.
  263. * @type string $csharp_namespace
  264. * Namespace for generated classes; defaults to the package.
  265. * @type string $swift_prefix
  266. * By default Swift generators will take the proto package and CamelCase it
  267. * replacing '.' with underscore and use that to prefix the types/symbols
  268. * defined. When this options is provided, they will use this value instead
  269. * to prefix the types/symbols defined.
  270. * @type string $php_class_prefix
  271. * Sets the php class prefix which is prepended to all php generated classes
  272. * from this .proto. Default is empty.
  273. * @type string $php_namespace
  274. * Use this option to change the namespace of php generated classes. Default
  275. * is empty. When this option is empty, the package name will be used for
  276. * determining the namespace.
  277. * @type string $php_metadata_namespace
  278. * Use this option to change the namespace of php generated metadata classes.
  279. * Default is empty. When this option is empty, the proto file name will be
  280. * used for determining the namespace.
  281. * @type string $ruby_package
  282. * Use this option to change the package of ruby generated classes. Default
  283. * is empty. When this option is not set, the package name will be used for
  284. * determining the ruby package.
  285. * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
  286. * The parser stores options it doesn't recognize here.
  287. * See the documentation for the "Options" section above.
  288. * }
  289. */
  290. public function __construct($data = NULL) {
  291. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  292. parent::__construct($data);
  293. }
  294. /**
  295. * Sets the Java package where classes generated from this .proto will be
  296. * placed. By default, the proto package is used, but this is often
  297. * inappropriate because proto packages do not normally start with backwards
  298. * domain names.
  299. *
  300. * Generated from protobuf field <code>optional string java_package = 1;</code>
  301. * @return string
  302. */
  303. public function getJavaPackage()
  304. {
  305. return $this->java_package;
  306. }
  307. /**
  308. * Sets the Java package where classes generated from this .proto will be
  309. * placed. By default, the proto package is used, but this is often
  310. * inappropriate because proto packages do not normally start with backwards
  311. * domain names.
  312. *
  313. * Generated from protobuf field <code>optional string java_package = 1;</code>
  314. * @param string $var
  315. * @return $this
  316. */
  317. public function setJavaPackage($var)
  318. {
  319. GPBUtil::checkString($var, True);
  320. $this->java_package = $var;
  321. $this->has_java_package = true;
  322. return $this;
  323. }
  324. public function hasJavaPackage()
  325. {
  326. return $this->has_java_package;
  327. }
  328. /**
  329. * If set, all the classes from the .proto file are wrapped in a single
  330. * outer class with the given name. This applies to both Proto1
  331. * (equivalent to the old "--one_java_file" option) and Proto2 (where
  332. * a .proto always translates to a single class, but you may want to
  333. * explicitly choose the class name).
  334. *
  335. * Generated from protobuf field <code>optional string java_outer_classname = 8;</code>
  336. * @return string
  337. */
  338. public function getJavaOuterClassname()
  339. {
  340. return $this->java_outer_classname;
  341. }
  342. /**
  343. * If set, all the classes from the .proto file are wrapped in a single
  344. * outer class with the given name. This applies to both Proto1
  345. * (equivalent to the old "--one_java_file" option) and Proto2 (where
  346. * a .proto always translates to a single class, but you may want to
  347. * explicitly choose the class name).
  348. *
  349. * Generated from protobuf field <code>optional string java_outer_classname = 8;</code>
  350. * @param string $var
  351. * @return $this
  352. */
  353. public function setJavaOuterClassname($var)
  354. {
  355. GPBUtil::checkString($var, True);
  356. $this->java_outer_classname = $var;
  357. $this->has_java_outer_classname = true;
  358. return $this;
  359. }
  360. public function hasJavaOuterClassname()
  361. {
  362. return $this->has_java_outer_classname;
  363. }
  364. /**
  365. * If set true, then the Java code generator will generate a separate .java
  366. * file for each top-level message, enum, and service defined in the .proto
  367. * file. Thus, these types will *not* be nested inside the outer class
  368. * named by java_outer_classname. However, the outer class will still be
  369. * generated to contain the file's getDescriptor() method as well as any
  370. * top-level extensions defined in the file.
  371. *
  372. * Generated from protobuf field <code>optional bool java_multiple_files = 10 [default = false];</code>
  373. * @return bool
  374. */
  375. public function getJavaMultipleFiles()
  376. {
  377. return $this->java_multiple_files;
  378. }
  379. /**
  380. * If set true, then the Java code generator will generate a separate .java
  381. * file for each top-level message, enum, and service defined in the .proto
  382. * file. Thus, these types will *not* be nested inside the outer class
  383. * named by java_outer_classname. However, the outer class will still be
  384. * generated to contain the file's getDescriptor() method as well as any
  385. * top-level extensions defined in the file.
  386. *
  387. * Generated from protobuf field <code>optional bool java_multiple_files = 10 [default = false];</code>
  388. * @param bool $var
  389. * @return $this
  390. */
  391. public function setJavaMultipleFiles($var)
  392. {
  393. GPBUtil::checkBool($var);
  394. $this->java_multiple_files = $var;
  395. $this->has_java_multiple_files = true;
  396. return $this;
  397. }
  398. public function hasJavaMultipleFiles()
  399. {
  400. return $this->has_java_multiple_files;
  401. }
  402. /**
  403. * This option does nothing.
  404. *
  405. * Generated from protobuf field <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
  406. * @return bool
  407. */
  408. public function getJavaGenerateEqualsAndHash()
  409. {
  410. return $this->java_generate_equals_and_hash;
  411. }
  412. /**
  413. * This option does nothing.
  414. *
  415. * Generated from protobuf field <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
  416. * @param bool $var
  417. * @return $this
  418. */
  419. public function setJavaGenerateEqualsAndHash($var)
  420. {
  421. GPBUtil::checkBool($var);
  422. $this->java_generate_equals_and_hash = $var;
  423. $this->has_java_generate_equals_and_hash = true;
  424. return $this;
  425. }
  426. public function hasJavaGenerateEqualsAndHash()
  427. {
  428. return $this->has_java_generate_equals_and_hash;
  429. }
  430. /**
  431. * If set true, then the Java2 code generator will generate code that
  432. * throws an exception whenever an attempt is made to assign a non-UTF-8
  433. * byte sequence to a string field.
  434. * Message reflection will do the same.
  435. * However, an extension field still accepts non-UTF-8 byte sequences.
  436. * This option has no effect on when used with the lite runtime.
  437. *
  438. * Generated from protobuf field <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
  439. * @return bool
  440. */
  441. public function getJavaStringCheckUtf8()
  442. {
  443. return $this->java_string_check_utf8;
  444. }
  445. /**
  446. * If set true, then the Java2 code generator will generate code that
  447. * throws an exception whenever an attempt is made to assign a non-UTF-8
  448. * byte sequence to a string field.
  449. * Message reflection will do the same.
  450. * However, an extension field still accepts non-UTF-8 byte sequences.
  451. * This option has no effect on when used with the lite runtime.
  452. *
  453. * Generated from protobuf field <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
  454. * @param bool $var
  455. * @return $this
  456. */
  457. public function setJavaStringCheckUtf8($var)
  458. {
  459. GPBUtil::checkBool($var);
  460. $this->java_string_check_utf8 = $var;
  461. $this->has_java_string_check_utf8 = true;
  462. return $this;
  463. }
  464. public function hasJavaStringCheckUtf8()
  465. {
  466. return $this->has_java_string_check_utf8;
  467. }
  468. /**
  469. * Generated from protobuf field <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
  470. * @return int
  471. */
  472. public function getOptimizeFor()
  473. {
  474. return $this->optimize_for;
  475. }
  476. /**
  477. * Generated from protobuf field <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
  478. * @param int $var
  479. * @return $this
  480. */
  481. public function setOptimizeFor($var)
  482. {
  483. GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FileOptions_OptimizeMode::class);
  484. $this->optimize_for = $var;
  485. $this->has_optimize_for = true;
  486. return $this;
  487. }
  488. public function hasOptimizeFor()
  489. {
  490. return $this->has_optimize_for;
  491. }
  492. /**
  493. * Sets the Go package where structs generated from this .proto will be
  494. * placed. If omitted, the Go package will be derived from the following:
  495. * - The basename of the package import path, if provided.
  496. * - Otherwise, the package statement in the .proto file, if present.
  497. * - Otherwise, the basename of the .proto file, without extension.
  498. *
  499. * Generated from protobuf field <code>optional string go_package = 11;</code>
  500. * @return string
  501. */
  502. public function getGoPackage()
  503. {
  504. return $this->go_package;
  505. }
  506. /**
  507. * Sets the Go package where structs generated from this .proto will be
  508. * placed. If omitted, the Go package will be derived from the following:
  509. * - The basename of the package import path, if provided.
  510. * - Otherwise, the package statement in the .proto file, if present.
  511. * - Otherwise, the basename of the .proto file, without extension.
  512. *
  513. * Generated from protobuf field <code>optional string go_package = 11;</code>
  514. * @param string $var
  515. * @return $this
  516. */
  517. public function setGoPackage($var)
  518. {
  519. GPBUtil::checkString($var, True);
  520. $this->go_package = $var;
  521. $this->has_go_package = true;
  522. return $this;
  523. }
  524. public function hasGoPackage()
  525. {
  526. return $this->has_go_package;
  527. }
  528. /**
  529. * Should generic services be generated in each language? "Generic" services
  530. * are not specific to any particular RPC system. They are generated by the
  531. * main code generators in each language (without additional plugins).
  532. * Generic services were the only kind of service generation supported by
  533. * early versions of google.protobuf.
  534. * Generic services are now considered deprecated in favor of using plugins
  535. * that generate code specific to your particular RPC system. Therefore,
  536. * these default to false. Old code which depends on generic services should
  537. * explicitly set them to true.
  538. *
  539. * Generated from protobuf field <code>optional bool cc_generic_services = 16 [default = false];</code>
  540. * @return bool
  541. */
  542. public function getCcGenericServices()
  543. {
  544. return $this->cc_generic_services;
  545. }
  546. /**
  547. * Should generic services be generated in each language? "Generic" services
  548. * are not specific to any particular RPC system. They are generated by the
  549. * main code generators in each language (without additional plugins).
  550. * Generic services were the only kind of service generation supported by
  551. * early versions of google.protobuf.
  552. * Generic services are now considered deprecated in favor of using plugins
  553. * that generate code specific to your particular RPC system. Therefore,
  554. * these default to false. Old code which depends on generic services should
  555. * explicitly set them to true.
  556. *
  557. * Generated from protobuf field <code>optional bool cc_generic_services = 16 [default = false];</code>
  558. * @param bool $var
  559. * @return $this
  560. */
  561. public function setCcGenericServices($var)
  562. {
  563. GPBUtil::checkBool($var);
  564. $this->cc_generic_services = $var;
  565. $this->has_cc_generic_services = true;
  566. return $this;
  567. }
  568. public function hasCcGenericServices()
  569. {
  570. return $this->has_cc_generic_services;
  571. }
  572. /**
  573. * Generated from protobuf field <code>optional bool java_generic_services = 17 [default = false];</code>
  574. * @return bool
  575. */
  576. public function getJavaGenericServices()
  577. {
  578. return $this->java_generic_services;
  579. }
  580. /**
  581. * Generated from protobuf field <code>optional bool java_generic_services = 17 [default = false];</code>
  582. * @param bool $var
  583. * @return $this
  584. */
  585. public function setJavaGenericServices($var)
  586. {
  587. GPBUtil::checkBool($var);
  588. $this->java_generic_services = $var;
  589. $this->has_java_generic_services = true;
  590. return $this;
  591. }
  592. public function hasJavaGenericServices()
  593. {
  594. return $this->has_java_generic_services;
  595. }
  596. /**
  597. * Generated from protobuf field <code>optional bool py_generic_services = 18 [default = false];</code>
  598. * @return bool
  599. */
  600. public function getPyGenericServices()
  601. {
  602. return $this->py_generic_services;
  603. }
  604. /**
  605. * Generated from protobuf field <code>optional bool py_generic_services = 18 [default = false];</code>
  606. * @param bool $var
  607. * @return $this
  608. */
  609. public function setPyGenericServices($var)
  610. {
  611. GPBUtil::checkBool($var);
  612. $this->py_generic_services = $var;
  613. $this->has_py_generic_services = true;
  614. return $this;
  615. }
  616. public function hasPyGenericServices()
  617. {
  618. return $this->has_py_generic_services;
  619. }
  620. /**
  621. * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code>
  622. * @return bool
  623. */
  624. public function getPhpGenericServices()
  625. {
  626. return $this->php_generic_services;
  627. }
  628. /**
  629. * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code>
  630. * @param bool $var
  631. * @return $this
  632. */
  633. public function setPhpGenericServices($var)
  634. {
  635. GPBUtil::checkBool($var);
  636. $this->php_generic_services = $var;
  637. $this->has_php_generic_services = true;
  638. return $this;
  639. }
  640. public function hasPhpGenericServices()
  641. {
  642. return $this->has_php_generic_services;
  643. }
  644. /**
  645. * Is this file deprecated?
  646. * Depending on the target platform, this can emit Deprecated annotations
  647. * for everything in the file, or it will be completely ignored; in the very
  648. * least, this is a formalization for deprecating files.
  649. *
  650. * Generated from protobuf field <code>optional bool deprecated = 23 [default = false];</code>
  651. * @return bool
  652. */
  653. public function getDeprecated()
  654. {
  655. return $this->deprecated;
  656. }
  657. /**
  658. * Is this file deprecated?
  659. * Depending on the target platform, this can emit Deprecated annotations
  660. * for everything in the file, or it will be completely ignored; in the very
  661. * least, this is a formalization for deprecating files.
  662. *
  663. * Generated from protobuf field <code>optional bool deprecated = 23 [default = false];</code>
  664. * @param bool $var
  665. * @return $this
  666. */
  667. public function setDeprecated($var)
  668. {
  669. GPBUtil::checkBool($var);
  670. $this->deprecated = $var;
  671. $this->has_deprecated = true;
  672. return $this;
  673. }
  674. public function hasDeprecated()
  675. {
  676. return $this->has_deprecated;
  677. }
  678. /**
  679. * Enables the use of arenas for the proto messages in this file. This applies
  680. * only to generated classes for C++.
  681. *
  682. * Generated from protobuf field <code>optional bool cc_enable_arenas = 31 [default = false];</code>
  683. * @return bool
  684. */
  685. public function getCcEnableArenas()
  686. {
  687. return $this->cc_enable_arenas;
  688. }
  689. /**
  690. * Enables the use of arenas for the proto messages in this file. This applies
  691. * only to generated classes for C++.
  692. *
  693. * Generated from protobuf field <code>optional bool cc_enable_arenas = 31 [default = false];</code>
  694. * @param bool $var
  695. * @return $this
  696. */
  697. public function setCcEnableArenas($var)
  698. {
  699. GPBUtil::checkBool($var);
  700. $this->cc_enable_arenas = $var;
  701. $this->has_cc_enable_arenas = true;
  702. return $this;
  703. }
  704. public function hasCcEnableArenas()
  705. {
  706. return $this->has_cc_enable_arenas;
  707. }
  708. /**
  709. * Sets the objective c class prefix which is prepended to all objective c
  710. * generated classes from this .proto. There is no default.
  711. *
  712. * Generated from protobuf field <code>optional string objc_class_prefix = 36;</code>
  713. * @return string
  714. */
  715. public function getObjcClassPrefix()
  716. {
  717. return $this->objc_class_prefix;
  718. }
  719. /**
  720. * Sets the objective c class prefix which is prepended to all objective c
  721. * generated classes from this .proto. There is no default.
  722. *
  723. * Generated from protobuf field <code>optional string objc_class_prefix = 36;</code>
  724. * @param string $var
  725. * @return $this
  726. */
  727. public function setObjcClassPrefix($var)
  728. {
  729. GPBUtil::checkString($var, True);
  730. $this->objc_class_prefix = $var;
  731. $this->has_objc_class_prefix = true;
  732. return $this;
  733. }
  734. public function hasObjcClassPrefix()
  735. {
  736. return $this->has_objc_class_prefix;
  737. }
  738. /**
  739. * Namespace for generated classes; defaults to the package.
  740. *
  741. * Generated from protobuf field <code>optional string csharp_namespace = 37;</code>
  742. * @return string
  743. */
  744. public function getCsharpNamespace()
  745. {
  746. return $this->csharp_namespace;
  747. }
  748. /**
  749. * Namespace for generated classes; defaults to the package.
  750. *
  751. * Generated from protobuf field <code>optional string csharp_namespace = 37;</code>
  752. * @param string $var
  753. * @return $this
  754. */
  755. public function setCsharpNamespace($var)
  756. {
  757. GPBUtil::checkString($var, True);
  758. $this->csharp_namespace = $var;
  759. $this->has_csharp_namespace = true;
  760. return $this;
  761. }
  762. public function hasCsharpNamespace()
  763. {
  764. return $this->has_csharp_namespace;
  765. }
  766. /**
  767. * By default Swift generators will take the proto package and CamelCase it
  768. * replacing '.' with underscore and use that to prefix the types/symbols
  769. * defined. When this options is provided, they will use this value instead
  770. * to prefix the types/symbols defined.
  771. *
  772. * Generated from protobuf field <code>optional string swift_prefix = 39;</code>
  773. * @return string
  774. */
  775. public function getSwiftPrefix()
  776. {
  777. return $this->swift_prefix;
  778. }
  779. /**
  780. * By default Swift generators will take the proto package and CamelCase it
  781. * replacing '.' with underscore and use that to prefix the types/symbols
  782. * defined. When this options is provided, they will use this value instead
  783. * to prefix the types/symbols defined.
  784. *
  785. * Generated from protobuf field <code>optional string swift_prefix = 39;</code>
  786. * @param string $var
  787. * @return $this
  788. */
  789. public function setSwiftPrefix($var)
  790. {
  791. GPBUtil::checkString($var, True);
  792. $this->swift_prefix = $var;
  793. $this->has_swift_prefix = true;
  794. return $this;
  795. }
  796. public function hasSwiftPrefix()
  797. {
  798. return $this->has_swift_prefix;
  799. }
  800. /**
  801. * Sets the php class prefix which is prepended to all php generated classes
  802. * from this .proto. Default is empty.
  803. *
  804. * Generated from protobuf field <code>optional string php_class_prefix = 40;</code>
  805. * @return string
  806. */
  807. public function getPhpClassPrefix()
  808. {
  809. return $this->php_class_prefix;
  810. }
  811. /**
  812. * Sets the php class prefix which is prepended to all php generated classes
  813. * from this .proto. Default is empty.
  814. *
  815. * Generated from protobuf field <code>optional string php_class_prefix = 40;</code>
  816. * @param string $var
  817. * @return $this
  818. */
  819. public function setPhpClassPrefix($var)
  820. {
  821. GPBUtil::checkString($var, True);
  822. $this->php_class_prefix = $var;
  823. $this->has_php_class_prefix = true;
  824. return $this;
  825. }
  826. public function hasPhpClassPrefix()
  827. {
  828. return $this->has_php_class_prefix;
  829. }
  830. /**
  831. * Use this option to change the namespace of php generated classes. Default
  832. * is empty. When this option is empty, the package name will be used for
  833. * determining the namespace.
  834. *
  835. * Generated from protobuf field <code>optional string php_namespace = 41;</code>
  836. * @return string
  837. */
  838. public function getPhpNamespace()
  839. {
  840. return $this->php_namespace;
  841. }
  842. /**
  843. * Use this option to change the namespace of php generated classes. Default
  844. * is empty. When this option is empty, the package name will be used for
  845. * determining the namespace.
  846. *
  847. * Generated from protobuf field <code>optional string php_namespace = 41;</code>
  848. * @param string $var
  849. * @return $this
  850. */
  851. public function setPhpNamespace($var)
  852. {
  853. GPBUtil::checkString($var, True);
  854. $this->php_namespace = $var;
  855. $this->has_php_namespace = true;
  856. return $this;
  857. }
  858. public function hasPhpNamespace()
  859. {
  860. return $this->has_php_namespace;
  861. }
  862. /**
  863. * Use this option to change the namespace of php generated metadata classes.
  864. * Default is empty. When this option is empty, the proto file name will be
  865. * used for determining the namespace.
  866. *
  867. * Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
  868. * @return string
  869. */
  870. public function getPhpMetadataNamespace()
  871. {
  872. return $this->php_metadata_namespace;
  873. }
  874. /**
  875. * Use this option to change the namespace of php generated metadata classes.
  876. * Default is empty. When this option is empty, the proto file name will be
  877. * used for determining the namespace.
  878. *
  879. * Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
  880. * @param string $var
  881. * @return $this
  882. */
  883. public function setPhpMetadataNamespace($var)
  884. {
  885. GPBUtil::checkString($var, True);
  886. $this->php_metadata_namespace = $var;
  887. $this->has_php_metadata_namespace = true;
  888. return $this;
  889. }
  890. public function hasPhpMetadataNamespace()
  891. {
  892. return $this->has_php_metadata_namespace;
  893. }
  894. /**
  895. * Use this option to change the package of ruby generated classes. Default
  896. * is empty. When this option is not set, the package name will be used for
  897. * determining the ruby package.
  898. *
  899. * Generated from protobuf field <code>optional string ruby_package = 45;</code>
  900. * @return string
  901. */
  902. public function getRubyPackage()
  903. {
  904. return $this->ruby_package;
  905. }
  906. /**
  907. * Use this option to change the package of ruby generated classes. Default
  908. * is empty. When this option is not set, the package name will be used for
  909. * determining the ruby package.
  910. *
  911. * Generated from protobuf field <code>optional string ruby_package = 45;</code>
  912. * @param string $var
  913. * @return $this
  914. */
  915. public function setRubyPackage($var)
  916. {
  917. GPBUtil::checkString($var, True);
  918. $this->ruby_package = $var;
  919. $this->has_ruby_package = true;
  920. return $this;
  921. }
  922. public function hasRubyPackage()
  923. {
  924. return $this->has_ruby_package;
  925. }
  926. /**
  927. * The parser stores options it doesn't recognize here.
  928. * See the documentation for the "Options" section above.
  929. *
  930. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  931. * @return \Google\Protobuf\Internal\RepeatedField
  932. */
  933. public function getUninterpretedOption()
  934. {
  935. return $this->uninterpreted_option;
  936. }
  937. /**
  938. * The parser stores options it doesn't recognize here.
  939. * See the documentation for the "Options" section above.
  940. *
  941. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  942. * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
  943. * @return $this
  944. */
  945. public function setUninterpretedOption($var)
  946. {
  947. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
  948. $this->uninterpreted_option = $arr;
  949. $this->has_uninterpreted_option = true;
  950. return $this;
  951. }
  952. public function hasUninterpretedOption()
  953. {
  954. return $this->has_uninterpreted_option;
  955. }
  956. }