FileOptions.php 38 KB

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