FileOptions.php 39 KB

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