Source: proto/google/protobuf/descriptor_pb.js

  1. // source: google/protobuf/descriptor.proto
  2. /**
  3. * @fileoverview
  4. * @enhanceable
  5. * @suppress {messageConventions} JS Compiler reports an error if a variable or
  6. * field starts with 'MSG_' and isn't a translatable message.
  7. * @public
  8. */
  9. // GENERATED CODE -- DO NOT EDIT!
  10. var jspb = require('google-protobuf');
  11. var goog = jspb;
  12. var global = Function('return this')();
  13. goog.exportSymbol('proto.google.protobuf.DescriptorProto', null, global);
  14. goog.exportSymbol('proto.google.protobuf.DescriptorProto.ExtensionRange', null, global);
  15. goog.exportSymbol('proto.google.protobuf.DescriptorProto.ReservedRange', null, global);
  16. goog.exportSymbol('proto.google.protobuf.EnumDescriptorProto', null, global);
  17. goog.exportSymbol('proto.google.protobuf.EnumDescriptorProto.EnumReservedRange', null, global);
  18. goog.exportSymbol('proto.google.protobuf.EnumOptions', null, global);
  19. goog.exportSymbol('proto.google.protobuf.EnumValueDescriptorProto', null, global);
  20. goog.exportSymbol('proto.google.protobuf.EnumValueOptions', null, global);
  21. goog.exportSymbol('proto.google.protobuf.ExtensionRangeOptions', null, global);
  22. goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto', null, global);
  23. goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto.Label', null, global);
  24. goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto.Type', null, global);
  25. goog.exportSymbol('proto.google.protobuf.FieldOptions', null, global);
  26. goog.exportSymbol('proto.google.protobuf.FieldOptions.CType', null, global);
  27. goog.exportSymbol('proto.google.protobuf.FieldOptions.JSType', null, global);
  28. goog.exportSymbol('proto.google.protobuf.FileDescriptorProto', null, global);
  29. goog.exportSymbol('proto.google.protobuf.FileDescriptorSet', null, global);
  30. goog.exportSymbol('proto.google.protobuf.FileOptions', null, global);
  31. goog.exportSymbol('proto.google.protobuf.FileOptions.OptimizeMode', null, global);
  32. goog.exportSymbol('proto.google.protobuf.GeneratedCodeInfo', null, global);
  33. goog.exportSymbol('proto.google.protobuf.GeneratedCodeInfo.Annotation', null, global);
  34. goog.exportSymbol('proto.google.protobuf.MessageOptions', null, global);
  35. goog.exportSymbol('proto.google.protobuf.MethodDescriptorProto', null, global);
  36. goog.exportSymbol('proto.google.protobuf.MethodOptions', null, global);
  37. goog.exportSymbol('proto.google.protobuf.MethodOptions.IdempotencyLevel', null, global);
  38. goog.exportSymbol('proto.google.protobuf.OneofDescriptorProto', null, global);
  39. goog.exportSymbol('proto.google.protobuf.OneofOptions', null, global);
  40. goog.exportSymbol('proto.google.protobuf.ServiceDescriptorProto', null, global);
  41. goog.exportSymbol('proto.google.protobuf.ServiceOptions', null, global);
  42. goog.exportSymbol('proto.google.protobuf.SourceCodeInfo', null, global);
  43. goog.exportSymbol('proto.google.protobuf.SourceCodeInfo.Location', null, global);
  44. goog.exportSymbol('proto.google.protobuf.UninterpretedOption', null, global);
  45. goog.exportSymbol('proto.google.protobuf.UninterpretedOption.NamePart', null, global);
  46. /**
  47. * Generated by JsPbCodeGenerator.
  48. * @param {Array=} opt_data Optional initial data array, typically from a
  49. * server response, or constructed directly in Javascript. The array is used
  50. * in place and becomes part of the constructed object. It is not cloned.
  51. * If no data is provided, the constructed object will be empty, but still
  52. * valid.
  53. * @extends {jspb.Message}
  54. * @constructor
  55. */
  56. proto.google.protobuf.FileDescriptorSet = function(opt_data) {
  57. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorSet.repeatedFields_, null);
  58. };
  59. goog.inherits(proto.google.protobuf.FileDescriptorSet, jspb.Message);
  60. if (goog.DEBUG && !COMPILED) {
  61. /**
  62. * @public
  63. * @override
  64. */
  65. proto.google.protobuf.FileDescriptorSet.displayName = 'proto.google.protobuf.FileDescriptorSet';
  66. }
  67. /**
  68. * Generated by JsPbCodeGenerator.
  69. * @param {Array=} opt_data Optional initial data array, typically from a
  70. * server response, or constructed directly in Javascript. The array is used
  71. * in place and becomes part of the constructed object. It is not cloned.
  72. * If no data is provided, the constructed object will be empty, but still
  73. * valid.
  74. * @extends {jspb.Message}
  75. * @constructor
  76. */
  77. proto.google.protobuf.FileDescriptorProto = function(opt_data) {
  78. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorProto.repeatedFields_, null);
  79. };
  80. goog.inherits(proto.google.protobuf.FileDescriptorProto, jspb.Message);
  81. if (goog.DEBUG && !COMPILED) {
  82. /**
  83. * @public
  84. * @override
  85. */
  86. proto.google.protobuf.FileDescriptorProto.displayName = 'proto.google.protobuf.FileDescriptorProto';
  87. }
  88. /**
  89. * Generated by JsPbCodeGenerator.
  90. * @param {Array=} opt_data Optional initial data array, typically from a
  91. * server response, or constructed directly in Javascript. The array is used
  92. * in place and becomes part of the constructed object. It is not cloned.
  93. * If no data is provided, the constructed object will be empty, but still
  94. * valid.
  95. * @extends {jspb.Message}
  96. * @constructor
  97. */
  98. proto.google.protobuf.DescriptorProto = function(opt_data) {
  99. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.DescriptorProto.repeatedFields_, null);
  100. };
  101. goog.inherits(proto.google.protobuf.DescriptorProto, jspb.Message);
  102. if (goog.DEBUG && !COMPILED) {
  103. /**
  104. * @public
  105. * @override
  106. */
  107. proto.google.protobuf.DescriptorProto.displayName = 'proto.google.protobuf.DescriptorProto';
  108. }
  109. /**
  110. * Generated by JsPbCodeGenerator.
  111. * @param {Array=} opt_data Optional initial data array, typically from a
  112. * server response, or constructed directly in Javascript. The array is used
  113. * in place and becomes part of the constructed object. It is not cloned.
  114. * If no data is provided, the constructed object will be empty, but still
  115. * valid.
  116. * @extends {jspb.Message}
  117. * @constructor
  118. */
  119. proto.google.protobuf.DescriptorProto.ExtensionRange = function(opt_data) {
  120. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  121. };
  122. goog.inherits(proto.google.protobuf.DescriptorProto.ExtensionRange, jspb.Message);
  123. if (goog.DEBUG && !COMPILED) {
  124. /**
  125. * @public
  126. * @override
  127. */
  128. proto.google.protobuf.DescriptorProto.ExtensionRange.displayName = 'proto.google.protobuf.DescriptorProto.ExtensionRange';
  129. }
  130. /**
  131. * Generated by JsPbCodeGenerator.
  132. * @param {Array=} opt_data Optional initial data array, typically from a
  133. * server response, or constructed directly in Javascript. The array is used
  134. * in place and becomes part of the constructed object. It is not cloned.
  135. * If no data is provided, the constructed object will be empty, but still
  136. * valid.
  137. * @extends {jspb.Message}
  138. * @constructor
  139. */
  140. proto.google.protobuf.DescriptorProto.ReservedRange = function(opt_data) {
  141. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  142. };
  143. goog.inherits(proto.google.protobuf.DescriptorProto.ReservedRange, jspb.Message);
  144. if (goog.DEBUG && !COMPILED) {
  145. /**
  146. * @public
  147. * @override
  148. */
  149. proto.google.protobuf.DescriptorProto.ReservedRange.displayName = 'proto.google.protobuf.DescriptorProto.ReservedRange';
  150. }
  151. /**
  152. * Generated by JsPbCodeGenerator.
  153. * @param {Array=} opt_data Optional initial data array, typically from a
  154. * server response, or constructed directly in Javascript. The array is used
  155. * in place and becomes part of the constructed object. It is not cloned.
  156. * If no data is provided, the constructed object will be empty, but still
  157. * valid.
  158. * @extends {jspb.Message}
  159. * @constructor
  160. */
  161. proto.google.protobuf.ExtensionRangeOptions = function(opt_data) {
  162. jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ExtensionRangeOptions.repeatedFields_, null);
  163. };
  164. goog.inherits(proto.google.protobuf.ExtensionRangeOptions, jspb.Message);
  165. if (goog.DEBUG && !COMPILED) {
  166. /**
  167. * @public
  168. * @override
  169. */
  170. proto.google.protobuf.ExtensionRangeOptions.displayName = 'proto.google.protobuf.ExtensionRangeOptions';
  171. }
  172. /**
  173. * The extensions registered with this message class. This is a map of
  174. * extension field number to fieldInfo object.
  175. *
  176. * For example:
  177. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  178. *
  179. * fieldName contains the JsCompiler renamed field name property so that it
  180. * works in OPTIMIZED mode.
  181. *
  182. * @type {!Object<number, jspb.ExtensionFieldInfo>}
  183. */
  184. proto.google.protobuf.ExtensionRangeOptions.extensions = {};
  185. /**
  186. * The extensions registered with this message class. This is a map of
  187. * extension field number to fieldInfo object.
  188. *
  189. * For example:
  190. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  191. *
  192. * fieldName contains the JsCompiler renamed field name property so that it
  193. * works in OPTIMIZED mode.
  194. *
  195. * @type {!Object<number, jspb.ExtensionFieldBinaryInfo>}
  196. */
  197. proto.google.protobuf.ExtensionRangeOptions.extensionsBinary = {};
  198. /**
  199. * Generated by JsPbCodeGenerator.
  200. * @param {Array=} opt_data Optional initial data array, typically from a
  201. * server response, or constructed directly in Javascript. The array is used
  202. * in place and becomes part of the constructed object. It is not cloned.
  203. * If no data is provided, the constructed object will be empty, but still
  204. * valid.
  205. * @extends {jspb.Message}
  206. * @constructor
  207. */
  208. proto.google.protobuf.FieldDescriptorProto = function(opt_data) {
  209. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  210. };
  211. goog.inherits(proto.google.protobuf.FieldDescriptorProto, jspb.Message);
  212. if (goog.DEBUG && !COMPILED) {
  213. /**
  214. * @public
  215. * @override
  216. */
  217. proto.google.protobuf.FieldDescriptorProto.displayName = 'proto.google.protobuf.FieldDescriptorProto';
  218. }
  219. /**
  220. * Generated by JsPbCodeGenerator.
  221. * @param {Array=} opt_data Optional initial data array, typically from a
  222. * server response, or constructed directly in Javascript. The array is used
  223. * in place and becomes part of the constructed object. It is not cloned.
  224. * If no data is provided, the constructed object will be empty, but still
  225. * valid.
  226. * @extends {jspb.Message}
  227. * @constructor
  228. */
  229. proto.google.protobuf.OneofDescriptorProto = function(opt_data) {
  230. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  231. };
  232. goog.inherits(proto.google.protobuf.OneofDescriptorProto, jspb.Message);
  233. if (goog.DEBUG && !COMPILED) {
  234. /**
  235. * @public
  236. * @override
  237. */
  238. proto.google.protobuf.OneofDescriptorProto.displayName = 'proto.google.protobuf.OneofDescriptorProto';
  239. }
  240. /**
  241. * Generated by JsPbCodeGenerator.
  242. * @param {Array=} opt_data Optional initial data array, typically from a
  243. * server response, or constructed directly in Javascript. The array is used
  244. * in place and becomes part of the constructed object. It is not cloned.
  245. * If no data is provided, the constructed object will be empty, but still
  246. * valid.
  247. * @extends {jspb.Message}
  248. * @constructor
  249. */
  250. proto.google.protobuf.EnumDescriptorProto = function(opt_data) {
  251. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.EnumDescriptorProto.repeatedFields_, null);
  252. };
  253. goog.inherits(proto.google.protobuf.EnumDescriptorProto, jspb.Message);
  254. if (goog.DEBUG && !COMPILED) {
  255. /**
  256. * @public
  257. * @override
  258. */
  259. proto.google.protobuf.EnumDescriptorProto.displayName = 'proto.google.protobuf.EnumDescriptorProto';
  260. }
  261. /**
  262. * Generated by JsPbCodeGenerator.
  263. * @param {Array=} opt_data Optional initial data array, typically from a
  264. * server response, or constructed directly in Javascript. The array is used
  265. * in place and becomes part of the constructed object. It is not cloned.
  266. * If no data is provided, the constructed object will be empty, but still
  267. * valid.
  268. * @extends {jspb.Message}
  269. * @constructor
  270. */
  271. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange = function(opt_data) {
  272. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  273. };
  274. goog.inherits(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, jspb.Message);
  275. if (goog.DEBUG && !COMPILED) {
  276. /**
  277. * @public
  278. * @override
  279. */
  280. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.displayName = 'proto.google.protobuf.EnumDescriptorProto.EnumReservedRange';
  281. }
  282. /**
  283. * Generated by JsPbCodeGenerator.
  284. * @param {Array=} opt_data Optional initial data array, typically from a
  285. * server response, or constructed directly in Javascript. The array is used
  286. * in place and becomes part of the constructed object. It is not cloned.
  287. * If no data is provided, the constructed object will be empty, but still
  288. * valid.
  289. * @extends {jspb.Message}
  290. * @constructor
  291. */
  292. proto.google.protobuf.EnumValueDescriptorProto = function(opt_data) {
  293. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  294. };
  295. goog.inherits(proto.google.protobuf.EnumValueDescriptorProto, jspb.Message);
  296. if (goog.DEBUG && !COMPILED) {
  297. /**
  298. * @public
  299. * @override
  300. */
  301. proto.google.protobuf.EnumValueDescriptorProto.displayName = 'proto.google.protobuf.EnumValueDescriptorProto';
  302. }
  303. /**
  304. * Generated by JsPbCodeGenerator.
  305. * @param {Array=} opt_data Optional initial data array, typically from a
  306. * server response, or constructed directly in Javascript. The array is used
  307. * in place and becomes part of the constructed object. It is not cloned.
  308. * If no data is provided, the constructed object will be empty, but still
  309. * valid.
  310. * @extends {jspb.Message}
  311. * @constructor
  312. */
  313. proto.google.protobuf.ServiceDescriptorProto = function(opt_data) {
  314. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ServiceDescriptorProto.repeatedFields_, null);
  315. };
  316. goog.inherits(proto.google.protobuf.ServiceDescriptorProto, jspb.Message);
  317. if (goog.DEBUG && !COMPILED) {
  318. /**
  319. * @public
  320. * @override
  321. */
  322. proto.google.protobuf.ServiceDescriptorProto.displayName = 'proto.google.protobuf.ServiceDescriptorProto';
  323. }
  324. /**
  325. * Generated by JsPbCodeGenerator.
  326. * @param {Array=} opt_data Optional initial data array, typically from a
  327. * server response, or constructed directly in Javascript. The array is used
  328. * in place and becomes part of the constructed object. It is not cloned.
  329. * If no data is provided, the constructed object will be empty, but still
  330. * valid.
  331. * @extends {jspb.Message}
  332. * @constructor
  333. */
  334. proto.google.protobuf.MethodDescriptorProto = function(opt_data) {
  335. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  336. };
  337. goog.inherits(proto.google.protobuf.MethodDescriptorProto, jspb.Message);
  338. if (goog.DEBUG && !COMPILED) {
  339. /**
  340. * @public
  341. * @override
  342. */
  343. proto.google.protobuf.MethodDescriptorProto.displayName = 'proto.google.protobuf.MethodDescriptorProto';
  344. }
  345. /**
  346. * Generated by JsPbCodeGenerator.
  347. * @param {Array=} opt_data Optional initial data array, typically from a
  348. * server response, or constructed directly in Javascript. The array is used
  349. * in place and becomes part of the constructed object. It is not cloned.
  350. * If no data is provided, the constructed object will be empty, but still
  351. * valid.
  352. * @extends {jspb.Message}
  353. * @constructor
  354. */
  355. proto.google.protobuf.FileOptions = function(opt_data) {
  356. jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FileOptions.repeatedFields_, null);
  357. };
  358. goog.inherits(proto.google.protobuf.FileOptions, jspb.Message);
  359. if (goog.DEBUG && !COMPILED) {
  360. /**
  361. * @public
  362. * @override
  363. */
  364. proto.google.protobuf.FileOptions.displayName = 'proto.google.protobuf.FileOptions';
  365. }
  366. /**
  367. * The extensions registered with this message class. This is a map of
  368. * extension field number to fieldInfo object.
  369. *
  370. * For example:
  371. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  372. *
  373. * fieldName contains the JsCompiler renamed field name property so that it
  374. * works in OPTIMIZED mode.
  375. *
  376. * @type {!Object<number, jspb.ExtensionFieldInfo>}
  377. */
  378. proto.google.protobuf.FileOptions.extensions = {};
  379. /**
  380. * The extensions registered with this message class. This is a map of
  381. * extension field number to fieldInfo object.
  382. *
  383. * For example:
  384. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  385. *
  386. * fieldName contains the JsCompiler renamed field name property so that it
  387. * works in OPTIMIZED mode.
  388. *
  389. * @type {!Object<number, jspb.ExtensionFieldBinaryInfo>}
  390. */
  391. proto.google.protobuf.FileOptions.extensionsBinary = {};
  392. /**
  393. * Generated by JsPbCodeGenerator.
  394. * @param {Array=} opt_data Optional initial data array, typically from a
  395. * server response, or constructed directly in Javascript. The array is used
  396. * in place and becomes part of the constructed object. It is not cloned.
  397. * If no data is provided, the constructed object will be empty, but still
  398. * valid.
  399. * @extends {jspb.Message}
  400. * @constructor
  401. */
  402. proto.google.protobuf.MessageOptions = function(opt_data) {
  403. jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MessageOptions.repeatedFields_, null);
  404. };
  405. goog.inherits(proto.google.protobuf.MessageOptions, jspb.Message);
  406. if (goog.DEBUG && !COMPILED) {
  407. /**
  408. * @public
  409. * @override
  410. */
  411. proto.google.protobuf.MessageOptions.displayName = 'proto.google.protobuf.MessageOptions';
  412. }
  413. /**
  414. * The extensions registered with this message class. This is a map of
  415. * extension field number to fieldInfo object.
  416. *
  417. * For example:
  418. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  419. *
  420. * fieldName contains the JsCompiler renamed field name property so that it
  421. * works in OPTIMIZED mode.
  422. *
  423. * @type {!Object<number, jspb.ExtensionFieldInfo>}
  424. */
  425. proto.google.protobuf.MessageOptions.extensions = {};
  426. /**
  427. * The extensions registered with this message class. This is a map of
  428. * extension field number to fieldInfo object.
  429. *
  430. * For example:
  431. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  432. *
  433. * fieldName contains the JsCompiler renamed field name property so that it
  434. * works in OPTIMIZED mode.
  435. *
  436. * @type {!Object<number, jspb.ExtensionFieldBinaryInfo>}
  437. */
  438. proto.google.protobuf.MessageOptions.extensionsBinary = {};
  439. /**
  440. * Generated by JsPbCodeGenerator.
  441. * @param {Array=} opt_data Optional initial data array, typically from a
  442. * server response, or constructed directly in Javascript. The array is used
  443. * in place and becomes part of the constructed object. It is not cloned.
  444. * If no data is provided, the constructed object will be empty, but still
  445. * valid.
  446. * @extends {jspb.Message}
  447. * @constructor
  448. */
  449. proto.google.protobuf.FieldOptions = function(opt_data) {
  450. jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FieldOptions.repeatedFields_, null);
  451. };
  452. goog.inherits(proto.google.protobuf.FieldOptions, jspb.Message);
  453. if (goog.DEBUG && !COMPILED) {
  454. /**
  455. * @public
  456. * @override
  457. */
  458. proto.google.protobuf.FieldOptions.displayName = 'proto.google.protobuf.FieldOptions';
  459. }
  460. /**
  461. * The extensions registered with this message class. This is a map of
  462. * extension field number to fieldInfo object.
  463. *
  464. * For example:
  465. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  466. *
  467. * fieldName contains the JsCompiler renamed field name property so that it
  468. * works in OPTIMIZED mode.
  469. *
  470. * @type {!Object<number, jspb.ExtensionFieldInfo>}
  471. */
  472. proto.google.protobuf.FieldOptions.extensions = {};
  473. /**
  474. * The extensions registered with this message class. This is a map of
  475. * extension field number to fieldInfo object.
  476. *
  477. * For example:
  478. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  479. *
  480. * fieldName contains the JsCompiler renamed field name property so that it
  481. * works in OPTIMIZED mode.
  482. *
  483. * @type {!Object<number, jspb.ExtensionFieldBinaryInfo>}
  484. */
  485. proto.google.protobuf.FieldOptions.extensionsBinary = {};
  486. /**
  487. * Generated by JsPbCodeGenerator.
  488. * @param {Array=} opt_data Optional initial data array, typically from a
  489. * server response, or constructed directly in Javascript. The array is used
  490. * in place and becomes part of the constructed object. It is not cloned.
  491. * If no data is provided, the constructed object will be empty, but still
  492. * valid.
  493. * @extends {jspb.Message}
  494. * @constructor
  495. */
  496. proto.google.protobuf.OneofOptions = function(opt_data) {
  497. jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.OneofOptions.repeatedFields_, null);
  498. };
  499. goog.inherits(proto.google.protobuf.OneofOptions, jspb.Message);
  500. if (goog.DEBUG && !COMPILED) {
  501. /**
  502. * @public
  503. * @override
  504. */
  505. proto.google.protobuf.OneofOptions.displayName = 'proto.google.protobuf.OneofOptions';
  506. }
  507. /**
  508. * The extensions registered with this message class. This is a map of
  509. * extension field number to fieldInfo object.
  510. *
  511. * For example:
  512. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  513. *
  514. * fieldName contains the JsCompiler renamed field name property so that it
  515. * works in OPTIMIZED mode.
  516. *
  517. * @type {!Object<number, jspb.ExtensionFieldInfo>}
  518. */
  519. proto.google.protobuf.OneofOptions.extensions = {};
  520. /**
  521. * The extensions registered with this message class. This is a map of
  522. * extension field number to fieldInfo object.
  523. *
  524. * For example:
  525. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  526. *
  527. * fieldName contains the JsCompiler renamed field name property so that it
  528. * works in OPTIMIZED mode.
  529. *
  530. * @type {!Object<number, jspb.ExtensionFieldBinaryInfo>}
  531. */
  532. proto.google.protobuf.OneofOptions.extensionsBinary = {};
  533. /**
  534. * Generated by JsPbCodeGenerator.
  535. * @param {Array=} opt_data Optional initial data array, typically from a
  536. * server response, or constructed directly in Javascript. The array is used
  537. * in place and becomes part of the constructed object. It is not cloned.
  538. * If no data is provided, the constructed object will be empty, but still
  539. * valid.
  540. * @extends {jspb.Message}
  541. * @constructor
  542. */
  543. proto.google.protobuf.EnumOptions = function(opt_data) {
  544. jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumOptions.repeatedFields_, null);
  545. };
  546. goog.inherits(proto.google.protobuf.EnumOptions, jspb.Message);
  547. if (goog.DEBUG && !COMPILED) {
  548. /**
  549. * @public
  550. * @override
  551. */
  552. proto.google.protobuf.EnumOptions.displayName = 'proto.google.protobuf.EnumOptions';
  553. }
  554. /**
  555. * The extensions registered with this message class. This is a map of
  556. * extension field number to fieldInfo object.
  557. *
  558. * For example:
  559. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  560. *
  561. * fieldName contains the JsCompiler renamed field name property so that it
  562. * works in OPTIMIZED mode.
  563. *
  564. * @type {!Object<number, jspb.ExtensionFieldInfo>}
  565. */
  566. proto.google.protobuf.EnumOptions.extensions = {};
  567. /**
  568. * The extensions registered with this message class. This is a map of
  569. * extension field number to fieldInfo object.
  570. *
  571. * For example:
  572. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  573. *
  574. * fieldName contains the JsCompiler renamed field name property so that it
  575. * works in OPTIMIZED mode.
  576. *
  577. * @type {!Object<number, jspb.ExtensionFieldBinaryInfo>}
  578. */
  579. proto.google.protobuf.EnumOptions.extensionsBinary = {};
  580. /**
  581. * Generated by JsPbCodeGenerator.
  582. * @param {Array=} opt_data Optional initial data array, typically from a
  583. * server response, or constructed directly in Javascript. The array is used
  584. * in place and becomes part of the constructed object. It is not cloned.
  585. * If no data is provided, the constructed object will be empty, but still
  586. * valid.
  587. * @extends {jspb.Message}
  588. * @constructor
  589. */
  590. proto.google.protobuf.EnumValueOptions = function(opt_data) {
  591. jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumValueOptions.repeatedFields_, null);
  592. };
  593. goog.inherits(proto.google.protobuf.EnumValueOptions, jspb.Message);
  594. if (goog.DEBUG && !COMPILED) {
  595. /**
  596. * @public
  597. * @override
  598. */
  599. proto.google.protobuf.EnumValueOptions.displayName = 'proto.google.protobuf.EnumValueOptions';
  600. }
  601. /**
  602. * The extensions registered with this message class. This is a map of
  603. * extension field number to fieldInfo object.
  604. *
  605. * For example:
  606. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  607. *
  608. * fieldName contains the JsCompiler renamed field name property so that it
  609. * works in OPTIMIZED mode.
  610. *
  611. * @type {!Object<number, jspb.ExtensionFieldInfo>}
  612. */
  613. proto.google.protobuf.EnumValueOptions.extensions = {};
  614. /**
  615. * The extensions registered with this message class. This is a map of
  616. * extension field number to fieldInfo object.
  617. *
  618. * For example:
  619. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  620. *
  621. * fieldName contains the JsCompiler renamed field name property so that it
  622. * works in OPTIMIZED mode.
  623. *
  624. * @type {!Object<number, jspb.ExtensionFieldBinaryInfo>}
  625. */
  626. proto.google.protobuf.EnumValueOptions.extensionsBinary = {};
  627. /**
  628. * Generated by JsPbCodeGenerator.
  629. * @param {Array=} opt_data Optional initial data array, typically from a
  630. * server response, or constructed directly in Javascript. The array is used
  631. * in place and becomes part of the constructed object. It is not cloned.
  632. * If no data is provided, the constructed object will be empty, but still
  633. * valid.
  634. * @extends {jspb.Message}
  635. * @constructor
  636. */
  637. proto.google.protobuf.ServiceOptions = function(opt_data) {
  638. jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ServiceOptions.repeatedFields_, null);
  639. };
  640. goog.inherits(proto.google.protobuf.ServiceOptions, jspb.Message);
  641. if (goog.DEBUG && !COMPILED) {
  642. /**
  643. * @public
  644. * @override
  645. */
  646. proto.google.protobuf.ServiceOptions.displayName = 'proto.google.protobuf.ServiceOptions';
  647. }
  648. /**
  649. * The extensions registered with this message class. This is a map of
  650. * extension field number to fieldInfo object.
  651. *
  652. * For example:
  653. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  654. *
  655. * fieldName contains the JsCompiler renamed field name property so that it
  656. * works in OPTIMIZED mode.
  657. *
  658. * @type {!Object<number, jspb.ExtensionFieldInfo>}
  659. */
  660. proto.google.protobuf.ServiceOptions.extensions = {};
  661. /**
  662. * The extensions registered with this message class. This is a map of
  663. * extension field number to fieldInfo object.
  664. *
  665. * For example:
  666. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  667. *
  668. * fieldName contains the JsCompiler renamed field name property so that it
  669. * works in OPTIMIZED mode.
  670. *
  671. * @type {!Object<number, jspb.ExtensionFieldBinaryInfo>}
  672. */
  673. proto.google.protobuf.ServiceOptions.extensionsBinary = {};
  674. /**
  675. * Generated by JsPbCodeGenerator.
  676. * @param {Array=} opt_data Optional initial data array, typically from a
  677. * server response, or constructed directly in Javascript. The array is used
  678. * in place and becomes part of the constructed object. It is not cloned.
  679. * If no data is provided, the constructed object will be empty, but still
  680. * valid.
  681. * @extends {jspb.Message}
  682. * @constructor
  683. */
  684. proto.google.protobuf.MethodOptions = function(opt_data) {
  685. jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MethodOptions.repeatedFields_, null);
  686. };
  687. goog.inherits(proto.google.protobuf.MethodOptions, jspb.Message);
  688. if (goog.DEBUG && !COMPILED) {
  689. /**
  690. * @public
  691. * @override
  692. */
  693. proto.google.protobuf.MethodOptions.displayName = 'proto.google.protobuf.MethodOptions';
  694. }
  695. /**
  696. * The extensions registered with this message class. This is a map of
  697. * extension field number to fieldInfo object.
  698. *
  699. * For example:
  700. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  701. *
  702. * fieldName contains the JsCompiler renamed field name property so that it
  703. * works in OPTIMIZED mode.
  704. *
  705. * @type {!Object<number, jspb.ExtensionFieldInfo>}
  706. */
  707. proto.google.protobuf.MethodOptions.extensions = {};
  708. /**
  709. * The extensions registered with this message class. This is a map of
  710. * extension field number to fieldInfo object.
  711. *
  712. * For example:
  713. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  714. *
  715. * fieldName contains the JsCompiler renamed field name property so that it
  716. * works in OPTIMIZED mode.
  717. *
  718. * @type {!Object<number, jspb.ExtensionFieldBinaryInfo>}
  719. */
  720. proto.google.protobuf.MethodOptions.extensionsBinary = {};
  721. /**
  722. * Generated by JsPbCodeGenerator.
  723. * @param {Array=} opt_data Optional initial data array, typically from a
  724. * server response, or constructed directly in Javascript. The array is used
  725. * in place and becomes part of the constructed object. It is not cloned.
  726. * If no data is provided, the constructed object will be empty, but still
  727. * valid.
  728. * @extends {jspb.Message}
  729. * @constructor
  730. */
  731. proto.google.protobuf.UninterpretedOption = function(opt_data) {
  732. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.UninterpretedOption.repeatedFields_, null);
  733. };
  734. goog.inherits(proto.google.protobuf.UninterpretedOption, jspb.Message);
  735. if (goog.DEBUG && !COMPILED) {
  736. /**
  737. * @public
  738. * @override
  739. */
  740. proto.google.protobuf.UninterpretedOption.displayName = 'proto.google.protobuf.UninterpretedOption';
  741. }
  742. /**
  743. * Generated by JsPbCodeGenerator.
  744. * @param {Array=} opt_data Optional initial data array, typically from a
  745. * server response, or constructed directly in Javascript. The array is used
  746. * in place and becomes part of the constructed object. It is not cloned.
  747. * If no data is provided, the constructed object will be empty, but still
  748. * valid.
  749. * @extends {jspb.Message}
  750. * @constructor
  751. */
  752. proto.google.protobuf.UninterpretedOption.NamePart = function(opt_data) {
  753. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  754. };
  755. goog.inherits(proto.google.protobuf.UninterpretedOption.NamePart, jspb.Message);
  756. if (goog.DEBUG && !COMPILED) {
  757. /**
  758. * @public
  759. * @override
  760. */
  761. proto.google.protobuf.UninterpretedOption.NamePart.displayName = 'proto.google.protobuf.UninterpretedOption.NamePart';
  762. }
  763. /**
  764. * Generated by JsPbCodeGenerator.
  765. * @param {Array=} opt_data Optional initial data array, typically from a
  766. * server response, or constructed directly in Javascript. The array is used
  767. * in place and becomes part of the constructed object. It is not cloned.
  768. * If no data is provided, the constructed object will be empty, but still
  769. * valid.
  770. * @extends {jspb.Message}
  771. * @constructor
  772. */
  773. proto.google.protobuf.SourceCodeInfo = function(opt_data) {
  774. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.repeatedFields_, null);
  775. };
  776. goog.inherits(proto.google.protobuf.SourceCodeInfo, jspb.Message);
  777. if (goog.DEBUG && !COMPILED) {
  778. /**
  779. * @public
  780. * @override
  781. */
  782. proto.google.protobuf.SourceCodeInfo.displayName = 'proto.google.protobuf.SourceCodeInfo';
  783. }
  784. /**
  785. * Generated by JsPbCodeGenerator.
  786. * @param {Array=} opt_data Optional initial data array, typically from a
  787. * server response, or constructed directly in Javascript. The array is used
  788. * in place and becomes part of the constructed object. It is not cloned.
  789. * If no data is provided, the constructed object will be empty, but still
  790. * valid.
  791. * @extends {jspb.Message}
  792. * @constructor
  793. */
  794. proto.google.protobuf.SourceCodeInfo.Location = function(opt_data) {
  795. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_, null);
  796. };
  797. goog.inherits(proto.google.protobuf.SourceCodeInfo.Location, jspb.Message);
  798. if (goog.DEBUG && !COMPILED) {
  799. /**
  800. * @public
  801. * @override
  802. */
  803. proto.google.protobuf.SourceCodeInfo.Location.displayName = 'proto.google.protobuf.SourceCodeInfo.Location';
  804. }
  805. /**
  806. * Generated by JsPbCodeGenerator.
  807. * @param {Array=} opt_data Optional initial data array, typically from a
  808. * server response, or constructed directly in Javascript. The array is used
  809. * in place and becomes part of the constructed object. It is not cloned.
  810. * If no data is provided, the constructed object will be empty, but still
  811. * valid.
  812. * @extends {jspb.Message}
  813. * @constructor
  814. */
  815. proto.google.protobuf.GeneratedCodeInfo = function(opt_data) {
  816. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.repeatedFields_, null);
  817. };
  818. goog.inherits(proto.google.protobuf.GeneratedCodeInfo, jspb.Message);
  819. if (goog.DEBUG && !COMPILED) {
  820. /**
  821. * @public
  822. * @override
  823. */
  824. proto.google.protobuf.GeneratedCodeInfo.displayName = 'proto.google.protobuf.GeneratedCodeInfo';
  825. }
  826. /**
  827. * Generated by JsPbCodeGenerator.
  828. * @param {Array=} opt_data Optional initial data array, typically from a
  829. * server response, or constructed directly in Javascript. The array is used
  830. * in place and becomes part of the constructed object. It is not cloned.
  831. * If no data is provided, the constructed object will be empty, but still
  832. * valid.
  833. * @extends {jspb.Message}
  834. * @constructor
  835. */
  836. proto.google.protobuf.GeneratedCodeInfo.Annotation = function(opt_data) {
  837. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_, null);
  838. };
  839. goog.inherits(proto.google.protobuf.GeneratedCodeInfo.Annotation, jspb.Message);
  840. if (goog.DEBUG && !COMPILED) {
  841. /**
  842. * @public
  843. * @override
  844. */
  845. proto.google.protobuf.GeneratedCodeInfo.Annotation.displayName = 'proto.google.protobuf.GeneratedCodeInfo.Annotation';
  846. }
  847. /**
  848. * List of repeated fields within this message type.
  849. * @private {!Array<number>}
  850. * @const
  851. */
  852. proto.google.protobuf.FileDescriptorSet.repeatedFields_ = [1];
  853. if (jspb.Message.GENERATE_TO_OBJECT) {
  854. /**
  855. * Creates an object representation of this proto.
  856. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  857. * Optional fields that are not set will be set to undefined.
  858. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  859. * For the list of reserved names please see:
  860. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  861. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  862. * JSPB instance for transitional soy proto support:
  863. * http://goto/soy-param-migration
  864. * @return {!Object}
  865. */
  866. proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includeInstance) {
  867. return proto.google.protobuf.FileDescriptorSet.toObject(opt_includeInstance, this);
  868. };
  869. /**
  870. * Static version of the {@see toObject} method.
  871. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  872. * the JSPB instance for transitional soy proto support:
  873. * http://goto/soy-param-migration
  874. * @param {!proto.google.protobuf.FileDescriptorSet} msg The msg instance to transform.
  875. * @return {!Object}
  876. * @suppress {unusedLocalVariables} f is only used for nested messages
  877. */
  878. proto.google.protobuf.FileDescriptorSet.toObject = function(includeInstance, msg) {
  879. var f, obj = {
  880. fileList: jspb.Message.toObjectList(msg.getFileList(),
  881. proto.google.protobuf.FileDescriptorProto.toObject, includeInstance)
  882. };
  883. if (includeInstance) {
  884. obj.$jspbMessageInstance = msg;
  885. }
  886. return obj;
  887. };
  888. }
  889. /**
  890. * Deserializes binary data (in protobuf wire format).
  891. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  892. * @return {!proto.google.protobuf.FileDescriptorSet}
  893. */
  894. proto.google.protobuf.FileDescriptorSet.deserializeBinary = function(bytes) {
  895. var reader = new jspb.BinaryReader(bytes);
  896. var msg = new proto.google.protobuf.FileDescriptorSet;
  897. return proto.google.protobuf.FileDescriptorSet.deserializeBinaryFromReader(msg, reader);
  898. };
  899. /**
  900. * Deserializes binary data (in protobuf wire format) from the
  901. * given reader into the given message object.
  902. * @param {!proto.google.protobuf.FileDescriptorSet} msg The message object to deserialize into.
  903. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  904. * @return {!proto.google.protobuf.FileDescriptorSet}
  905. */
  906. proto.google.protobuf.FileDescriptorSet.deserializeBinaryFromReader = function(msg, reader) {
  907. while (reader.nextField()) {
  908. if (reader.isEndGroup()) {
  909. break;
  910. }
  911. var field = reader.getFieldNumber();
  912. switch (field) {
  913. case 1:
  914. var value = new proto.google.protobuf.FileDescriptorProto;
  915. reader.readMessage(value,proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader);
  916. msg.addFile(value);
  917. break;
  918. default:
  919. reader.skipField();
  920. break;
  921. }
  922. }
  923. return msg;
  924. };
  925. /**
  926. * Serializes the message to binary data (in protobuf wire format).
  927. * @return {!Uint8Array}
  928. */
  929. proto.google.protobuf.FileDescriptorSet.prototype.serializeBinary = function() {
  930. var writer = new jspb.BinaryWriter();
  931. proto.google.protobuf.FileDescriptorSet.serializeBinaryToWriter(this, writer);
  932. return writer.getResultBuffer();
  933. };
  934. /**
  935. * Serializes the given message to binary data (in protobuf wire
  936. * format), writing to the given BinaryWriter.
  937. * @param {!proto.google.protobuf.FileDescriptorSet} message
  938. * @param {!jspb.BinaryWriter} writer
  939. * @suppress {unusedLocalVariables} f is only used for nested messages
  940. */
  941. proto.google.protobuf.FileDescriptorSet.serializeBinaryToWriter = function(message, writer) {
  942. var f = undefined;
  943. f = message.getFileList();
  944. if (f.length > 0) {
  945. writer.writeRepeatedMessage(
  946. 1,
  947. f,
  948. proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter
  949. );
  950. }
  951. };
  952. /**
  953. * repeated FileDescriptorProto file = 1;
  954. * @return {!Array<!proto.google.protobuf.FileDescriptorProto>}
  955. */
  956. proto.google.protobuf.FileDescriptorSet.prototype.getFileList = function() {
  957. return /** @type{!Array<!proto.google.protobuf.FileDescriptorProto>} */ (
  958. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FileDescriptorProto, 1));
  959. };
  960. /**
  961. * @param {!Array<!proto.google.protobuf.FileDescriptorProto>} value
  962. * @return {!proto.google.protobuf.FileDescriptorSet} returns this
  963. */
  964. proto.google.protobuf.FileDescriptorSet.prototype.setFileList = function(value) {
  965. return jspb.Message.setRepeatedWrapperField(this, 1, value);
  966. };
  967. /**
  968. * @param {!proto.google.protobuf.FileDescriptorProto=} opt_value
  969. * @param {number=} opt_index
  970. * @return {!proto.google.protobuf.FileDescriptorProto}
  971. */
  972. proto.google.protobuf.FileDescriptorSet.prototype.addFile = function(opt_value, opt_index) {
  973. return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.FileDescriptorProto, opt_index);
  974. };
  975. /**
  976. * Clears the list making it empty but non-null.
  977. * @return {!proto.google.protobuf.FileDescriptorSet} returns this
  978. */
  979. proto.google.protobuf.FileDescriptorSet.prototype.clearFileList = function() {
  980. return this.setFileList([]);
  981. };
  982. /**
  983. * List of repeated fields within this message type.
  984. * @private {!Array<number>}
  985. * @const
  986. */
  987. proto.google.protobuf.FileDescriptorProto.repeatedFields_ = [3,10,11,4,5,6,7];
  988. if (jspb.Message.GENERATE_TO_OBJECT) {
  989. /**
  990. * Creates an object representation of this proto.
  991. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  992. * Optional fields that are not set will be set to undefined.
  993. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  994. * For the list of reserved names please see:
  995. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  996. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  997. * JSPB instance for transitional soy proto support:
  998. * http://goto/soy-param-migration
  999. * @return {!Object}
  1000. */
  1001. proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_includeInstance) {
  1002. return proto.google.protobuf.FileDescriptorProto.toObject(opt_includeInstance, this);
  1003. };
  1004. /**
  1005. * Static version of the {@see toObject} method.
  1006. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1007. * the JSPB instance for transitional soy proto support:
  1008. * http://goto/soy-param-migration
  1009. * @param {!proto.google.protobuf.FileDescriptorProto} msg The msg instance to transform.
  1010. * @return {!Object}
  1011. * @suppress {unusedLocalVariables} f is only used for nested messages
  1012. */
  1013. proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, msg) {
  1014. var f, obj = {
  1015. name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  1016. pb_package: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
  1017. dependencyList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
  1018. publicDependencyList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f,
  1019. weakDependencyList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f,
  1020. messageTypeList: jspb.Message.toObjectList(msg.getMessageTypeList(),
  1021. proto.google.protobuf.DescriptorProto.toObject, includeInstance),
  1022. enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(),
  1023. proto.google.protobuf.EnumDescriptorProto.toObject, includeInstance),
  1024. serviceList: jspb.Message.toObjectList(msg.getServiceList(),
  1025. proto.google.protobuf.ServiceDescriptorProto.toObject, includeInstance),
  1026. extensionList: jspb.Message.toObjectList(msg.getExtensionList(),
  1027. proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance),
  1028. options: (f = msg.getOptions()) && proto.google.protobuf.FileOptions.toObject(includeInstance, f),
  1029. sourceCodeInfo: (f = msg.getSourceCodeInfo()) && proto.google.protobuf.SourceCodeInfo.toObject(includeInstance, f),
  1030. syntax: (f = jspb.Message.getField(msg, 12)) == null ? undefined : f
  1031. };
  1032. if (includeInstance) {
  1033. obj.$jspbMessageInstance = msg;
  1034. }
  1035. return obj;
  1036. };
  1037. }
  1038. /**
  1039. * Deserializes binary data (in protobuf wire format).
  1040. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1041. * @return {!proto.google.protobuf.FileDescriptorProto}
  1042. */
  1043. proto.google.protobuf.FileDescriptorProto.deserializeBinary = function(bytes) {
  1044. var reader = new jspb.BinaryReader(bytes);
  1045. var msg = new proto.google.protobuf.FileDescriptorProto;
  1046. return proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader(msg, reader);
  1047. };
  1048. /**
  1049. * Deserializes binary data (in protobuf wire format) from the
  1050. * given reader into the given message object.
  1051. * @param {!proto.google.protobuf.FileDescriptorProto} msg The message object to deserialize into.
  1052. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1053. * @return {!proto.google.protobuf.FileDescriptorProto}
  1054. */
  1055. proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader = function(msg, reader) {
  1056. while (reader.nextField()) {
  1057. if (reader.isEndGroup()) {
  1058. break;
  1059. }
  1060. var field = reader.getFieldNumber();
  1061. switch (field) {
  1062. case 1:
  1063. var value = /** @type {string} */ (reader.readString());
  1064. msg.setName(value);
  1065. break;
  1066. case 2:
  1067. var value = /** @type {string} */ (reader.readString());
  1068. msg.setPackage(value);
  1069. break;
  1070. case 3:
  1071. var value = /** @type {string} */ (reader.readString());
  1072. msg.addDependency(value);
  1073. break;
  1074. case 10:
  1075. var value = /** @type {number} */ (reader.readInt32());
  1076. msg.addPublicDependency(value);
  1077. break;
  1078. case 11:
  1079. var value = /** @type {number} */ (reader.readInt32());
  1080. msg.addWeakDependency(value);
  1081. break;
  1082. case 4:
  1083. var value = new proto.google.protobuf.DescriptorProto;
  1084. reader.readMessage(value,proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader);
  1085. msg.addMessageType(value);
  1086. break;
  1087. case 5:
  1088. var value = new proto.google.protobuf.EnumDescriptorProto;
  1089. reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader);
  1090. msg.addEnumType(value);
  1091. break;
  1092. case 6:
  1093. var value = new proto.google.protobuf.ServiceDescriptorProto;
  1094. reader.readMessage(value,proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader);
  1095. msg.addService(value);
  1096. break;
  1097. case 7:
  1098. var value = new proto.google.protobuf.FieldDescriptorProto;
  1099. reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader);
  1100. msg.addExtension$(value);
  1101. break;
  1102. case 8:
  1103. var value = new proto.google.protobuf.FileOptions;
  1104. reader.readMessage(value,proto.google.protobuf.FileOptions.deserializeBinaryFromReader);
  1105. msg.setOptions(value);
  1106. break;
  1107. case 9:
  1108. var value = new proto.google.protobuf.SourceCodeInfo;
  1109. reader.readMessage(value,proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader);
  1110. msg.setSourceCodeInfo(value);
  1111. break;
  1112. case 12:
  1113. var value = /** @type {string} */ (reader.readString());
  1114. msg.setSyntax(value);
  1115. break;
  1116. default:
  1117. reader.skipField();
  1118. break;
  1119. }
  1120. }
  1121. return msg;
  1122. };
  1123. /**
  1124. * Serializes the message to binary data (in protobuf wire format).
  1125. * @return {!Uint8Array}
  1126. */
  1127. proto.google.protobuf.FileDescriptorProto.prototype.serializeBinary = function() {
  1128. var writer = new jspb.BinaryWriter();
  1129. proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter(this, writer);
  1130. return writer.getResultBuffer();
  1131. };
  1132. /**
  1133. * Serializes the given message to binary data (in protobuf wire
  1134. * format), writing to the given BinaryWriter.
  1135. * @param {!proto.google.protobuf.FileDescriptorProto} message
  1136. * @param {!jspb.BinaryWriter} writer
  1137. * @suppress {unusedLocalVariables} f is only used for nested messages
  1138. */
  1139. proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter = function(message, writer) {
  1140. var f = undefined;
  1141. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  1142. if (f != null) {
  1143. writer.writeString(
  1144. 1,
  1145. f
  1146. );
  1147. }
  1148. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  1149. if (f != null) {
  1150. writer.writeString(
  1151. 2,
  1152. f
  1153. );
  1154. }
  1155. f = message.getDependencyList();
  1156. if (f.length > 0) {
  1157. writer.writeRepeatedString(
  1158. 3,
  1159. f
  1160. );
  1161. }
  1162. f = message.getPublicDependencyList();
  1163. if (f.length > 0) {
  1164. writer.writeRepeatedInt32(
  1165. 10,
  1166. f
  1167. );
  1168. }
  1169. f = message.getWeakDependencyList();
  1170. if (f.length > 0) {
  1171. writer.writeRepeatedInt32(
  1172. 11,
  1173. f
  1174. );
  1175. }
  1176. f = message.getMessageTypeList();
  1177. if (f.length > 0) {
  1178. writer.writeRepeatedMessage(
  1179. 4,
  1180. f,
  1181. proto.google.protobuf.DescriptorProto.serializeBinaryToWriter
  1182. );
  1183. }
  1184. f = message.getEnumTypeList();
  1185. if (f.length > 0) {
  1186. writer.writeRepeatedMessage(
  1187. 5,
  1188. f,
  1189. proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter
  1190. );
  1191. }
  1192. f = message.getServiceList();
  1193. if (f.length > 0) {
  1194. writer.writeRepeatedMessage(
  1195. 6,
  1196. f,
  1197. proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter
  1198. );
  1199. }
  1200. f = message.getExtensionList();
  1201. if (f.length > 0) {
  1202. writer.writeRepeatedMessage(
  1203. 7,
  1204. f,
  1205. proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter
  1206. );
  1207. }
  1208. f = message.getOptions();
  1209. if (f != null) {
  1210. writer.writeMessage(
  1211. 8,
  1212. f,
  1213. proto.google.protobuf.FileOptions.serializeBinaryToWriter
  1214. );
  1215. }
  1216. f = message.getSourceCodeInfo();
  1217. if (f != null) {
  1218. writer.writeMessage(
  1219. 9,
  1220. f,
  1221. proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter
  1222. );
  1223. }
  1224. f = /** @type {string} */ (jspb.Message.getField(message, 12));
  1225. if (f != null) {
  1226. writer.writeString(
  1227. 12,
  1228. f
  1229. );
  1230. }
  1231. };
  1232. /**
  1233. * optional string name = 1;
  1234. * @return {string}
  1235. */
  1236. proto.google.protobuf.FileDescriptorProto.prototype.getName = function() {
  1237. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  1238. };
  1239. /**
  1240. * @param {string} value
  1241. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1242. */
  1243. proto.google.protobuf.FileDescriptorProto.prototype.setName = function(value) {
  1244. return jspb.Message.setField(this, 1, value);
  1245. };
  1246. /**
  1247. * Clears the field making it undefined.
  1248. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1249. */
  1250. proto.google.protobuf.FileDescriptorProto.prototype.clearName = function() {
  1251. return jspb.Message.setField(this, 1, undefined);
  1252. };
  1253. /**
  1254. * Returns whether this field is set.
  1255. * @return {boolean}
  1256. */
  1257. proto.google.protobuf.FileDescriptorProto.prototype.hasName = function() {
  1258. return jspb.Message.getField(this, 1) != null;
  1259. };
  1260. /**
  1261. * optional string package = 2;
  1262. * @return {string}
  1263. */
  1264. proto.google.protobuf.FileDescriptorProto.prototype.getPackage = function() {
  1265. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  1266. };
  1267. /**
  1268. * @param {string} value
  1269. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1270. */
  1271. proto.google.protobuf.FileDescriptorProto.prototype.setPackage = function(value) {
  1272. return jspb.Message.setField(this, 2, value);
  1273. };
  1274. /**
  1275. * Clears the field making it undefined.
  1276. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1277. */
  1278. proto.google.protobuf.FileDescriptorProto.prototype.clearPackage = function() {
  1279. return jspb.Message.setField(this, 2, undefined);
  1280. };
  1281. /**
  1282. * Returns whether this field is set.
  1283. * @return {boolean}
  1284. */
  1285. proto.google.protobuf.FileDescriptorProto.prototype.hasPackage = function() {
  1286. return jspb.Message.getField(this, 2) != null;
  1287. };
  1288. /**
  1289. * repeated string dependency = 3;
  1290. * @return {!Array<string>}
  1291. */
  1292. proto.google.protobuf.FileDescriptorProto.prototype.getDependencyList = function() {
  1293. return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
  1294. };
  1295. /**
  1296. * @param {!Array<string>} value
  1297. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1298. */
  1299. proto.google.protobuf.FileDescriptorProto.prototype.setDependencyList = function(value) {
  1300. return jspb.Message.setField(this, 3, value || []);
  1301. };
  1302. /**
  1303. * @param {string} value
  1304. * @param {number=} opt_index
  1305. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1306. */
  1307. proto.google.protobuf.FileDescriptorProto.prototype.addDependency = function(value, opt_index) {
  1308. return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
  1309. };
  1310. /**
  1311. * Clears the list making it empty but non-null.
  1312. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1313. */
  1314. proto.google.protobuf.FileDescriptorProto.prototype.clearDependencyList = function() {
  1315. return this.setDependencyList([]);
  1316. };
  1317. /**
  1318. * repeated int32 public_dependency = 10;
  1319. * @return {!Array<number>}
  1320. */
  1321. proto.google.protobuf.FileDescriptorProto.prototype.getPublicDependencyList = function() {
  1322. return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 10));
  1323. };
  1324. /**
  1325. * @param {!Array<number>} value
  1326. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1327. */
  1328. proto.google.protobuf.FileDescriptorProto.prototype.setPublicDependencyList = function(value) {
  1329. return jspb.Message.setField(this, 10, value || []);
  1330. };
  1331. /**
  1332. * @param {number} value
  1333. * @param {number=} opt_index
  1334. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1335. */
  1336. proto.google.protobuf.FileDescriptorProto.prototype.addPublicDependency = function(value, opt_index) {
  1337. return jspb.Message.addToRepeatedField(this, 10, value, opt_index);
  1338. };
  1339. /**
  1340. * Clears the list making it empty but non-null.
  1341. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1342. */
  1343. proto.google.protobuf.FileDescriptorProto.prototype.clearPublicDependencyList = function() {
  1344. return this.setPublicDependencyList([]);
  1345. };
  1346. /**
  1347. * repeated int32 weak_dependency = 11;
  1348. * @return {!Array<number>}
  1349. */
  1350. proto.google.protobuf.FileDescriptorProto.prototype.getWeakDependencyList = function() {
  1351. return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 11));
  1352. };
  1353. /**
  1354. * @param {!Array<number>} value
  1355. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1356. */
  1357. proto.google.protobuf.FileDescriptorProto.prototype.setWeakDependencyList = function(value) {
  1358. return jspb.Message.setField(this, 11, value || []);
  1359. };
  1360. /**
  1361. * @param {number} value
  1362. * @param {number=} opt_index
  1363. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1364. */
  1365. proto.google.protobuf.FileDescriptorProto.prototype.addWeakDependency = function(value, opt_index) {
  1366. return jspb.Message.addToRepeatedField(this, 11, value, opt_index);
  1367. };
  1368. /**
  1369. * Clears the list making it empty but non-null.
  1370. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1371. */
  1372. proto.google.protobuf.FileDescriptorProto.prototype.clearWeakDependencyList = function() {
  1373. return this.setWeakDependencyList([]);
  1374. };
  1375. /**
  1376. * repeated DescriptorProto message_type = 4;
  1377. * @return {!Array<!proto.google.protobuf.DescriptorProto>}
  1378. */
  1379. proto.google.protobuf.FileDescriptorProto.prototype.getMessageTypeList = function() {
  1380. return /** @type{!Array<!proto.google.protobuf.DescriptorProto>} */ (
  1381. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto, 4));
  1382. };
  1383. /**
  1384. * @param {!Array<!proto.google.protobuf.DescriptorProto>} value
  1385. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1386. */
  1387. proto.google.protobuf.FileDescriptorProto.prototype.setMessageTypeList = function(value) {
  1388. return jspb.Message.setRepeatedWrapperField(this, 4, value);
  1389. };
  1390. /**
  1391. * @param {!proto.google.protobuf.DescriptorProto=} opt_value
  1392. * @param {number=} opt_index
  1393. * @return {!proto.google.protobuf.DescriptorProto}
  1394. */
  1395. proto.google.protobuf.FileDescriptorProto.prototype.addMessageType = function(opt_value, opt_index) {
  1396. return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.DescriptorProto, opt_index);
  1397. };
  1398. /**
  1399. * Clears the list making it empty but non-null.
  1400. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1401. */
  1402. proto.google.protobuf.FileDescriptorProto.prototype.clearMessageTypeList = function() {
  1403. return this.setMessageTypeList([]);
  1404. };
  1405. /**
  1406. * repeated EnumDescriptorProto enum_type = 5;
  1407. * @return {!Array<!proto.google.protobuf.EnumDescriptorProto>}
  1408. */
  1409. proto.google.protobuf.FileDescriptorProto.prototype.getEnumTypeList = function() {
  1410. return /** @type{!Array<!proto.google.protobuf.EnumDescriptorProto>} */ (
  1411. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto, 5));
  1412. };
  1413. /**
  1414. * @param {!Array<!proto.google.protobuf.EnumDescriptorProto>} value
  1415. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1416. */
  1417. proto.google.protobuf.FileDescriptorProto.prototype.setEnumTypeList = function(value) {
  1418. return jspb.Message.setRepeatedWrapperField(this, 5, value);
  1419. };
  1420. /**
  1421. * @param {!proto.google.protobuf.EnumDescriptorProto=} opt_value
  1422. * @param {number=} opt_index
  1423. * @return {!proto.google.protobuf.EnumDescriptorProto}
  1424. */
  1425. proto.google.protobuf.FileDescriptorProto.prototype.addEnumType = function(opt_value, opt_index) {
  1426. return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.google.protobuf.EnumDescriptorProto, opt_index);
  1427. };
  1428. /**
  1429. * Clears the list making it empty but non-null.
  1430. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1431. */
  1432. proto.google.protobuf.FileDescriptorProto.prototype.clearEnumTypeList = function() {
  1433. return this.setEnumTypeList([]);
  1434. };
  1435. /**
  1436. * repeated ServiceDescriptorProto service = 6;
  1437. * @return {!Array<!proto.google.protobuf.ServiceDescriptorProto>}
  1438. */
  1439. proto.google.protobuf.FileDescriptorProto.prototype.getServiceList = function() {
  1440. return /** @type{!Array<!proto.google.protobuf.ServiceDescriptorProto>} */ (
  1441. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.ServiceDescriptorProto, 6));
  1442. };
  1443. /**
  1444. * @param {!Array<!proto.google.protobuf.ServiceDescriptorProto>} value
  1445. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1446. */
  1447. proto.google.protobuf.FileDescriptorProto.prototype.setServiceList = function(value) {
  1448. return jspb.Message.setRepeatedWrapperField(this, 6, value);
  1449. };
  1450. /**
  1451. * @param {!proto.google.protobuf.ServiceDescriptorProto=} opt_value
  1452. * @param {number=} opt_index
  1453. * @return {!proto.google.protobuf.ServiceDescriptorProto}
  1454. */
  1455. proto.google.protobuf.FileDescriptorProto.prototype.addService = function(opt_value, opt_index) {
  1456. return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.ServiceDescriptorProto, opt_index);
  1457. };
  1458. /**
  1459. * Clears the list making it empty but non-null.
  1460. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1461. */
  1462. proto.google.protobuf.FileDescriptorProto.prototype.clearServiceList = function() {
  1463. return this.setServiceList([]);
  1464. };
  1465. /**
  1466. * repeated FieldDescriptorProto extension = 7;
  1467. * @return {!Array<!proto.google.protobuf.FieldDescriptorProto>}
  1468. */
  1469. proto.google.protobuf.FileDescriptorProto.prototype.getExtensionList = function() {
  1470. return /** @type{!Array<!proto.google.protobuf.FieldDescriptorProto>} */ (
  1471. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 7));
  1472. };
  1473. /**
  1474. * @param {!Array<!proto.google.protobuf.FieldDescriptorProto>} value
  1475. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1476. */
  1477. proto.google.protobuf.FileDescriptorProto.prototype.setExtensionList = function(value) {
  1478. return jspb.Message.setRepeatedWrapperField(this, 7, value);
  1479. };
  1480. /**
  1481. * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value
  1482. * @param {number=} opt_index
  1483. * @return {!proto.google.protobuf.FieldDescriptorProto}
  1484. */
  1485. proto.google.protobuf.FileDescriptorProto.prototype.addExtension$ = function(opt_value, opt_index) {
  1486. return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index);
  1487. };
  1488. /**
  1489. * Clears the list making it empty but non-null.
  1490. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1491. */
  1492. proto.google.protobuf.FileDescriptorProto.prototype.clearExtensionList = function() {
  1493. return this.setExtensionList([]);
  1494. };
  1495. /**
  1496. * optional FileOptions options = 8;
  1497. * @return {?proto.google.protobuf.FileOptions}
  1498. */
  1499. proto.google.protobuf.FileDescriptorProto.prototype.getOptions = function() {
  1500. return /** @type{?proto.google.protobuf.FileOptions} */ (
  1501. jspb.Message.getWrapperField(this, proto.google.protobuf.FileOptions, 8));
  1502. };
  1503. /**
  1504. * @param {?proto.google.protobuf.FileOptions|undefined} value
  1505. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1506. */
  1507. proto.google.protobuf.FileDescriptorProto.prototype.setOptions = function(value) {
  1508. return jspb.Message.setWrapperField(this, 8, value);
  1509. };
  1510. /**
  1511. * Clears the message field making it undefined.
  1512. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1513. */
  1514. proto.google.protobuf.FileDescriptorProto.prototype.clearOptions = function() {
  1515. return this.setOptions(undefined);
  1516. };
  1517. /**
  1518. * Returns whether this field is set.
  1519. * @return {boolean}
  1520. */
  1521. proto.google.protobuf.FileDescriptorProto.prototype.hasOptions = function() {
  1522. return jspb.Message.getField(this, 8) != null;
  1523. };
  1524. /**
  1525. * optional SourceCodeInfo source_code_info = 9;
  1526. * @return {?proto.google.protobuf.SourceCodeInfo}
  1527. */
  1528. proto.google.protobuf.FileDescriptorProto.prototype.getSourceCodeInfo = function() {
  1529. return /** @type{?proto.google.protobuf.SourceCodeInfo} */ (
  1530. jspb.Message.getWrapperField(this, proto.google.protobuf.SourceCodeInfo, 9));
  1531. };
  1532. /**
  1533. * @param {?proto.google.protobuf.SourceCodeInfo|undefined} value
  1534. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1535. */
  1536. proto.google.protobuf.FileDescriptorProto.prototype.setSourceCodeInfo = function(value) {
  1537. return jspb.Message.setWrapperField(this, 9, value);
  1538. };
  1539. /**
  1540. * Clears the message field making it undefined.
  1541. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1542. */
  1543. proto.google.protobuf.FileDescriptorProto.prototype.clearSourceCodeInfo = function() {
  1544. return this.setSourceCodeInfo(undefined);
  1545. };
  1546. /**
  1547. * Returns whether this field is set.
  1548. * @return {boolean}
  1549. */
  1550. proto.google.protobuf.FileDescriptorProto.prototype.hasSourceCodeInfo = function() {
  1551. return jspb.Message.getField(this, 9) != null;
  1552. };
  1553. /**
  1554. * optional string syntax = 12;
  1555. * @return {string}
  1556. */
  1557. proto.google.protobuf.FileDescriptorProto.prototype.getSyntax = function() {
  1558. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
  1559. };
  1560. /**
  1561. * @param {string} value
  1562. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1563. */
  1564. proto.google.protobuf.FileDescriptorProto.prototype.setSyntax = function(value) {
  1565. return jspb.Message.setField(this, 12, value);
  1566. };
  1567. /**
  1568. * Clears the field making it undefined.
  1569. * @return {!proto.google.protobuf.FileDescriptorProto} returns this
  1570. */
  1571. proto.google.protobuf.FileDescriptorProto.prototype.clearSyntax = function() {
  1572. return jspb.Message.setField(this, 12, undefined);
  1573. };
  1574. /**
  1575. * Returns whether this field is set.
  1576. * @return {boolean}
  1577. */
  1578. proto.google.protobuf.FileDescriptorProto.prototype.hasSyntax = function() {
  1579. return jspb.Message.getField(this, 12) != null;
  1580. };
  1581. /**
  1582. * List of repeated fields within this message type.
  1583. * @private {!Array<number>}
  1584. * @const
  1585. */
  1586. proto.google.protobuf.DescriptorProto.repeatedFields_ = [2,6,3,4,5,8,9,10];
  1587. if (jspb.Message.GENERATE_TO_OBJECT) {
  1588. /**
  1589. * Creates an object representation of this proto.
  1590. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1591. * Optional fields that are not set will be set to undefined.
  1592. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1593. * For the list of reserved names please see:
  1594. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  1595. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  1596. * JSPB instance for transitional soy proto support:
  1597. * http://goto/soy-param-migration
  1598. * @return {!Object}
  1599. */
  1600. proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeInstance) {
  1601. return proto.google.protobuf.DescriptorProto.toObject(opt_includeInstance, this);
  1602. };
  1603. /**
  1604. * Static version of the {@see toObject} method.
  1605. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1606. * the JSPB instance for transitional soy proto support:
  1607. * http://goto/soy-param-migration
  1608. * @param {!proto.google.protobuf.DescriptorProto} msg The msg instance to transform.
  1609. * @return {!Object}
  1610. * @suppress {unusedLocalVariables} f is only used for nested messages
  1611. */
  1612. proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) {
  1613. var f, obj = {
  1614. name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  1615. fieldList: jspb.Message.toObjectList(msg.getFieldList(),
  1616. proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance),
  1617. extensionList: jspb.Message.toObjectList(msg.getExtensionList(),
  1618. proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance),
  1619. nestedTypeList: jspb.Message.toObjectList(msg.getNestedTypeList(),
  1620. proto.google.protobuf.DescriptorProto.toObject, includeInstance),
  1621. enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(),
  1622. proto.google.protobuf.EnumDescriptorProto.toObject, includeInstance),
  1623. extensionRangeList: jspb.Message.toObjectList(msg.getExtensionRangeList(),
  1624. proto.google.protobuf.DescriptorProto.ExtensionRange.toObject, includeInstance),
  1625. oneofDeclList: jspb.Message.toObjectList(msg.getOneofDeclList(),
  1626. proto.google.protobuf.OneofDescriptorProto.toObject, includeInstance),
  1627. options: (f = msg.getOptions()) && proto.google.protobuf.MessageOptions.toObject(includeInstance, f),
  1628. reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(),
  1629. proto.google.protobuf.DescriptorProto.ReservedRange.toObject, includeInstance),
  1630. reservedNameList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f
  1631. };
  1632. if (includeInstance) {
  1633. obj.$jspbMessageInstance = msg;
  1634. }
  1635. return obj;
  1636. };
  1637. }
  1638. /**
  1639. * Deserializes binary data (in protobuf wire format).
  1640. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1641. * @return {!proto.google.protobuf.DescriptorProto}
  1642. */
  1643. proto.google.protobuf.DescriptorProto.deserializeBinary = function(bytes) {
  1644. var reader = new jspb.BinaryReader(bytes);
  1645. var msg = new proto.google.protobuf.DescriptorProto;
  1646. return proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader(msg, reader);
  1647. };
  1648. /**
  1649. * Deserializes binary data (in protobuf wire format) from the
  1650. * given reader into the given message object.
  1651. * @param {!proto.google.protobuf.DescriptorProto} msg The message object to deserialize into.
  1652. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1653. * @return {!proto.google.protobuf.DescriptorProto}
  1654. */
  1655. proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader = function(msg, reader) {
  1656. while (reader.nextField()) {
  1657. if (reader.isEndGroup()) {
  1658. break;
  1659. }
  1660. var field = reader.getFieldNumber();
  1661. switch (field) {
  1662. case 1:
  1663. var value = /** @type {string} */ (reader.readString());
  1664. msg.setName(value);
  1665. break;
  1666. case 2:
  1667. var value = new proto.google.protobuf.FieldDescriptorProto;
  1668. reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader);
  1669. msg.addField(value);
  1670. break;
  1671. case 6:
  1672. var value = new proto.google.protobuf.FieldDescriptorProto;
  1673. reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader);
  1674. msg.addExtension$(value);
  1675. break;
  1676. case 3:
  1677. var value = new proto.google.protobuf.DescriptorProto;
  1678. reader.readMessage(value,proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader);
  1679. msg.addNestedType(value);
  1680. break;
  1681. case 4:
  1682. var value = new proto.google.protobuf.EnumDescriptorProto;
  1683. reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader);
  1684. msg.addEnumType(value);
  1685. break;
  1686. case 5:
  1687. var value = new proto.google.protobuf.DescriptorProto.ExtensionRange;
  1688. reader.readMessage(value,proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader);
  1689. msg.addExtensionRange(value);
  1690. break;
  1691. case 8:
  1692. var value = new proto.google.protobuf.OneofDescriptorProto;
  1693. reader.readMessage(value,proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader);
  1694. msg.addOneofDecl(value);
  1695. break;
  1696. case 7:
  1697. var value = new proto.google.protobuf.MessageOptions;
  1698. reader.readMessage(value,proto.google.protobuf.MessageOptions.deserializeBinaryFromReader);
  1699. msg.setOptions(value);
  1700. break;
  1701. case 9:
  1702. var value = new proto.google.protobuf.DescriptorProto.ReservedRange;
  1703. reader.readMessage(value,proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader);
  1704. msg.addReservedRange(value);
  1705. break;
  1706. case 10:
  1707. var value = /** @type {string} */ (reader.readString());
  1708. msg.addReservedName(value);
  1709. break;
  1710. default:
  1711. reader.skipField();
  1712. break;
  1713. }
  1714. }
  1715. return msg;
  1716. };
  1717. /**
  1718. * Serializes the message to binary data (in protobuf wire format).
  1719. * @return {!Uint8Array}
  1720. */
  1721. proto.google.protobuf.DescriptorProto.prototype.serializeBinary = function() {
  1722. var writer = new jspb.BinaryWriter();
  1723. proto.google.protobuf.DescriptorProto.serializeBinaryToWriter(this, writer);
  1724. return writer.getResultBuffer();
  1725. };
  1726. /**
  1727. * Serializes the given message to binary data (in protobuf wire
  1728. * format), writing to the given BinaryWriter.
  1729. * @param {!proto.google.protobuf.DescriptorProto} message
  1730. * @param {!jspb.BinaryWriter} writer
  1731. * @suppress {unusedLocalVariables} f is only used for nested messages
  1732. */
  1733. proto.google.protobuf.DescriptorProto.serializeBinaryToWriter = function(message, writer) {
  1734. var f = undefined;
  1735. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  1736. if (f != null) {
  1737. writer.writeString(
  1738. 1,
  1739. f
  1740. );
  1741. }
  1742. f = message.getFieldList();
  1743. if (f.length > 0) {
  1744. writer.writeRepeatedMessage(
  1745. 2,
  1746. f,
  1747. proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter
  1748. );
  1749. }
  1750. f = message.getExtensionList();
  1751. if (f.length > 0) {
  1752. writer.writeRepeatedMessage(
  1753. 6,
  1754. f,
  1755. proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter
  1756. );
  1757. }
  1758. f = message.getNestedTypeList();
  1759. if (f.length > 0) {
  1760. writer.writeRepeatedMessage(
  1761. 3,
  1762. f,
  1763. proto.google.protobuf.DescriptorProto.serializeBinaryToWriter
  1764. );
  1765. }
  1766. f = message.getEnumTypeList();
  1767. if (f.length > 0) {
  1768. writer.writeRepeatedMessage(
  1769. 4,
  1770. f,
  1771. proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter
  1772. );
  1773. }
  1774. f = message.getExtensionRangeList();
  1775. if (f.length > 0) {
  1776. writer.writeRepeatedMessage(
  1777. 5,
  1778. f,
  1779. proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter
  1780. );
  1781. }
  1782. f = message.getOneofDeclList();
  1783. if (f.length > 0) {
  1784. writer.writeRepeatedMessage(
  1785. 8,
  1786. f,
  1787. proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter
  1788. );
  1789. }
  1790. f = message.getOptions();
  1791. if (f != null) {
  1792. writer.writeMessage(
  1793. 7,
  1794. f,
  1795. proto.google.protobuf.MessageOptions.serializeBinaryToWriter
  1796. );
  1797. }
  1798. f = message.getReservedRangeList();
  1799. if (f.length > 0) {
  1800. writer.writeRepeatedMessage(
  1801. 9,
  1802. f,
  1803. proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter
  1804. );
  1805. }
  1806. f = message.getReservedNameList();
  1807. if (f.length > 0) {
  1808. writer.writeRepeatedString(
  1809. 10,
  1810. f
  1811. );
  1812. }
  1813. };
  1814. if (jspb.Message.GENERATE_TO_OBJECT) {
  1815. /**
  1816. * Creates an object representation of this proto.
  1817. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1818. * Optional fields that are not set will be set to undefined.
  1819. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1820. * For the list of reserved names please see:
  1821. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  1822. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  1823. * JSPB instance for transitional soy proto support:
  1824. * http://goto/soy-param-migration
  1825. * @return {!Object}
  1826. */
  1827. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = function(opt_includeInstance) {
  1828. return proto.google.protobuf.DescriptorProto.ExtensionRange.toObject(opt_includeInstance, this);
  1829. };
  1830. /**
  1831. * Static version of the {@see toObject} method.
  1832. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1833. * the JSPB instance for transitional soy proto support:
  1834. * http://goto/soy-param-migration
  1835. * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The msg instance to transform.
  1836. * @return {!Object}
  1837. * @suppress {unusedLocalVariables} f is only used for nested messages
  1838. */
  1839. proto.google.protobuf.DescriptorProto.ExtensionRange.toObject = function(includeInstance, msg) {
  1840. var f, obj = {
  1841. start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  1842. end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
  1843. options: (f = msg.getOptions()) && proto.google.protobuf.ExtensionRangeOptions.toObject(includeInstance, f)
  1844. };
  1845. if (includeInstance) {
  1846. obj.$jspbMessageInstance = msg;
  1847. }
  1848. return obj;
  1849. };
  1850. }
  1851. /**
  1852. * Deserializes binary data (in protobuf wire format).
  1853. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1854. * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange}
  1855. */
  1856. proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinary = function(bytes) {
  1857. var reader = new jspb.BinaryReader(bytes);
  1858. var msg = new proto.google.protobuf.DescriptorProto.ExtensionRange;
  1859. return proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader(msg, reader);
  1860. };
  1861. /**
  1862. * Deserializes binary data (in protobuf wire format) from the
  1863. * given reader into the given message object.
  1864. * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The message object to deserialize into.
  1865. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1866. * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange}
  1867. */
  1868. proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader = function(msg, reader) {
  1869. while (reader.nextField()) {
  1870. if (reader.isEndGroup()) {
  1871. break;
  1872. }
  1873. var field = reader.getFieldNumber();
  1874. switch (field) {
  1875. case 1:
  1876. var value = /** @type {number} */ (reader.readInt32());
  1877. msg.setStart(value);
  1878. break;
  1879. case 2:
  1880. var value = /** @type {number} */ (reader.readInt32());
  1881. msg.setEnd(value);
  1882. break;
  1883. case 3:
  1884. var value = new proto.google.protobuf.ExtensionRangeOptions;
  1885. reader.readMessage(value,proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader);
  1886. msg.setOptions(value);
  1887. break;
  1888. default:
  1889. reader.skipField();
  1890. break;
  1891. }
  1892. }
  1893. return msg;
  1894. };
  1895. /**
  1896. * Serializes the message to binary data (in protobuf wire format).
  1897. * @return {!Uint8Array}
  1898. */
  1899. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.serializeBinary = function() {
  1900. var writer = new jspb.BinaryWriter();
  1901. proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter(this, writer);
  1902. return writer.getResultBuffer();
  1903. };
  1904. /**
  1905. * Serializes the given message to binary data (in protobuf wire
  1906. * format), writing to the given BinaryWriter.
  1907. * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} message
  1908. * @param {!jspb.BinaryWriter} writer
  1909. * @suppress {unusedLocalVariables} f is only used for nested messages
  1910. */
  1911. proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter = function(message, writer) {
  1912. var f = undefined;
  1913. f = /** @type {number} */ (jspb.Message.getField(message, 1));
  1914. if (f != null) {
  1915. writer.writeInt32(
  1916. 1,
  1917. f
  1918. );
  1919. }
  1920. f = /** @type {number} */ (jspb.Message.getField(message, 2));
  1921. if (f != null) {
  1922. writer.writeInt32(
  1923. 2,
  1924. f
  1925. );
  1926. }
  1927. f = message.getOptions();
  1928. if (f != null) {
  1929. writer.writeMessage(
  1930. 3,
  1931. f,
  1932. proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter
  1933. );
  1934. }
  1935. };
  1936. /**
  1937. * optional int32 start = 1;
  1938. * @return {number}
  1939. */
  1940. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getStart = function() {
  1941. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  1942. };
  1943. /**
  1944. * @param {number} value
  1945. * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this
  1946. */
  1947. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setStart = function(value) {
  1948. return jspb.Message.setField(this, 1, value);
  1949. };
  1950. /**
  1951. * Clears the field making it undefined.
  1952. * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this
  1953. */
  1954. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearStart = function() {
  1955. return jspb.Message.setField(this, 1, undefined);
  1956. };
  1957. /**
  1958. * Returns whether this field is set.
  1959. * @return {boolean}
  1960. */
  1961. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasStart = function() {
  1962. return jspb.Message.getField(this, 1) != null;
  1963. };
  1964. /**
  1965. * optional int32 end = 2;
  1966. * @return {number}
  1967. */
  1968. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getEnd = function() {
  1969. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
  1970. };
  1971. /**
  1972. * @param {number} value
  1973. * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this
  1974. */
  1975. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setEnd = function(value) {
  1976. return jspb.Message.setField(this, 2, value);
  1977. };
  1978. /**
  1979. * Clears the field making it undefined.
  1980. * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this
  1981. */
  1982. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearEnd = function() {
  1983. return jspb.Message.setField(this, 2, undefined);
  1984. };
  1985. /**
  1986. * Returns whether this field is set.
  1987. * @return {boolean}
  1988. */
  1989. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasEnd = function() {
  1990. return jspb.Message.getField(this, 2) != null;
  1991. };
  1992. /**
  1993. * optional ExtensionRangeOptions options = 3;
  1994. * @return {?proto.google.protobuf.ExtensionRangeOptions}
  1995. */
  1996. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getOptions = function() {
  1997. return /** @type{?proto.google.protobuf.ExtensionRangeOptions} */ (
  1998. jspb.Message.getWrapperField(this, proto.google.protobuf.ExtensionRangeOptions, 3));
  1999. };
  2000. /**
  2001. * @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value
  2002. * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this
  2003. */
  2004. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setOptions = function(value) {
  2005. return jspb.Message.setWrapperField(this, 3, value);
  2006. };
  2007. /**
  2008. * Clears the message field making it undefined.
  2009. * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this
  2010. */
  2011. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearOptions = function() {
  2012. return this.setOptions(undefined);
  2013. };
  2014. /**
  2015. * Returns whether this field is set.
  2016. * @return {boolean}
  2017. */
  2018. proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasOptions = function() {
  2019. return jspb.Message.getField(this, 3) != null;
  2020. };
  2021. if (jspb.Message.GENERATE_TO_OBJECT) {
  2022. /**
  2023. * Creates an object representation of this proto.
  2024. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  2025. * Optional fields that are not set will be set to undefined.
  2026. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  2027. * For the list of reserved names please see:
  2028. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  2029. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  2030. * JSPB instance for transitional soy proto support:
  2031. * http://goto/soy-param-migration
  2032. * @return {!Object}
  2033. */
  2034. proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = function(opt_includeInstance) {
  2035. return proto.google.protobuf.DescriptorProto.ReservedRange.toObject(opt_includeInstance, this);
  2036. };
  2037. /**
  2038. * Static version of the {@see toObject} method.
  2039. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  2040. * the JSPB instance for transitional soy proto support:
  2041. * http://goto/soy-param-migration
  2042. * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The msg instance to transform.
  2043. * @return {!Object}
  2044. * @suppress {unusedLocalVariables} f is only used for nested messages
  2045. */
  2046. proto.google.protobuf.DescriptorProto.ReservedRange.toObject = function(includeInstance, msg) {
  2047. var f, obj = {
  2048. start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  2049. end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f
  2050. };
  2051. if (includeInstance) {
  2052. obj.$jspbMessageInstance = msg;
  2053. }
  2054. return obj;
  2055. };
  2056. }
  2057. /**
  2058. * Deserializes binary data (in protobuf wire format).
  2059. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  2060. * @return {!proto.google.protobuf.DescriptorProto.ReservedRange}
  2061. */
  2062. proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinary = function(bytes) {
  2063. var reader = new jspb.BinaryReader(bytes);
  2064. var msg = new proto.google.protobuf.DescriptorProto.ReservedRange;
  2065. return proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader(msg, reader);
  2066. };
  2067. /**
  2068. * Deserializes binary data (in protobuf wire format) from the
  2069. * given reader into the given message object.
  2070. * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The message object to deserialize into.
  2071. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  2072. * @return {!proto.google.protobuf.DescriptorProto.ReservedRange}
  2073. */
  2074. proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader = function(msg, reader) {
  2075. while (reader.nextField()) {
  2076. if (reader.isEndGroup()) {
  2077. break;
  2078. }
  2079. var field = reader.getFieldNumber();
  2080. switch (field) {
  2081. case 1:
  2082. var value = /** @type {number} */ (reader.readInt32());
  2083. msg.setStart(value);
  2084. break;
  2085. case 2:
  2086. var value = /** @type {number} */ (reader.readInt32());
  2087. msg.setEnd(value);
  2088. break;
  2089. default:
  2090. reader.skipField();
  2091. break;
  2092. }
  2093. }
  2094. return msg;
  2095. };
  2096. /**
  2097. * Serializes the message to binary data (in protobuf wire format).
  2098. * @return {!Uint8Array}
  2099. */
  2100. proto.google.protobuf.DescriptorProto.ReservedRange.prototype.serializeBinary = function() {
  2101. var writer = new jspb.BinaryWriter();
  2102. proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter(this, writer);
  2103. return writer.getResultBuffer();
  2104. };
  2105. /**
  2106. * Serializes the given message to binary data (in protobuf wire
  2107. * format), writing to the given BinaryWriter.
  2108. * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} message
  2109. * @param {!jspb.BinaryWriter} writer
  2110. * @suppress {unusedLocalVariables} f is only used for nested messages
  2111. */
  2112. proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter = function(message, writer) {
  2113. var f = undefined;
  2114. f = /** @type {number} */ (jspb.Message.getField(message, 1));
  2115. if (f != null) {
  2116. writer.writeInt32(
  2117. 1,
  2118. f
  2119. );
  2120. }
  2121. f = /** @type {number} */ (jspb.Message.getField(message, 2));
  2122. if (f != null) {
  2123. writer.writeInt32(
  2124. 2,
  2125. f
  2126. );
  2127. }
  2128. };
  2129. /**
  2130. * optional int32 start = 1;
  2131. * @return {number}
  2132. */
  2133. proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getStart = function() {
  2134. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  2135. };
  2136. /**
  2137. * @param {number} value
  2138. * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this
  2139. */
  2140. proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setStart = function(value) {
  2141. return jspb.Message.setField(this, 1, value);
  2142. };
  2143. /**
  2144. * Clears the field making it undefined.
  2145. * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this
  2146. */
  2147. proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearStart = function() {
  2148. return jspb.Message.setField(this, 1, undefined);
  2149. };
  2150. /**
  2151. * Returns whether this field is set.
  2152. * @return {boolean}
  2153. */
  2154. proto.google.protobuf.DescriptorProto.ReservedRange.prototype.hasStart = function() {
  2155. return jspb.Message.getField(this, 1) != null;
  2156. };
  2157. /**
  2158. * optional int32 end = 2;
  2159. * @return {number}
  2160. */
  2161. proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getEnd = function() {
  2162. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
  2163. };
  2164. /**
  2165. * @param {number} value
  2166. * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this
  2167. */
  2168. proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setEnd = function(value) {
  2169. return jspb.Message.setField(this, 2, value);
  2170. };
  2171. /**
  2172. * Clears the field making it undefined.
  2173. * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this
  2174. */
  2175. proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearEnd = function() {
  2176. return jspb.Message.setField(this, 2, undefined);
  2177. };
  2178. /**
  2179. * Returns whether this field is set.
  2180. * @return {boolean}
  2181. */
  2182. proto.google.protobuf.DescriptorProto.ReservedRange.prototype.hasEnd = function() {
  2183. return jspb.Message.getField(this, 2) != null;
  2184. };
  2185. /**
  2186. * optional string name = 1;
  2187. * @return {string}
  2188. */
  2189. proto.google.protobuf.DescriptorProto.prototype.getName = function() {
  2190. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  2191. };
  2192. /**
  2193. * @param {string} value
  2194. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2195. */
  2196. proto.google.protobuf.DescriptorProto.prototype.setName = function(value) {
  2197. return jspb.Message.setField(this, 1, value);
  2198. };
  2199. /**
  2200. * Clears the field making it undefined.
  2201. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2202. */
  2203. proto.google.protobuf.DescriptorProto.prototype.clearName = function() {
  2204. return jspb.Message.setField(this, 1, undefined);
  2205. };
  2206. /**
  2207. * Returns whether this field is set.
  2208. * @return {boolean}
  2209. */
  2210. proto.google.protobuf.DescriptorProto.prototype.hasName = function() {
  2211. return jspb.Message.getField(this, 1) != null;
  2212. };
  2213. /**
  2214. * repeated FieldDescriptorProto field = 2;
  2215. * @return {!Array<!proto.google.protobuf.FieldDescriptorProto>}
  2216. */
  2217. proto.google.protobuf.DescriptorProto.prototype.getFieldList = function() {
  2218. return /** @type{!Array<!proto.google.protobuf.FieldDescriptorProto>} */ (
  2219. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 2));
  2220. };
  2221. /**
  2222. * @param {!Array<!proto.google.protobuf.FieldDescriptorProto>} value
  2223. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2224. */
  2225. proto.google.protobuf.DescriptorProto.prototype.setFieldList = function(value) {
  2226. return jspb.Message.setRepeatedWrapperField(this, 2, value);
  2227. };
  2228. /**
  2229. * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value
  2230. * @param {number=} opt_index
  2231. * @return {!proto.google.protobuf.FieldDescriptorProto}
  2232. */
  2233. proto.google.protobuf.DescriptorProto.prototype.addField = function(opt_value, opt_index) {
  2234. return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index);
  2235. };
  2236. /**
  2237. * Clears the list making it empty but non-null.
  2238. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2239. */
  2240. proto.google.protobuf.DescriptorProto.prototype.clearFieldList = function() {
  2241. return this.setFieldList([]);
  2242. };
  2243. /**
  2244. * repeated FieldDescriptorProto extension = 6;
  2245. * @return {!Array<!proto.google.protobuf.FieldDescriptorProto>}
  2246. */
  2247. proto.google.protobuf.DescriptorProto.prototype.getExtensionList = function() {
  2248. return /** @type{!Array<!proto.google.protobuf.FieldDescriptorProto>} */ (
  2249. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 6));
  2250. };
  2251. /**
  2252. * @param {!Array<!proto.google.protobuf.FieldDescriptorProto>} value
  2253. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2254. */
  2255. proto.google.protobuf.DescriptorProto.prototype.setExtensionList = function(value) {
  2256. return jspb.Message.setRepeatedWrapperField(this, 6, value);
  2257. };
  2258. /**
  2259. * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value
  2260. * @param {number=} opt_index
  2261. * @return {!proto.google.protobuf.FieldDescriptorProto}
  2262. */
  2263. proto.google.protobuf.DescriptorProto.prototype.addExtension$ = function(opt_value, opt_index) {
  2264. return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index);
  2265. };
  2266. /**
  2267. * Clears the list making it empty but non-null.
  2268. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2269. */
  2270. proto.google.protobuf.DescriptorProto.prototype.clearExtensionList = function() {
  2271. return this.setExtensionList([]);
  2272. };
  2273. /**
  2274. * repeated DescriptorProto nested_type = 3;
  2275. * @return {!Array<!proto.google.protobuf.DescriptorProto>}
  2276. */
  2277. proto.google.protobuf.DescriptorProto.prototype.getNestedTypeList = function() {
  2278. return /** @type{!Array<!proto.google.protobuf.DescriptorProto>} */ (
  2279. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto, 3));
  2280. };
  2281. /**
  2282. * @param {!Array<!proto.google.protobuf.DescriptorProto>} value
  2283. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2284. */
  2285. proto.google.protobuf.DescriptorProto.prototype.setNestedTypeList = function(value) {
  2286. return jspb.Message.setRepeatedWrapperField(this, 3, value);
  2287. };
  2288. /**
  2289. * @param {!proto.google.protobuf.DescriptorProto=} opt_value
  2290. * @param {number=} opt_index
  2291. * @return {!proto.google.protobuf.DescriptorProto}
  2292. */
  2293. proto.google.protobuf.DescriptorProto.prototype.addNestedType = function(opt_value, opt_index) {
  2294. return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.DescriptorProto, opt_index);
  2295. };
  2296. /**
  2297. * Clears the list making it empty but non-null.
  2298. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2299. */
  2300. proto.google.protobuf.DescriptorProto.prototype.clearNestedTypeList = function() {
  2301. return this.setNestedTypeList([]);
  2302. };
  2303. /**
  2304. * repeated EnumDescriptorProto enum_type = 4;
  2305. * @return {!Array<!proto.google.protobuf.EnumDescriptorProto>}
  2306. */
  2307. proto.google.protobuf.DescriptorProto.prototype.getEnumTypeList = function() {
  2308. return /** @type{!Array<!proto.google.protobuf.EnumDescriptorProto>} */ (
  2309. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto, 4));
  2310. };
  2311. /**
  2312. * @param {!Array<!proto.google.protobuf.EnumDescriptorProto>} value
  2313. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2314. */
  2315. proto.google.protobuf.DescriptorProto.prototype.setEnumTypeList = function(value) {
  2316. return jspb.Message.setRepeatedWrapperField(this, 4, value);
  2317. };
  2318. /**
  2319. * @param {!proto.google.protobuf.EnumDescriptorProto=} opt_value
  2320. * @param {number=} opt_index
  2321. * @return {!proto.google.protobuf.EnumDescriptorProto}
  2322. */
  2323. proto.google.protobuf.DescriptorProto.prototype.addEnumType = function(opt_value, opt_index) {
  2324. return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.EnumDescriptorProto, opt_index);
  2325. };
  2326. /**
  2327. * Clears the list making it empty but non-null.
  2328. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2329. */
  2330. proto.google.protobuf.DescriptorProto.prototype.clearEnumTypeList = function() {
  2331. return this.setEnumTypeList([]);
  2332. };
  2333. /**
  2334. * repeated ExtensionRange extension_range = 5;
  2335. * @return {!Array<!proto.google.protobuf.DescriptorProto.ExtensionRange>}
  2336. */
  2337. proto.google.protobuf.DescriptorProto.prototype.getExtensionRangeList = function() {
  2338. return /** @type{!Array<!proto.google.protobuf.DescriptorProto.ExtensionRange>} */ (
  2339. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto.ExtensionRange, 5));
  2340. };
  2341. /**
  2342. * @param {!Array<!proto.google.protobuf.DescriptorProto.ExtensionRange>} value
  2343. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2344. */
  2345. proto.google.protobuf.DescriptorProto.prototype.setExtensionRangeList = function(value) {
  2346. return jspb.Message.setRepeatedWrapperField(this, 5, value);
  2347. };
  2348. /**
  2349. * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange=} opt_value
  2350. * @param {number=} opt_index
  2351. * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange}
  2352. */
  2353. proto.google.protobuf.DescriptorProto.prototype.addExtensionRange = function(opt_value, opt_index) {
  2354. return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.google.protobuf.DescriptorProto.ExtensionRange, opt_index);
  2355. };
  2356. /**
  2357. * Clears the list making it empty but non-null.
  2358. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2359. */
  2360. proto.google.protobuf.DescriptorProto.prototype.clearExtensionRangeList = function() {
  2361. return this.setExtensionRangeList([]);
  2362. };
  2363. /**
  2364. * repeated OneofDescriptorProto oneof_decl = 8;
  2365. * @return {!Array<!proto.google.protobuf.OneofDescriptorProto>}
  2366. */
  2367. proto.google.protobuf.DescriptorProto.prototype.getOneofDeclList = function() {
  2368. return /** @type{!Array<!proto.google.protobuf.OneofDescriptorProto>} */ (
  2369. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.OneofDescriptorProto, 8));
  2370. };
  2371. /**
  2372. * @param {!Array<!proto.google.protobuf.OneofDescriptorProto>} value
  2373. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2374. */
  2375. proto.google.protobuf.DescriptorProto.prototype.setOneofDeclList = function(value) {
  2376. return jspb.Message.setRepeatedWrapperField(this, 8, value);
  2377. };
  2378. /**
  2379. * @param {!proto.google.protobuf.OneofDescriptorProto=} opt_value
  2380. * @param {number=} opt_index
  2381. * @return {!proto.google.protobuf.OneofDescriptorProto}
  2382. */
  2383. proto.google.protobuf.DescriptorProto.prototype.addOneofDecl = function(opt_value, opt_index) {
  2384. return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.protobuf.OneofDescriptorProto, opt_index);
  2385. };
  2386. /**
  2387. * Clears the list making it empty but non-null.
  2388. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2389. */
  2390. proto.google.protobuf.DescriptorProto.prototype.clearOneofDeclList = function() {
  2391. return this.setOneofDeclList([]);
  2392. };
  2393. /**
  2394. * optional MessageOptions options = 7;
  2395. * @return {?proto.google.protobuf.MessageOptions}
  2396. */
  2397. proto.google.protobuf.DescriptorProto.prototype.getOptions = function() {
  2398. return /** @type{?proto.google.protobuf.MessageOptions} */ (
  2399. jspb.Message.getWrapperField(this, proto.google.protobuf.MessageOptions, 7));
  2400. };
  2401. /**
  2402. * @param {?proto.google.protobuf.MessageOptions|undefined} value
  2403. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2404. */
  2405. proto.google.protobuf.DescriptorProto.prototype.setOptions = function(value) {
  2406. return jspb.Message.setWrapperField(this, 7, value);
  2407. };
  2408. /**
  2409. * Clears the message field making it undefined.
  2410. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2411. */
  2412. proto.google.protobuf.DescriptorProto.prototype.clearOptions = function() {
  2413. return this.setOptions(undefined);
  2414. };
  2415. /**
  2416. * Returns whether this field is set.
  2417. * @return {boolean}
  2418. */
  2419. proto.google.protobuf.DescriptorProto.prototype.hasOptions = function() {
  2420. return jspb.Message.getField(this, 7) != null;
  2421. };
  2422. /**
  2423. * repeated ReservedRange reserved_range = 9;
  2424. * @return {!Array<!proto.google.protobuf.DescriptorProto.ReservedRange>}
  2425. */
  2426. proto.google.protobuf.DescriptorProto.prototype.getReservedRangeList = function() {
  2427. return /** @type{!Array<!proto.google.protobuf.DescriptorProto.ReservedRange>} */ (
  2428. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto.ReservedRange, 9));
  2429. };
  2430. /**
  2431. * @param {!Array<!proto.google.protobuf.DescriptorProto.ReservedRange>} value
  2432. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2433. */
  2434. proto.google.protobuf.DescriptorProto.prototype.setReservedRangeList = function(value) {
  2435. return jspb.Message.setRepeatedWrapperField(this, 9, value);
  2436. };
  2437. /**
  2438. * @param {!proto.google.protobuf.DescriptorProto.ReservedRange=} opt_value
  2439. * @param {number=} opt_index
  2440. * @return {!proto.google.protobuf.DescriptorProto.ReservedRange}
  2441. */
  2442. proto.google.protobuf.DescriptorProto.prototype.addReservedRange = function(opt_value, opt_index) {
  2443. return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.google.protobuf.DescriptorProto.ReservedRange, opt_index);
  2444. };
  2445. /**
  2446. * Clears the list making it empty but non-null.
  2447. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2448. */
  2449. proto.google.protobuf.DescriptorProto.prototype.clearReservedRangeList = function() {
  2450. return this.setReservedRangeList([]);
  2451. };
  2452. /**
  2453. * repeated string reserved_name = 10;
  2454. * @return {!Array<string>}
  2455. */
  2456. proto.google.protobuf.DescriptorProto.prototype.getReservedNameList = function() {
  2457. return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 10));
  2458. };
  2459. /**
  2460. * @param {!Array<string>} value
  2461. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2462. */
  2463. proto.google.protobuf.DescriptorProto.prototype.setReservedNameList = function(value) {
  2464. return jspb.Message.setField(this, 10, value || []);
  2465. };
  2466. /**
  2467. * @param {string} value
  2468. * @param {number=} opt_index
  2469. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2470. */
  2471. proto.google.protobuf.DescriptorProto.prototype.addReservedName = function(value, opt_index) {
  2472. return jspb.Message.addToRepeatedField(this, 10, value, opt_index);
  2473. };
  2474. /**
  2475. * Clears the list making it empty but non-null.
  2476. * @return {!proto.google.protobuf.DescriptorProto} returns this
  2477. */
  2478. proto.google.protobuf.DescriptorProto.prototype.clearReservedNameList = function() {
  2479. return this.setReservedNameList([]);
  2480. };
  2481. /**
  2482. * List of repeated fields within this message type.
  2483. * @private {!Array<number>}
  2484. * @const
  2485. */
  2486. proto.google.protobuf.ExtensionRangeOptions.repeatedFields_ = [999];
  2487. if (jspb.Message.GENERATE_TO_OBJECT) {
  2488. /**
  2489. * Creates an object representation of this proto.
  2490. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  2491. * Optional fields that are not set will be set to undefined.
  2492. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  2493. * For the list of reserved names please see:
  2494. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  2495. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  2496. * JSPB instance for transitional soy proto support:
  2497. * http://goto/soy-param-migration
  2498. * @return {!Object}
  2499. */
  2500. proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_includeInstance) {
  2501. return proto.google.protobuf.ExtensionRangeOptions.toObject(opt_includeInstance, this);
  2502. };
  2503. /**
  2504. * Static version of the {@see toObject} method.
  2505. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  2506. * the JSPB instance for transitional soy proto support:
  2507. * http://goto/soy-param-migration
  2508. * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The msg instance to transform.
  2509. * @return {!Object}
  2510. * @suppress {unusedLocalVariables} f is only used for nested messages
  2511. */
  2512. proto.google.protobuf.ExtensionRangeOptions.toObject = function(includeInstance, msg) {
  2513. var f, obj = {
  2514. uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(),
  2515. proto.google.protobuf.UninterpretedOption.toObject, includeInstance)
  2516. };
  2517. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  2518. proto.google.protobuf.ExtensionRangeOptions.extensions, proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension,
  2519. includeInstance);
  2520. if (includeInstance) {
  2521. obj.$jspbMessageInstance = msg;
  2522. }
  2523. return obj;
  2524. };
  2525. }
  2526. /**
  2527. * Deserializes binary data (in protobuf wire format).
  2528. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  2529. * @return {!proto.google.protobuf.ExtensionRangeOptions}
  2530. */
  2531. proto.google.protobuf.ExtensionRangeOptions.deserializeBinary = function(bytes) {
  2532. var reader = new jspb.BinaryReader(bytes);
  2533. var msg = new proto.google.protobuf.ExtensionRangeOptions;
  2534. return proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader(msg, reader);
  2535. };
  2536. /**
  2537. * Deserializes binary data (in protobuf wire format) from the
  2538. * given reader into the given message object.
  2539. * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The message object to deserialize into.
  2540. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  2541. * @return {!proto.google.protobuf.ExtensionRangeOptions}
  2542. */
  2543. proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader = function(msg, reader) {
  2544. while (reader.nextField()) {
  2545. if (reader.isEndGroup()) {
  2546. break;
  2547. }
  2548. var field = reader.getFieldNumber();
  2549. switch (field) {
  2550. case 999:
  2551. var value = new proto.google.protobuf.UninterpretedOption;
  2552. reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader);
  2553. msg.addUninterpretedOption(value);
  2554. break;
  2555. default:
  2556. jspb.Message.readBinaryExtension(msg, reader,
  2557. proto.google.protobuf.ExtensionRangeOptions.extensionsBinary,
  2558. proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension,
  2559. proto.google.protobuf.ExtensionRangeOptions.prototype.setExtension);
  2560. break;
  2561. }
  2562. }
  2563. return msg;
  2564. };
  2565. /**
  2566. * Serializes the message to binary data (in protobuf wire format).
  2567. * @return {!Uint8Array}
  2568. */
  2569. proto.google.protobuf.ExtensionRangeOptions.prototype.serializeBinary = function() {
  2570. var writer = new jspb.BinaryWriter();
  2571. proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter(this, writer);
  2572. return writer.getResultBuffer();
  2573. };
  2574. /**
  2575. * Serializes the given message to binary data (in protobuf wire
  2576. * format), writing to the given BinaryWriter.
  2577. * @param {!proto.google.protobuf.ExtensionRangeOptions} message
  2578. * @param {!jspb.BinaryWriter} writer
  2579. * @suppress {unusedLocalVariables} f is only used for nested messages
  2580. */
  2581. proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter = function(message, writer) {
  2582. var f = undefined;
  2583. f = message.getUninterpretedOptionList();
  2584. if (f.length > 0) {
  2585. writer.writeRepeatedMessage(
  2586. 999,
  2587. f,
  2588. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter
  2589. );
  2590. }
  2591. jspb.Message.serializeBinaryExtensions(message, writer,
  2592. proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension);
  2593. };
  2594. /**
  2595. * repeated UninterpretedOption uninterpreted_option = 999;
  2596. * @return {!Array<!proto.google.protobuf.UninterpretedOption>}
  2597. */
  2598. proto.google.protobuf.ExtensionRangeOptions.prototype.getUninterpretedOptionList = function() {
  2599. return /** @type{!Array<!proto.google.protobuf.UninterpretedOption>} */ (
  2600. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999));
  2601. };
  2602. /**
  2603. * @param {!Array<!proto.google.protobuf.UninterpretedOption>} value
  2604. * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this
  2605. */
  2606. proto.google.protobuf.ExtensionRangeOptions.prototype.setUninterpretedOptionList = function(value) {
  2607. return jspb.Message.setRepeatedWrapperField(this, 999, value);
  2608. };
  2609. /**
  2610. * @param {!proto.google.protobuf.UninterpretedOption=} opt_value
  2611. * @param {number=} opt_index
  2612. * @return {!proto.google.protobuf.UninterpretedOption}
  2613. */
  2614. proto.google.protobuf.ExtensionRangeOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) {
  2615. return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index);
  2616. };
  2617. /**
  2618. * Clears the list making it empty but non-null.
  2619. * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this
  2620. */
  2621. proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList = function() {
  2622. return this.setUninterpretedOptionList([]);
  2623. };
  2624. if (jspb.Message.GENERATE_TO_OBJECT) {
  2625. /**
  2626. * Creates an object representation of this proto.
  2627. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  2628. * Optional fields that are not set will be set to undefined.
  2629. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  2630. * For the list of reserved names please see:
  2631. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  2632. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  2633. * JSPB instance for transitional soy proto support:
  2634. * http://goto/soy-param-migration
  2635. * @return {!Object}
  2636. */
  2637. proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_includeInstance) {
  2638. return proto.google.protobuf.FieldDescriptorProto.toObject(opt_includeInstance, this);
  2639. };
  2640. /**
  2641. * Static version of the {@see toObject} method.
  2642. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  2643. * the JSPB instance for transitional soy proto support:
  2644. * http://goto/soy-param-migration
  2645. * @param {!proto.google.protobuf.FieldDescriptorProto} msg The msg instance to transform.
  2646. * @return {!Object}
  2647. * @suppress {unusedLocalVariables} f is only used for nested messages
  2648. */
  2649. proto.google.protobuf.FieldDescriptorProto.toObject = function(includeInstance, msg) {
  2650. var f, obj = {
  2651. name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  2652. number: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
  2653. label: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
  2654. type: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f,
  2655. typeName: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f,
  2656. extendee: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
  2657. defaultValue: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f,
  2658. oneofIndex: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f,
  2659. jsonName: (f = jspb.Message.getField(msg, 10)) == null ? undefined : f,
  2660. options: (f = msg.getOptions()) && proto.google.protobuf.FieldOptions.toObject(includeInstance, f),
  2661. proto3Optional: (f = jspb.Message.getBooleanField(msg, 17)) == null ? undefined : f
  2662. };
  2663. if (includeInstance) {
  2664. obj.$jspbMessageInstance = msg;
  2665. }
  2666. return obj;
  2667. };
  2668. }
  2669. /**
  2670. * Deserializes binary data (in protobuf wire format).
  2671. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  2672. * @return {!proto.google.protobuf.FieldDescriptorProto}
  2673. */
  2674. proto.google.protobuf.FieldDescriptorProto.deserializeBinary = function(bytes) {
  2675. var reader = new jspb.BinaryReader(bytes);
  2676. var msg = new proto.google.protobuf.FieldDescriptorProto;
  2677. return proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader(msg, reader);
  2678. };
  2679. /**
  2680. * Deserializes binary data (in protobuf wire format) from the
  2681. * given reader into the given message object.
  2682. * @param {!proto.google.protobuf.FieldDescriptorProto} msg The message object to deserialize into.
  2683. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  2684. * @return {!proto.google.protobuf.FieldDescriptorProto}
  2685. */
  2686. proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader = function(msg, reader) {
  2687. while (reader.nextField()) {
  2688. if (reader.isEndGroup()) {
  2689. break;
  2690. }
  2691. var field = reader.getFieldNumber();
  2692. switch (field) {
  2693. case 1:
  2694. var value = /** @type {string} */ (reader.readString());
  2695. msg.setName(value);
  2696. break;
  2697. case 3:
  2698. var value = /** @type {number} */ (reader.readInt32());
  2699. msg.setNumber(value);
  2700. break;
  2701. case 4:
  2702. var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (reader.readEnum());
  2703. msg.setLabel(value);
  2704. break;
  2705. case 5:
  2706. var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (reader.readEnum());
  2707. msg.setType(value);
  2708. break;
  2709. case 6:
  2710. var value = /** @type {string} */ (reader.readString());
  2711. msg.setTypeName(value);
  2712. break;
  2713. case 2:
  2714. var value = /** @type {string} */ (reader.readString());
  2715. msg.setExtendee(value);
  2716. break;
  2717. case 7:
  2718. var value = /** @type {string} */ (reader.readString());
  2719. msg.setDefaultValue(value);
  2720. break;
  2721. case 9:
  2722. var value = /** @type {number} */ (reader.readInt32());
  2723. msg.setOneofIndex(value);
  2724. break;
  2725. case 10:
  2726. var value = /** @type {string} */ (reader.readString());
  2727. msg.setJsonName(value);
  2728. break;
  2729. case 8:
  2730. var value = new proto.google.protobuf.FieldOptions;
  2731. reader.readMessage(value,proto.google.protobuf.FieldOptions.deserializeBinaryFromReader);
  2732. msg.setOptions(value);
  2733. break;
  2734. case 17:
  2735. var value = /** @type {boolean} */ (reader.readBool());
  2736. msg.setProto3Optional(value);
  2737. break;
  2738. default:
  2739. reader.skipField();
  2740. break;
  2741. }
  2742. }
  2743. return msg;
  2744. };
  2745. /**
  2746. * Serializes the message to binary data (in protobuf wire format).
  2747. * @return {!Uint8Array}
  2748. */
  2749. proto.google.protobuf.FieldDescriptorProto.prototype.serializeBinary = function() {
  2750. var writer = new jspb.BinaryWriter();
  2751. proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter(this, writer);
  2752. return writer.getResultBuffer();
  2753. };
  2754. /**
  2755. * Serializes the given message to binary data (in protobuf wire
  2756. * format), writing to the given BinaryWriter.
  2757. * @param {!proto.google.protobuf.FieldDescriptorProto} message
  2758. * @param {!jspb.BinaryWriter} writer
  2759. * @suppress {unusedLocalVariables} f is only used for nested messages
  2760. */
  2761. proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter = function(message, writer) {
  2762. var f = undefined;
  2763. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  2764. if (f != null) {
  2765. writer.writeString(
  2766. 1,
  2767. f
  2768. );
  2769. }
  2770. f = /** @type {number} */ (jspb.Message.getField(message, 3));
  2771. if (f != null) {
  2772. writer.writeInt32(
  2773. 3,
  2774. f
  2775. );
  2776. }
  2777. f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (jspb.Message.getField(message, 4));
  2778. if (f != null) {
  2779. writer.writeEnum(
  2780. 4,
  2781. f
  2782. );
  2783. }
  2784. f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getField(message, 5));
  2785. if (f != null) {
  2786. writer.writeEnum(
  2787. 5,
  2788. f
  2789. );
  2790. }
  2791. f = /** @type {string} */ (jspb.Message.getField(message, 6));
  2792. if (f != null) {
  2793. writer.writeString(
  2794. 6,
  2795. f
  2796. );
  2797. }
  2798. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  2799. if (f != null) {
  2800. writer.writeString(
  2801. 2,
  2802. f
  2803. );
  2804. }
  2805. f = /** @type {string} */ (jspb.Message.getField(message, 7));
  2806. if (f != null) {
  2807. writer.writeString(
  2808. 7,
  2809. f
  2810. );
  2811. }
  2812. f = /** @type {number} */ (jspb.Message.getField(message, 9));
  2813. if (f != null) {
  2814. writer.writeInt32(
  2815. 9,
  2816. f
  2817. );
  2818. }
  2819. f = /** @type {string} */ (jspb.Message.getField(message, 10));
  2820. if (f != null) {
  2821. writer.writeString(
  2822. 10,
  2823. f
  2824. );
  2825. }
  2826. f = message.getOptions();
  2827. if (f != null) {
  2828. writer.writeMessage(
  2829. 8,
  2830. f,
  2831. proto.google.protobuf.FieldOptions.serializeBinaryToWriter
  2832. );
  2833. }
  2834. f = /** @type {boolean} */ (jspb.Message.getField(message, 17));
  2835. if (f != null) {
  2836. writer.writeBool(
  2837. 17,
  2838. f
  2839. );
  2840. }
  2841. };
  2842. /**
  2843. * @enum {number}
  2844. */
  2845. proto.google.protobuf.FieldDescriptorProto.Type = {
  2846. TYPE_DOUBLE: 1,
  2847. TYPE_FLOAT: 2,
  2848. TYPE_INT64: 3,
  2849. TYPE_UINT64: 4,
  2850. TYPE_INT32: 5,
  2851. TYPE_FIXED64: 6,
  2852. TYPE_FIXED32: 7,
  2853. TYPE_BOOL: 8,
  2854. TYPE_STRING: 9,
  2855. TYPE_GROUP: 10,
  2856. TYPE_MESSAGE: 11,
  2857. TYPE_BYTES: 12,
  2858. TYPE_UINT32: 13,
  2859. TYPE_ENUM: 14,
  2860. TYPE_SFIXED32: 15,
  2861. TYPE_SFIXED64: 16,
  2862. TYPE_SINT32: 17,
  2863. TYPE_SINT64: 18
  2864. };
  2865. /**
  2866. * @enum {number}
  2867. */
  2868. proto.google.protobuf.FieldDescriptorProto.Label = {
  2869. LABEL_OPTIONAL: 1,
  2870. LABEL_REQUIRED: 2,
  2871. LABEL_REPEATED: 3
  2872. };
  2873. /**
  2874. * optional string name = 1;
  2875. * @return {string}
  2876. */
  2877. proto.google.protobuf.FieldDescriptorProto.prototype.getName = function() {
  2878. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  2879. };
  2880. /**
  2881. * @param {string} value
  2882. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  2883. */
  2884. proto.google.protobuf.FieldDescriptorProto.prototype.setName = function(value) {
  2885. return jspb.Message.setField(this, 1, value);
  2886. };
  2887. /**
  2888. * Clears the field making it undefined.
  2889. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  2890. */
  2891. proto.google.protobuf.FieldDescriptorProto.prototype.clearName = function() {
  2892. return jspb.Message.setField(this, 1, undefined);
  2893. };
  2894. /**
  2895. * Returns whether this field is set.
  2896. * @return {boolean}
  2897. */
  2898. proto.google.protobuf.FieldDescriptorProto.prototype.hasName = function() {
  2899. return jspb.Message.getField(this, 1) != null;
  2900. };
  2901. /**
  2902. * optional int32 number = 3;
  2903. * @return {number}
  2904. */
  2905. proto.google.protobuf.FieldDescriptorProto.prototype.getNumber = function() {
  2906. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
  2907. };
  2908. /**
  2909. * @param {number} value
  2910. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  2911. */
  2912. proto.google.protobuf.FieldDescriptorProto.prototype.setNumber = function(value) {
  2913. return jspb.Message.setField(this, 3, value);
  2914. };
  2915. /**
  2916. * Clears the field making it undefined.
  2917. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  2918. */
  2919. proto.google.protobuf.FieldDescriptorProto.prototype.clearNumber = function() {
  2920. return jspb.Message.setField(this, 3, undefined);
  2921. };
  2922. /**
  2923. * Returns whether this field is set.
  2924. * @return {boolean}
  2925. */
  2926. proto.google.protobuf.FieldDescriptorProto.prototype.hasNumber = function() {
  2927. return jspb.Message.getField(this, 3) != null;
  2928. };
  2929. /**
  2930. * optional Label label = 4;
  2931. * @return {!proto.google.protobuf.FieldDescriptorProto.Label}
  2932. */
  2933. proto.google.protobuf.FieldDescriptorProto.prototype.getLabel = function() {
  2934. return /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (jspb.Message.getFieldWithDefault(this, 4, 1));
  2935. };
  2936. /**
  2937. * @param {!proto.google.protobuf.FieldDescriptorProto.Label} value
  2938. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  2939. */
  2940. proto.google.protobuf.FieldDescriptorProto.prototype.setLabel = function(value) {
  2941. return jspb.Message.setField(this, 4, value);
  2942. };
  2943. /**
  2944. * Clears the field making it undefined.
  2945. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  2946. */
  2947. proto.google.protobuf.FieldDescriptorProto.prototype.clearLabel = function() {
  2948. return jspb.Message.setField(this, 4, undefined);
  2949. };
  2950. /**
  2951. * Returns whether this field is set.
  2952. * @return {boolean}
  2953. */
  2954. proto.google.protobuf.FieldDescriptorProto.prototype.hasLabel = function() {
  2955. return jspb.Message.getField(this, 4) != null;
  2956. };
  2957. /**
  2958. * optional Type type = 5;
  2959. * @return {!proto.google.protobuf.FieldDescriptorProto.Type}
  2960. */
  2961. proto.google.protobuf.FieldDescriptorProto.prototype.getType = function() {
  2962. return /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getFieldWithDefault(this, 5, 1));
  2963. };
  2964. /**
  2965. * @param {!proto.google.protobuf.FieldDescriptorProto.Type} value
  2966. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  2967. */
  2968. proto.google.protobuf.FieldDescriptorProto.prototype.setType = function(value) {
  2969. return jspb.Message.setField(this, 5, value);
  2970. };
  2971. /**
  2972. * Clears the field making it undefined.
  2973. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  2974. */
  2975. proto.google.protobuf.FieldDescriptorProto.prototype.clearType = function() {
  2976. return jspb.Message.setField(this, 5, undefined);
  2977. };
  2978. /**
  2979. * Returns whether this field is set.
  2980. * @return {boolean}
  2981. */
  2982. proto.google.protobuf.FieldDescriptorProto.prototype.hasType = function() {
  2983. return jspb.Message.getField(this, 5) != null;
  2984. };
  2985. /**
  2986. * optional string type_name = 6;
  2987. * @return {string}
  2988. */
  2989. proto.google.protobuf.FieldDescriptorProto.prototype.getTypeName = function() {
  2990. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
  2991. };
  2992. /**
  2993. * @param {string} value
  2994. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  2995. */
  2996. proto.google.protobuf.FieldDescriptorProto.prototype.setTypeName = function(value) {
  2997. return jspb.Message.setField(this, 6, value);
  2998. };
  2999. /**
  3000. * Clears the field making it undefined.
  3001. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3002. */
  3003. proto.google.protobuf.FieldDescriptorProto.prototype.clearTypeName = function() {
  3004. return jspb.Message.setField(this, 6, undefined);
  3005. };
  3006. /**
  3007. * Returns whether this field is set.
  3008. * @return {boolean}
  3009. */
  3010. proto.google.protobuf.FieldDescriptorProto.prototype.hasTypeName = function() {
  3011. return jspb.Message.getField(this, 6) != null;
  3012. };
  3013. /**
  3014. * optional string extendee = 2;
  3015. * @return {string}
  3016. */
  3017. proto.google.protobuf.FieldDescriptorProto.prototype.getExtendee = function() {
  3018. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  3019. };
  3020. /**
  3021. * @param {string} value
  3022. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3023. */
  3024. proto.google.protobuf.FieldDescriptorProto.prototype.setExtendee = function(value) {
  3025. return jspb.Message.setField(this, 2, value);
  3026. };
  3027. /**
  3028. * Clears the field making it undefined.
  3029. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3030. */
  3031. proto.google.protobuf.FieldDescriptorProto.prototype.clearExtendee = function() {
  3032. return jspb.Message.setField(this, 2, undefined);
  3033. };
  3034. /**
  3035. * Returns whether this field is set.
  3036. * @return {boolean}
  3037. */
  3038. proto.google.protobuf.FieldDescriptorProto.prototype.hasExtendee = function() {
  3039. return jspb.Message.getField(this, 2) != null;
  3040. };
  3041. /**
  3042. * optional string default_value = 7;
  3043. * @return {string}
  3044. */
  3045. proto.google.protobuf.FieldDescriptorProto.prototype.getDefaultValue = function() {
  3046. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
  3047. };
  3048. /**
  3049. * @param {string} value
  3050. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3051. */
  3052. proto.google.protobuf.FieldDescriptorProto.prototype.setDefaultValue = function(value) {
  3053. return jspb.Message.setField(this, 7, value);
  3054. };
  3055. /**
  3056. * Clears the field making it undefined.
  3057. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3058. */
  3059. proto.google.protobuf.FieldDescriptorProto.prototype.clearDefaultValue = function() {
  3060. return jspb.Message.setField(this, 7, undefined);
  3061. };
  3062. /**
  3063. * Returns whether this field is set.
  3064. * @return {boolean}
  3065. */
  3066. proto.google.protobuf.FieldDescriptorProto.prototype.hasDefaultValue = function() {
  3067. return jspb.Message.getField(this, 7) != null;
  3068. };
  3069. /**
  3070. * optional int32 oneof_index = 9;
  3071. * @return {number}
  3072. */
  3073. proto.google.protobuf.FieldDescriptorProto.prototype.getOneofIndex = function() {
  3074. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
  3075. };
  3076. /**
  3077. * @param {number} value
  3078. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3079. */
  3080. proto.google.protobuf.FieldDescriptorProto.prototype.setOneofIndex = function(value) {
  3081. return jspb.Message.setField(this, 9, value);
  3082. };
  3083. /**
  3084. * Clears the field making it undefined.
  3085. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3086. */
  3087. proto.google.protobuf.FieldDescriptorProto.prototype.clearOneofIndex = function() {
  3088. return jspb.Message.setField(this, 9, undefined);
  3089. };
  3090. /**
  3091. * Returns whether this field is set.
  3092. * @return {boolean}
  3093. */
  3094. proto.google.protobuf.FieldDescriptorProto.prototype.hasOneofIndex = function() {
  3095. return jspb.Message.getField(this, 9) != null;
  3096. };
  3097. /**
  3098. * optional string json_name = 10;
  3099. * @return {string}
  3100. */
  3101. proto.google.protobuf.FieldDescriptorProto.prototype.getJsonName = function() {
  3102. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
  3103. };
  3104. /**
  3105. * @param {string} value
  3106. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3107. */
  3108. proto.google.protobuf.FieldDescriptorProto.prototype.setJsonName = function(value) {
  3109. return jspb.Message.setField(this, 10, value);
  3110. };
  3111. /**
  3112. * Clears the field making it undefined.
  3113. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3114. */
  3115. proto.google.protobuf.FieldDescriptorProto.prototype.clearJsonName = function() {
  3116. return jspb.Message.setField(this, 10, undefined);
  3117. };
  3118. /**
  3119. * Returns whether this field is set.
  3120. * @return {boolean}
  3121. */
  3122. proto.google.protobuf.FieldDescriptorProto.prototype.hasJsonName = function() {
  3123. return jspb.Message.getField(this, 10) != null;
  3124. };
  3125. /**
  3126. * optional FieldOptions options = 8;
  3127. * @return {?proto.google.protobuf.FieldOptions}
  3128. */
  3129. proto.google.protobuf.FieldDescriptorProto.prototype.getOptions = function() {
  3130. return /** @type{?proto.google.protobuf.FieldOptions} */ (
  3131. jspb.Message.getWrapperField(this, proto.google.protobuf.FieldOptions, 8));
  3132. };
  3133. /**
  3134. * @param {?proto.google.protobuf.FieldOptions|undefined} value
  3135. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3136. */
  3137. proto.google.protobuf.FieldDescriptorProto.prototype.setOptions = function(value) {
  3138. return jspb.Message.setWrapperField(this, 8, value);
  3139. };
  3140. /**
  3141. * Clears the message field making it undefined.
  3142. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3143. */
  3144. proto.google.protobuf.FieldDescriptorProto.prototype.clearOptions = function() {
  3145. return this.setOptions(undefined);
  3146. };
  3147. /**
  3148. * Returns whether this field is set.
  3149. * @return {boolean}
  3150. */
  3151. proto.google.protobuf.FieldDescriptorProto.prototype.hasOptions = function() {
  3152. return jspb.Message.getField(this, 8) != null;
  3153. };
  3154. /**
  3155. * optional bool proto3_optional = 17;
  3156. * @return {boolean}
  3157. */
  3158. proto.google.protobuf.FieldDescriptorProto.prototype.getProto3Optional = function() {
  3159. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false));
  3160. };
  3161. /**
  3162. * @param {boolean} value
  3163. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3164. */
  3165. proto.google.protobuf.FieldDescriptorProto.prototype.setProto3Optional = function(value) {
  3166. return jspb.Message.setField(this, 17, value);
  3167. };
  3168. /**
  3169. * Clears the field making it undefined.
  3170. * @return {!proto.google.protobuf.FieldDescriptorProto} returns this
  3171. */
  3172. proto.google.protobuf.FieldDescriptorProto.prototype.clearProto3Optional = function() {
  3173. return jspb.Message.setField(this, 17, undefined);
  3174. };
  3175. /**
  3176. * Returns whether this field is set.
  3177. * @return {boolean}
  3178. */
  3179. proto.google.protobuf.FieldDescriptorProto.prototype.hasProto3Optional = function() {
  3180. return jspb.Message.getField(this, 17) != null;
  3181. };
  3182. if (jspb.Message.GENERATE_TO_OBJECT) {
  3183. /**
  3184. * Creates an object representation of this proto.
  3185. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  3186. * Optional fields that are not set will be set to undefined.
  3187. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  3188. * For the list of reserved names please see:
  3189. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  3190. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  3191. * JSPB instance for transitional soy proto support:
  3192. * http://goto/soy-param-migration
  3193. * @return {!Object}
  3194. */
  3195. proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_includeInstance) {
  3196. return proto.google.protobuf.OneofDescriptorProto.toObject(opt_includeInstance, this);
  3197. };
  3198. /**
  3199. * Static version of the {@see toObject} method.
  3200. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  3201. * the JSPB instance for transitional soy proto support:
  3202. * http://goto/soy-param-migration
  3203. * @param {!proto.google.protobuf.OneofDescriptorProto} msg The msg instance to transform.
  3204. * @return {!Object}
  3205. * @suppress {unusedLocalVariables} f is only used for nested messages
  3206. */
  3207. proto.google.protobuf.OneofDescriptorProto.toObject = function(includeInstance, msg) {
  3208. var f, obj = {
  3209. name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  3210. options: (f = msg.getOptions()) && proto.google.protobuf.OneofOptions.toObject(includeInstance, f)
  3211. };
  3212. if (includeInstance) {
  3213. obj.$jspbMessageInstance = msg;
  3214. }
  3215. return obj;
  3216. };
  3217. }
  3218. /**
  3219. * Deserializes binary data (in protobuf wire format).
  3220. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  3221. * @return {!proto.google.protobuf.OneofDescriptorProto}
  3222. */
  3223. proto.google.protobuf.OneofDescriptorProto.deserializeBinary = function(bytes) {
  3224. var reader = new jspb.BinaryReader(bytes);
  3225. var msg = new proto.google.protobuf.OneofDescriptorProto;
  3226. return proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader(msg, reader);
  3227. };
  3228. /**
  3229. * Deserializes binary data (in protobuf wire format) from the
  3230. * given reader into the given message object.
  3231. * @param {!proto.google.protobuf.OneofDescriptorProto} msg The message object to deserialize into.
  3232. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  3233. * @return {!proto.google.protobuf.OneofDescriptorProto}
  3234. */
  3235. proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader = function(msg, reader) {
  3236. while (reader.nextField()) {
  3237. if (reader.isEndGroup()) {
  3238. break;
  3239. }
  3240. var field = reader.getFieldNumber();
  3241. switch (field) {
  3242. case 1:
  3243. var value = /** @type {string} */ (reader.readString());
  3244. msg.setName(value);
  3245. break;
  3246. case 2:
  3247. var value = new proto.google.protobuf.OneofOptions;
  3248. reader.readMessage(value,proto.google.protobuf.OneofOptions.deserializeBinaryFromReader);
  3249. msg.setOptions(value);
  3250. break;
  3251. default:
  3252. reader.skipField();
  3253. break;
  3254. }
  3255. }
  3256. return msg;
  3257. };
  3258. /**
  3259. * Serializes the message to binary data (in protobuf wire format).
  3260. * @return {!Uint8Array}
  3261. */
  3262. proto.google.protobuf.OneofDescriptorProto.prototype.serializeBinary = function() {
  3263. var writer = new jspb.BinaryWriter();
  3264. proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter(this, writer);
  3265. return writer.getResultBuffer();
  3266. };
  3267. /**
  3268. * Serializes the given message to binary data (in protobuf wire
  3269. * format), writing to the given BinaryWriter.
  3270. * @param {!proto.google.protobuf.OneofDescriptorProto} message
  3271. * @param {!jspb.BinaryWriter} writer
  3272. * @suppress {unusedLocalVariables} f is only used for nested messages
  3273. */
  3274. proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter = function(message, writer) {
  3275. var f = undefined;
  3276. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  3277. if (f != null) {
  3278. writer.writeString(
  3279. 1,
  3280. f
  3281. );
  3282. }
  3283. f = message.getOptions();
  3284. if (f != null) {
  3285. writer.writeMessage(
  3286. 2,
  3287. f,
  3288. proto.google.protobuf.OneofOptions.serializeBinaryToWriter
  3289. );
  3290. }
  3291. };
  3292. /**
  3293. * optional string name = 1;
  3294. * @return {string}
  3295. */
  3296. proto.google.protobuf.OneofDescriptorProto.prototype.getName = function() {
  3297. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  3298. };
  3299. /**
  3300. * @param {string} value
  3301. * @return {!proto.google.protobuf.OneofDescriptorProto} returns this
  3302. */
  3303. proto.google.protobuf.OneofDescriptorProto.prototype.setName = function(value) {
  3304. return jspb.Message.setField(this, 1, value);
  3305. };
  3306. /**
  3307. * Clears the field making it undefined.
  3308. * @return {!proto.google.protobuf.OneofDescriptorProto} returns this
  3309. */
  3310. proto.google.protobuf.OneofDescriptorProto.prototype.clearName = function() {
  3311. return jspb.Message.setField(this, 1, undefined);
  3312. };
  3313. /**
  3314. * Returns whether this field is set.
  3315. * @return {boolean}
  3316. */
  3317. proto.google.protobuf.OneofDescriptorProto.prototype.hasName = function() {
  3318. return jspb.Message.getField(this, 1) != null;
  3319. };
  3320. /**
  3321. * optional OneofOptions options = 2;
  3322. * @return {?proto.google.protobuf.OneofOptions}
  3323. */
  3324. proto.google.protobuf.OneofDescriptorProto.prototype.getOptions = function() {
  3325. return /** @type{?proto.google.protobuf.OneofOptions} */ (
  3326. jspb.Message.getWrapperField(this, proto.google.protobuf.OneofOptions, 2));
  3327. };
  3328. /**
  3329. * @param {?proto.google.protobuf.OneofOptions|undefined} value
  3330. * @return {!proto.google.protobuf.OneofDescriptorProto} returns this
  3331. */
  3332. proto.google.protobuf.OneofDescriptorProto.prototype.setOptions = function(value) {
  3333. return jspb.Message.setWrapperField(this, 2, value);
  3334. };
  3335. /**
  3336. * Clears the message field making it undefined.
  3337. * @return {!proto.google.protobuf.OneofDescriptorProto} returns this
  3338. */
  3339. proto.google.protobuf.OneofDescriptorProto.prototype.clearOptions = function() {
  3340. return this.setOptions(undefined);
  3341. };
  3342. /**
  3343. * Returns whether this field is set.
  3344. * @return {boolean}
  3345. */
  3346. proto.google.protobuf.OneofDescriptorProto.prototype.hasOptions = function() {
  3347. return jspb.Message.getField(this, 2) != null;
  3348. };
  3349. /**
  3350. * List of repeated fields within this message type.
  3351. * @private {!Array<number>}
  3352. * @const
  3353. */
  3354. proto.google.protobuf.EnumDescriptorProto.repeatedFields_ = [2,4,5];
  3355. if (jspb.Message.GENERATE_TO_OBJECT) {
  3356. /**
  3357. * Creates an object representation of this proto.
  3358. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  3359. * Optional fields that are not set will be set to undefined.
  3360. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  3361. * For the list of reserved names please see:
  3362. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  3363. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  3364. * JSPB instance for transitional soy proto support:
  3365. * http://goto/soy-param-migration
  3366. * @return {!Object}
  3367. */
  3368. proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_includeInstance) {
  3369. return proto.google.protobuf.EnumDescriptorProto.toObject(opt_includeInstance, this);
  3370. };
  3371. /**
  3372. * Static version of the {@see toObject} method.
  3373. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  3374. * the JSPB instance for transitional soy proto support:
  3375. * http://goto/soy-param-migration
  3376. * @param {!proto.google.protobuf.EnumDescriptorProto} msg The msg instance to transform.
  3377. * @return {!Object}
  3378. * @suppress {unusedLocalVariables} f is only used for nested messages
  3379. */
  3380. proto.google.protobuf.EnumDescriptorProto.toObject = function(includeInstance, msg) {
  3381. var f, obj = {
  3382. name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  3383. valueList: jspb.Message.toObjectList(msg.getValueList(),
  3384. proto.google.protobuf.EnumValueDescriptorProto.toObject, includeInstance),
  3385. options: (f = msg.getOptions()) && proto.google.protobuf.EnumOptions.toObject(includeInstance, f),
  3386. reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(),
  3387. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject, includeInstance),
  3388. reservedNameList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f
  3389. };
  3390. if (includeInstance) {
  3391. obj.$jspbMessageInstance = msg;
  3392. }
  3393. return obj;
  3394. };
  3395. }
  3396. /**
  3397. * Deserializes binary data (in protobuf wire format).
  3398. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  3399. * @return {!proto.google.protobuf.EnumDescriptorProto}
  3400. */
  3401. proto.google.protobuf.EnumDescriptorProto.deserializeBinary = function(bytes) {
  3402. var reader = new jspb.BinaryReader(bytes);
  3403. var msg = new proto.google.protobuf.EnumDescriptorProto;
  3404. return proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader(msg, reader);
  3405. };
  3406. /**
  3407. * Deserializes binary data (in protobuf wire format) from the
  3408. * given reader into the given message object.
  3409. * @param {!proto.google.protobuf.EnumDescriptorProto} msg The message object to deserialize into.
  3410. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  3411. * @return {!proto.google.protobuf.EnumDescriptorProto}
  3412. */
  3413. proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader = function(msg, reader) {
  3414. while (reader.nextField()) {
  3415. if (reader.isEndGroup()) {
  3416. break;
  3417. }
  3418. var field = reader.getFieldNumber();
  3419. switch (field) {
  3420. case 1:
  3421. var value = /** @type {string} */ (reader.readString());
  3422. msg.setName(value);
  3423. break;
  3424. case 2:
  3425. var value = new proto.google.protobuf.EnumValueDescriptorProto;
  3426. reader.readMessage(value,proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader);
  3427. msg.addValue(value);
  3428. break;
  3429. case 3:
  3430. var value = new proto.google.protobuf.EnumOptions;
  3431. reader.readMessage(value,proto.google.protobuf.EnumOptions.deserializeBinaryFromReader);
  3432. msg.setOptions(value);
  3433. break;
  3434. case 4:
  3435. var value = new proto.google.protobuf.EnumDescriptorProto.EnumReservedRange;
  3436. reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader);
  3437. msg.addReservedRange(value);
  3438. break;
  3439. case 5:
  3440. var value = /** @type {string} */ (reader.readString());
  3441. msg.addReservedName(value);
  3442. break;
  3443. default:
  3444. reader.skipField();
  3445. break;
  3446. }
  3447. }
  3448. return msg;
  3449. };
  3450. /**
  3451. * Serializes the message to binary data (in protobuf wire format).
  3452. * @return {!Uint8Array}
  3453. */
  3454. proto.google.protobuf.EnumDescriptorProto.prototype.serializeBinary = function() {
  3455. var writer = new jspb.BinaryWriter();
  3456. proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter(this, writer);
  3457. return writer.getResultBuffer();
  3458. };
  3459. /**
  3460. * Serializes the given message to binary data (in protobuf wire
  3461. * format), writing to the given BinaryWriter.
  3462. * @param {!proto.google.protobuf.EnumDescriptorProto} message
  3463. * @param {!jspb.BinaryWriter} writer
  3464. * @suppress {unusedLocalVariables} f is only used for nested messages
  3465. */
  3466. proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter = function(message, writer) {
  3467. var f = undefined;
  3468. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  3469. if (f != null) {
  3470. writer.writeString(
  3471. 1,
  3472. f
  3473. );
  3474. }
  3475. f = message.getValueList();
  3476. if (f.length > 0) {
  3477. writer.writeRepeatedMessage(
  3478. 2,
  3479. f,
  3480. proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter
  3481. );
  3482. }
  3483. f = message.getOptions();
  3484. if (f != null) {
  3485. writer.writeMessage(
  3486. 3,
  3487. f,
  3488. proto.google.protobuf.EnumOptions.serializeBinaryToWriter
  3489. );
  3490. }
  3491. f = message.getReservedRangeList();
  3492. if (f.length > 0) {
  3493. writer.writeRepeatedMessage(
  3494. 4,
  3495. f,
  3496. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter
  3497. );
  3498. }
  3499. f = message.getReservedNameList();
  3500. if (f.length > 0) {
  3501. writer.writeRepeatedString(
  3502. 5,
  3503. f
  3504. );
  3505. }
  3506. };
  3507. if (jspb.Message.GENERATE_TO_OBJECT) {
  3508. /**
  3509. * Creates an object representation of this proto.
  3510. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  3511. * Optional fields that are not set will be set to undefined.
  3512. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  3513. * For the list of reserved names please see:
  3514. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  3515. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  3516. * JSPB instance for transitional soy proto support:
  3517. * http://goto/soy-param-migration
  3518. * @return {!Object}
  3519. */
  3520. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = function(opt_includeInstance) {
  3521. return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(opt_includeInstance, this);
  3522. };
  3523. /**
  3524. * Static version of the {@see toObject} method.
  3525. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  3526. * the JSPB instance for transitional soy proto support:
  3527. * http://goto/soy-param-migration
  3528. * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The msg instance to transform.
  3529. * @return {!Object}
  3530. * @suppress {unusedLocalVariables} f is only used for nested messages
  3531. */
  3532. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject = function(includeInstance, msg) {
  3533. var f, obj = {
  3534. start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  3535. end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f
  3536. };
  3537. if (includeInstance) {
  3538. obj.$jspbMessageInstance = msg;
  3539. }
  3540. return obj;
  3541. };
  3542. }
  3543. /**
  3544. * Deserializes binary data (in protobuf wire format).
  3545. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  3546. * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange}
  3547. */
  3548. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinary = function(bytes) {
  3549. var reader = new jspb.BinaryReader(bytes);
  3550. var msg = new proto.google.protobuf.EnumDescriptorProto.EnumReservedRange;
  3551. return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader(msg, reader);
  3552. };
  3553. /**
  3554. * Deserializes binary data (in protobuf wire format) from the
  3555. * given reader into the given message object.
  3556. * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The message object to deserialize into.
  3557. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  3558. * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange}
  3559. */
  3560. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader = function(msg, reader) {
  3561. while (reader.nextField()) {
  3562. if (reader.isEndGroup()) {
  3563. break;
  3564. }
  3565. var field = reader.getFieldNumber();
  3566. switch (field) {
  3567. case 1:
  3568. var value = /** @type {number} */ (reader.readInt32());
  3569. msg.setStart(value);
  3570. break;
  3571. case 2:
  3572. var value = /** @type {number} */ (reader.readInt32());
  3573. msg.setEnd(value);
  3574. break;
  3575. default:
  3576. reader.skipField();
  3577. break;
  3578. }
  3579. }
  3580. return msg;
  3581. };
  3582. /**
  3583. * Serializes the message to binary data (in protobuf wire format).
  3584. * @return {!Uint8Array}
  3585. */
  3586. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.serializeBinary = function() {
  3587. var writer = new jspb.BinaryWriter();
  3588. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter(this, writer);
  3589. return writer.getResultBuffer();
  3590. };
  3591. /**
  3592. * Serializes the given message to binary data (in protobuf wire
  3593. * format), writing to the given BinaryWriter.
  3594. * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} message
  3595. * @param {!jspb.BinaryWriter} writer
  3596. * @suppress {unusedLocalVariables} f is only used for nested messages
  3597. */
  3598. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter = function(message, writer) {
  3599. var f = undefined;
  3600. f = /** @type {number} */ (jspb.Message.getField(message, 1));
  3601. if (f != null) {
  3602. writer.writeInt32(
  3603. 1,
  3604. f
  3605. );
  3606. }
  3607. f = /** @type {number} */ (jspb.Message.getField(message, 2));
  3608. if (f != null) {
  3609. writer.writeInt32(
  3610. 2,
  3611. f
  3612. );
  3613. }
  3614. };
  3615. /**
  3616. * optional int32 start = 1;
  3617. * @return {number}
  3618. */
  3619. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getStart = function() {
  3620. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  3621. };
  3622. /**
  3623. * @param {number} value
  3624. * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this
  3625. */
  3626. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setStart = function(value) {
  3627. return jspb.Message.setField(this, 1, value);
  3628. };
  3629. /**
  3630. * Clears the field making it undefined.
  3631. * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this
  3632. */
  3633. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearStart = function() {
  3634. return jspb.Message.setField(this, 1, undefined);
  3635. };
  3636. /**
  3637. * Returns whether this field is set.
  3638. * @return {boolean}
  3639. */
  3640. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.hasStart = function() {
  3641. return jspb.Message.getField(this, 1) != null;
  3642. };
  3643. /**
  3644. * optional int32 end = 2;
  3645. * @return {number}
  3646. */
  3647. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getEnd = function() {
  3648. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
  3649. };
  3650. /**
  3651. * @param {number} value
  3652. * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this
  3653. */
  3654. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setEnd = function(value) {
  3655. return jspb.Message.setField(this, 2, value);
  3656. };
  3657. /**
  3658. * Clears the field making it undefined.
  3659. * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this
  3660. */
  3661. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearEnd = function() {
  3662. return jspb.Message.setField(this, 2, undefined);
  3663. };
  3664. /**
  3665. * Returns whether this field is set.
  3666. * @return {boolean}
  3667. */
  3668. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.hasEnd = function() {
  3669. return jspb.Message.getField(this, 2) != null;
  3670. };
  3671. /**
  3672. * optional string name = 1;
  3673. * @return {string}
  3674. */
  3675. proto.google.protobuf.EnumDescriptorProto.prototype.getName = function() {
  3676. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  3677. };
  3678. /**
  3679. * @param {string} value
  3680. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3681. */
  3682. proto.google.protobuf.EnumDescriptorProto.prototype.setName = function(value) {
  3683. return jspb.Message.setField(this, 1, value);
  3684. };
  3685. /**
  3686. * Clears the field making it undefined.
  3687. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3688. */
  3689. proto.google.protobuf.EnumDescriptorProto.prototype.clearName = function() {
  3690. return jspb.Message.setField(this, 1, undefined);
  3691. };
  3692. /**
  3693. * Returns whether this field is set.
  3694. * @return {boolean}
  3695. */
  3696. proto.google.protobuf.EnumDescriptorProto.prototype.hasName = function() {
  3697. return jspb.Message.getField(this, 1) != null;
  3698. };
  3699. /**
  3700. * repeated EnumValueDescriptorProto value = 2;
  3701. * @return {!Array<!proto.google.protobuf.EnumValueDescriptorProto>}
  3702. */
  3703. proto.google.protobuf.EnumDescriptorProto.prototype.getValueList = function() {
  3704. return /** @type{!Array<!proto.google.protobuf.EnumValueDescriptorProto>} */ (
  3705. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumValueDescriptorProto, 2));
  3706. };
  3707. /**
  3708. * @param {!Array<!proto.google.protobuf.EnumValueDescriptorProto>} value
  3709. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3710. */
  3711. proto.google.protobuf.EnumDescriptorProto.prototype.setValueList = function(value) {
  3712. return jspb.Message.setRepeatedWrapperField(this, 2, value);
  3713. };
  3714. /**
  3715. * @param {!proto.google.protobuf.EnumValueDescriptorProto=} opt_value
  3716. * @param {number=} opt_index
  3717. * @return {!proto.google.protobuf.EnumValueDescriptorProto}
  3718. */
  3719. proto.google.protobuf.EnumDescriptorProto.prototype.addValue = function(opt_value, opt_index) {
  3720. return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.EnumValueDescriptorProto, opt_index);
  3721. };
  3722. /**
  3723. * Clears the list making it empty but non-null.
  3724. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3725. */
  3726. proto.google.protobuf.EnumDescriptorProto.prototype.clearValueList = function() {
  3727. return this.setValueList([]);
  3728. };
  3729. /**
  3730. * optional EnumOptions options = 3;
  3731. * @return {?proto.google.protobuf.EnumOptions}
  3732. */
  3733. proto.google.protobuf.EnumDescriptorProto.prototype.getOptions = function() {
  3734. return /** @type{?proto.google.protobuf.EnumOptions} */ (
  3735. jspb.Message.getWrapperField(this, proto.google.protobuf.EnumOptions, 3));
  3736. };
  3737. /**
  3738. * @param {?proto.google.protobuf.EnumOptions|undefined} value
  3739. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3740. */
  3741. proto.google.protobuf.EnumDescriptorProto.prototype.setOptions = function(value) {
  3742. return jspb.Message.setWrapperField(this, 3, value);
  3743. };
  3744. /**
  3745. * Clears the message field making it undefined.
  3746. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3747. */
  3748. proto.google.protobuf.EnumDescriptorProto.prototype.clearOptions = function() {
  3749. return this.setOptions(undefined);
  3750. };
  3751. /**
  3752. * Returns whether this field is set.
  3753. * @return {boolean}
  3754. */
  3755. proto.google.protobuf.EnumDescriptorProto.prototype.hasOptions = function() {
  3756. return jspb.Message.getField(this, 3) != null;
  3757. };
  3758. /**
  3759. * repeated EnumReservedRange reserved_range = 4;
  3760. * @return {!Array<!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange>}
  3761. */
  3762. proto.google.protobuf.EnumDescriptorProto.prototype.getReservedRangeList = function() {
  3763. return /** @type{!Array<!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange>} */ (
  3764. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, 4));
  3765. };
  3766. /**
  3767. * @param {!Array<!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange>} value
  3768. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3769. */
  3770. proto.google.protobuf.EnumDescriptorProto.prototype.setReservedRangeList = function(value) {
  3771. return jspb.Message.setRepeatedWrapperField(this, 4, value);
  3772. };
  3773. /**
  3774. * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange=} opt_value
  3775. * @param {number=} opt_index
  3776. * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange}
  3777. */
  3778. proto.google.protobuf.EnumDescriptorProto.prototype.addReservedRange = function(opt_value, opt_index) {
  3779. return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, opt_index);
  3780. };
  3781. /**
  3782. * Clears the list making it empty but non-null.
  3783. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3784. */
  3785. proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedRangeList = function() {
  3786. return this.setReservedRangeList([]);
  3787. };
  3788. /**
  3789. * repeated string reserved_name = 5;
  3790. * @return {!Array<string>}
  3791. */
  3792. proto.google.protobuf.EnumDescriptorProto.prototype.getReservedNameList = function() {
  3793. return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));
  3794. };
  3795. /**
  3796. * @param {!Array<string>} value
  3797. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3798. */
  3799. proto.google.protobuf.EnumDescriptorProto.prototype.setReservedNameList = function(value) {
  3800. return jspb.Message.setField(this, 5, value || []);
  3801. };
  3802. /**
  3803. * @param {string} value
  3804. * @param {number=} opt_index
  3805. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3806. */
  3807. proto.google.protobuf.EnumDescriptorProto.prototype.addReservedName = function(value, opt_index) {
  3808. return jspb.Message.addToRepeatedField(this, 5, value, opt_index);
  3809. };
  3810. /**
  3811. * Clears the list making it empty but non-null.
  3812. * @return {!proto.google.protobuf.EnumDescriptorProto} returns this
  3813. */
  3814. proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList = function() {
  3815. return this.setReservedNameList([]);
  3816. };
  3817. if (jspb.Message.GENERATE_TO_OBJECT) {
  3818. /**
  3819. * Creates an object representation of this proto.
  3820. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  3821. * Optional fields that are not set will be set to undefined.
  3822. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  3823. * For the list of reserved names please see:
  3824. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  3825. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  3826. * JSPB instance for transitional soy proto support:
  3827. * http://goto/soy-param-migration
  3828. * @return {!Object}
  3829. */
  3830. proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt_includeInstance) {
  3831. return proto.google.protobuf.EnumValueDescriptorProto.toObject(opt_includeInstance, this);
  3832. };
  3833. /**
  3834. * Static version of the {@see toObject} method.
  3835. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  3836. * the JSPB instance for transitional soy proto support:
  3837. * http://goto/soy-param-migration
  3838. * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The msg instance to transform.
  3839. * @return {!Object}
  3840. * @suppress {unusedLocalVariables} f is only used for nested messages
  3841. */
  3842. proto.google.protobuf.EnumValueDescriptorProto.toObject = function(includeInstance, msg) {
  3843. var f, obj = {
  3844. name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  3845. number: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
  3846. options: (f = msg.getOptions()) && proto.google.protobuf.EnumValueOptions.toObject(includeInstance, f)
  3847. };
  3848. if (includeInstance) {
  3849. obj.$jspbMessageInstance = msg;
  3850. }
  3851. return obj;
  3852. };
  3853. }
  3854. /**
  3855. * Deserializes binary data (in protobuf wire format).
  3856. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  3857. * @return {!proto.google.protobuf.EnumValueDescriptorProto}
  3858. */
  3859. proto.google.protobuf.EnumValueDescriptorProto.deserializeBinary = function(bytes) {
  3860. var reader = new jspb.BinaryReader(bytes);
  3861. var msg = new proto.google.protobuf.EnumValueDescriptorProto;
  3862. return proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader(msg, reader);
  3863. };
  3864. /**
  3865. * Deserializes binary data (in protobuf wire format) from the
  3866. * given reader into the given message object.
  3867. * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The message object to deserialize into.
  3868. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  3869. * @return {!proto.google.protobuf.EnumValueDescriptorProto}
  3870. */
  3871. proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader = function(msg, reader) {
  3872. while (reader.nextField()) {
  3873. if (reader.isEndGroup()) {
  3874. break;
  3875. }
  3876. var field = reader.getFieldNumber();
  3877. switch (field) {
  3878. case 1:
  3879. var value = /** @type {string} */ (reader.readString());
  3880. msg.setName(value);
  3881. break;
  3882. case 2:
  3883. var value = /** @type {number} */ (reader.readInt32());
  3884. msg.setNumber(value);
  3885. break;
  3886. case 3:
  3887. var value = new proto.google.protobuf.EnumValueOptions;
  3888. reader.readMessage(value,proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader);
  3889. msg.setOptions(value);
  3890. break;
  3891. default:
  3892. reader.skipField();
  3893. break;
  3894. }
  3895. }
  3896. return msg;
  3897. };
  3898. /**
  3899. * Serializes the message to binary data (in protobuf wire format).
  3900. * @return {!Uint8Array}
  3901. */
  3902. proto.google.protobuf.EnumValueDescriptorProto.prototype.serializeBinary = function() {
  3903. var writer = new jspb.BinaryWriter();
  3904. proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter(this, writer);
  3905. return writer.getResultBuffer();
  3906. };
  3907. /**
  3908. * Serializes the given message to binary data (in protobuf wire
  3909. * format), writing to the given BinaryWriter.
  3910. * @param {!proto.google.protobuf.EnumValueDescriptorProto} message
  3911. * @param {!jspb.BinaryWriter} writer
  3912. * @suppress {unusedLocalVariables} f is only used for nested messages
  3913. */
  3914. proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter = function(message, writer) {
  3915. var f = undefined;
  3916. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  3917. if (f != null) {
  3918. writer.writeString(
  3919. 1,
  3920. f
  3921. );
  3922. }
  3923. f = /** @type {number} */ (jspb.Message.getField(message, 2));
  3924. if (f != null) {
  3925. writer.writeInt32(
  3926. 2,
  3927. f
  3928. );
  3929. }
  3930. f = message.getOptions();
  3931. if (f != null) {
  3932. writer.writeMessage(
  3933. 3,
  3934. f,
  3935. proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter
  3936. );
  3937. }
  3938. };
  3939. /**
  3940. * optional string name = 1;
  3941. * @return {string}
  3942. */
  3943. proto.google.protobuf.EnumValueDescriptorProto.prototype.getName = function() {
  3944. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  3945. };
  3946. /**
  3947. * @param {string} value
  3948. * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this
  3949. */
  3950. proto.google.protobuf.EnumValueDescriptorProto.prototype.setName = function(value) {
  3951. return jspb.Message.setField(this, 1, value);
  3952. };
  3953. /**
  3954. * Clears the field making it undefined.
  3955. * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this
  3956. */
  3957. proto.google.protobuf.EnumValueDescriptorProto.prototype.clearName = function() {
  3958. return jspb.Message.setField(this, 1, undefined);
  3959. };
  3960. /**
  3961. * Returns whether this field is set.
  3962. * @return {boolean}
  3963. */
  3964. proto.google.protobuf.EnumValueDescriptorProto.prototype.hasName = function() {
  3965. return jspb.Message.getField(this, 1) != null;
  3966. };
  3967. /**
  3968. * optional int32 number = 2;
  3969. * @return {number}
  3970. */
  3971. proto.google.protobuf.EnumValueDescriptorProto.prototype.getNumber = function() {
  3972. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
  3973. };
  3974. /**
  3975. * @param {number} value
  3976. * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this
  3977. */
  3978. proto.google.protobuf.EnumValueDescriptorProto.prototype.setNumber = function(value) {
  3979. return jspb.Message.setField(this, 2, value);
  3980. };
  3981. /**
  3982. * Clears the field making it undefined.
  3983. * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this
  3984. */
  3985. proto.google.protobuf.EnumValueDescriptorProto.prototype.clearNumber = function() {
  3986. return jspb.Message.setField(this, 2, undefined);
  3987. };
  3988. /**
  3989. * Returns whether this field is set.
  3990. * @return {boolean}
  3991. */
  3992. proto.google.protobuf.EnumValueDescriptorProto.prototype.hasNumber = function() {
  3993. return jspb.Message.getField(this, 2) != null;
  3994. };
  3995. /**
  3996. * optional EnumValueOptions options = 3;
  3997. * @return {?proto.google.protobuf.EnumValueOptions}
  3998. */
  3999. proto.google.protobuf.EnumValueDescriptorProto.prototype.getOptions = function() {
  4000. return /** @type{?proto.google.protobuf.EnumValueOptions} */ (
  4001. jspb.Message.getWrapperField(this, proto.google.protobuf.EnumValueOptions, 3));
  4002. };
  4003. /**
  4004. * @param {?proto.google.protobuf.EnumValueOptions|undefined} value
  4005. * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this
  4006. */
  4007. proto.google.protobuf.EnumValueDescriptorProto.prototype.setOptions = function(value) {
  4008. return jspb.Message.setWrapperField(this, 3, value);
  4009. };
  4010. /**
  4011. * Clears the message field making it undefined.
  4012. * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this
  4013. */
  4014. proto.google.protobuf.EnumValueDescriptorProto.prototype.clearOptions = function() {
  4015. return this.setOptions(undefined);
  4016. };
  4017. /**
  4018. * Returns whether this field is set.
  4019. * @return {boolean}
  4020. */
  4021. proto.google.protobuf.EnumValueDescriptorProto.prototype.hasOptions = function() {
  4022. return jspb.Message.getField(this, 3) != null;
  4023. };
  4024. /**
  4025. * List of repeated fields within this message type.
  4026. * @private {!Array<number>}
  4027. * @const
  4028. */
  4029. proto.google.protobuf.ServiceDescriptorProto.repeatedFields_ = [2];
  4030. if (jspb.Message.GENERATE_TO_OBJECT) {
  4031. /**
  4032. * Creates an object representation of this proto.
  4033. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  4034. * Optional fields that are not set will be set to undefined.
  4035. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  4036. * For the list of reserved names please see:
  4037. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  4038. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  4039. * JSPB instance for transitional soy proto support:
  4040. * http://goto/soy-param-migration
  4041. * @return {!Object}
  4042. */
  4043. proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_includeInstance) {
  4044. return proto.google.protobuf.ServiceDescriptorProto.toObject(opt_includeInstance, this);
  4045. };
  4046. /**
  4047. * Static version of the {@see toObject} method.
  4048. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  4049. * the JSPB instance for transitional soy proto support:
  4050. * http://goto/soy-param-migration
  4051. * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The msg instance to transform.
  4052. * @return {!Object}
  4053. * @suppress {unusedLocalVariables} f is only used for nested messages
  4054. */
  4055. proto.google.protobuf.ServiceDescriptorProto.toObject = function(includeInstance, msg) {
  4056. var f, obj = {
  4057. name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  4058. methodList: jspb.Message.toObjectList(msg.getMethodList(),
  4059. proto.google.protobuf.MethodDescriptorProto.toObject, includeInstance),
  4060. options: (f = msg.getOptions()) && proto.google.protobuf.ServiceOptions.toObject(includeInstance, f)
  4061. };
  4062. if (includeInstance) {
  4063. obj.$jspbMessageInstance = msg;
  4064. }
  4065. return obj;
  4066. };
  4067. }
  4068. /**
  4069. * Deserializes binary data (in protobuf wire format).
  4070. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  4071. * @return {!proto.google.protobuf.ServiceDescriptorProto}
  4072. */
  4073. proto.google.protobuf.ServiceDescriptorProto.deserializeBinary = function(bytes) {
  4074. var reader = new jspb.BinaryReader(bytes);
  4075. var msg = new proto.google.protobuf.ServiceDescriptorProto;
  4076. return proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader(msg, reader);
  4077. };
  4078. /**
  4079. * Deserializes binary data (in protobuf wire format) from the
  4080. * given reader into the given message object.
  4081. * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The message object to deserialize into.
  4082. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  4083. * @return {!proto.google.protobuf.ServiceDescriptorProto}
  4084. */
  4085. proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader = function(msg, reader) {
  4086. while (reader.nextField()) {
  4087. if (reader.isEndGroup()) {
  4088. break;
  4089. }
  4090. var field = reader.getFieldNumber();
  4091. switch (field) {
  4092. case 1:
  4093. var value = /** @type {string} */ (reader.readString());
  4094. msg.setName(value);
  4095. break;
  4096. case 2:
  4097. var value = new proto.google.protobuf.MethodDescriptorProto;
  4098. reader.readMessage(value,proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader);
  4099. msg.addMethod(value);
  4100. break;
  4101. case 3:
  4102. var value = new proto.google.protobuf.ServiceOptions;
  4103. reader.readMessage(value,proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader);
  4104. msg.setOptions(value);
  4105. break;
  4106. default:
  4107. reader.skipField();
  4108. break;
  4109. }
  4110. }
  4111. return msg;
  4112. };
  4113. /**
  4114. * Serializes the message to binary data (in protobuf wire format).
  4115. * @return {!Uint8Array}
  4116. */
  4117. proto.google.protobuf.ServiceDescriptorProto.prototype.serializeBinary = function() {
  4118. var writer = new jspb.BinaryWriter();
  4119. proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter(this, writer);
  4120. return writer.getResultBuffer();
  4121. };
  4122. /**
  4123. * Serializes the given message to binary data (in protobuf wire
  4124. * format), writing to the given BinaryWriter.
  4125. * @param {!proto.google.protobuf.ServiceDescriptorProto} message
  4126. * @param {!jspb.BinaryWriter} writer
  4127. * @suppress {unusedLocalVariables} f is only used for nested messages
  4128. */
  4129. proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter = function(message, writer) {
  4130. var f = undefined;
  4131. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  4132. if (f != null) {
  4133. writer.writeString(
  4134. 1,
  4135. f
  4136. );
  4137. }
  4138. f = message.getMethodList();
  4139. if (f.length > 0) {
  4140. writer.writeRepeatedMessage(
  4141. 2,
  4142. f,
  4143. proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter
  4144. );
  4145. }
  4146. f = message.getOptions();
  4147. if (f != null) {
  4148. writer.writeMessage(
  4149. 3,
  4150. f,
  4151. proto.google.protobuf.ServiceOptions.serializeBinaryToWriter
  4152. );
  4153. }
  4154. };
  4155. /**
  4156. * optional string name = 1;
  4157. * @return {string}
  4158. */
  4159. proto.google.protobuf.ServiceDescriptorProto.prototype.getName = function() {
  4160. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  4161. };
  4162. /**
  4163. * @param {string} value
  4164. * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this
  4165. */
  4166. proto.google.protobuf.ServiceDescriptorProto.prototype.setName = function(value) {
  4167. return jspb.Message.setField(this, 1, value);
  4168. };
  4169. /**
  4170. * Clears the field making it undefined.
  4171. * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this
  4172. */
  4173. proto.google.protobuf.ServiceDescriptorProto.prototype.clearName = function() {
  4174. return jspb.Message.setField(this, 1, undefined);
  4175. };
  4176. /**
  4177. * Returns whether this field is set.
  4178. * @return {boolean}
  4179. */
  4180. proto.google.protobuf.ServiceDescriptorProto.prototype.hasName = function() {
  4181. return jspb.Message.getField(this, 1) != null;
  4182. };
  4183. /**
  4184. * repeated MethodDescriptorProto method = 2;
  4185. * @return {!Array<!proto.google.protobuf.MethodDescriptorProto>}
  4186. */
  4187. proto.google.protobuf.ServiceDescriptorProto.prototype.getMethodList = function() {
  4188. return /** @type{!Array<!proto.google.protobuf.MethodDescriptorProto>} */ (
  4189. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.MethodDescriptorProto, 2));
  4190. };
  4191. /**
  4192. * @param {!Array<!proto.google.protobuf.MethodDescriptorProto>} value
  4193. * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this
  4194. */
  4195. proto.google.protobuf.ServiceDescriptorProto.prototype.setMethodList = function(value) {
  4196. return jspb.Message.setRepeatedWrapperField(this, 2, value);
  4197. };
  4198. /**
  4199. * @param {!proto.google.protobuf.MethodDescriptorProto=} opt_value
  4200. * @param {number=} opt_index
  4201. * @return {!proto.google.protobuf.MethodDescriptorProto}
  4202. */
  4203. proto.google.protobuf.ServiceDescriptorProto.prototype.addMethod = function(opt_value, opt_index) {
  4204. return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.MethodDescriptorProto, opt_index);
  4205. };
  4206. /**
  4207. * Clears the list making it empty but non-null.
  4208. * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this
  4209. */
  4210. proto.google.protobuf.ServiceDescriptorProto.prototype.clearMethodList = function() {
  4211. return this.setMethodList([]);
  4212. };
  4213. /**
  4214. * optional ServiceOptions options = 3;
  4215. * @return {?proto.google.protobuf.ServiceOptions}
  4216. */
  4217. proto.google.protobuf.ServiceDescriptorProto.prototype.getOptions = function() {
  4218. return /** @type{?proto.google.protobuf.ServiceOptions} */ (
  4219. jspb.Message.getWrapperField(this, proto.google.protobuf.ServiceOptions, 3));
  4220. };
  4221. /**
  4222. * @param {?proto.google.protobuf.ServiceOptions|undefined} value
  4223. * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this
  4224. */
  4225. proto.google.protobuf.ServiceDescriptorProto.prototype.setOptions = function(value) {
  4226. return jspb.Message.setWrapperField(this, 3, value);
  4227. };
  4228. /**
  4229. * Clears the message field making it undefined.
  4230. * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this
  4231. */
  4232. proto.google.protobuf.ServiceDescriptorProto.prototype.clearOptions = function() {
  4233. return this.setOptions(undefined);
  4234. };
  4235. /**
  4236. * Returns whether this field is set.
  4237. * @return {boolean}
  4238. */
  4239. proto.google.protobuf.ServiceDescriptorProto.prototype.hasOptions = function() {
  4240. return jspb.Message.getField(this, 3) != null;
  4241. };
  4242. if (jspb.Message.GENERATE_TO_OBJECT) {
  4243. /**
  4244. * Creates an object representation of this proto.
  4245. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  4246. * Optional fields that are not set will be set to undefined.
  4247. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  4248. * For the list of reserved names please see:
  4249. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  4250. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  4251. * JSPB instance for transitional soy proto support:
  4252. * http://goto/soy-param-migration
  4253. * @return {!Object}
  4254. */
  4255. proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_includeInstance) {
  4256. return proto.google.protobuf.MethodDescriptorProto.toObject(opt_includeInstance, this);
  4257. };
  4258. /**
  4259. * Static version of the {@see toObject} method.
  4260. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  4261. * the JSPB instance for transitional soy proto support:
  4262. * http://goto/soy-param-migration
  4263. * @param {!proto.google.protobuf.MethodDescriptorProto} msg The msg instance to transform.
  4264. * @return {!Object}
  4265. * @suppress {unusedLocalVariables} f is only used for nested messages
  4266. */
  4267. proto.google.protobuf.MethodDescriptorProto.toObject = function(includeInstance, msg) {
  4268. var f, obj = {
  4269. name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  4270. inputType: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
  4271. outputType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
  4272. options: (f = msg.getOptions()) && proto.google.protobuf.MethodOptions.toObject(includeInstance, f),
  4273. clientStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
  4274. serverStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 6, false)
  4275. };
  4276. if (includeInstance) {
  4277. obj.$jspbMessageInstance = msg;
  4278. }
  4279. return obj;
  4280. };
  4281. }
  4282. /**
  4283. * Deserializes binary data (in protobuf wire format).
  4284. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  4285. * @return {!proto.google.protobuf.MethodDescriptorProto}
  4286. */
  4287. proto.google.protobuf.MethodDescriptorProto.deserializeBinary = function(bytes) {
  4288. var reader = new jspb.BinaryReader(bytes);
  4289. var msg = new proto.google.protobuf.MethodDescriptorProto;
  4290. return proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader(msg, reader);
  4291. };
  4292. /**
  4293. * Deserializes binary data (in protobuf wire format) from the
  4294. * given reader into the given message object.
  4295. * @param {!proto.google.protobuf.MethodDescriptorProto} msg The message object to deserialize into.
  4296. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  4297. * @return {!proto.google.protobuf.MethodDescriptorProto}
  4298. */
  4299. proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader = function(msg, reader) {
  4300. while (reader.nextField()) {
  4301. if (reader.isEndGroup()) {
  4302. break;
  4303. }
  4304. var field = reader.getFieldNumber();
  4305. switch (field) {
  4306. case 1:
  4307. var value = /** @type {string} */ (reader.readString());
  4308. msg.setName(value);
  4309. break;
  4310. case 2:
  4311. var value = /** @type {string} */ (reader.readString());
  4312. msg.setInputType(value);
  4313. break;
  4314. case 3:
  4315. var value = /** @type {string} */ (reader.readString());
  4316. msg.setOutputType(value);
  4317. break;
  4318. case 4:
  4319. var value = new proto.google.protobuf.MethodOptions;
  4320. reader.readMessage(value,proto.google.protobuf.MethodOptions.deserializeBinaryFromReader);
  4321. msg.setOptions(value);
  4322. break;
  4323. case 5:
  4324. var value = /** @type {boolean} */ (reader.readBool());
  4325. msg.setClientStreaming(value);
  4326. break;
  4327. case 6:
  4328. var value = /** @type {boolean} */ (reader.readBool());
  4329. msg.setServerStreaming(value);
  4330. break;
  4331. default:
  4332. reader.skipField();
  4333. break;
  4334. }
  4335. }
  4336. return msg;
  4337. };
  4338. /**
  4339. * Serializes the message to binary data (in protobuf wire format).
  4340. * @return {!Uint8Array}
  4341. */
  4342. proto.google.protobuf.MethodDescriptorProto.prototype.serializeBinary = function() {
  4343. var writer = new jspb.BinaryWriter();
  4344. proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter(this, writer);
  4345. return writer.getResultBuffer();
  4346. };
  4347. /**
  4348. * Serializes the given message to binary data (in protobuf wire
  4349. * format), writing to the given BinaryWriter.
  4350. * @param {!proto.google.protobuf.MethodDescriptorProto} message
  4351. * @param {!jspb.BinaryWriter} writer
  4352. * @suppress {unusedLocalVariables} f is only used for nested messages
  4353. */
  4354. proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter = function(message, writer) {
  4355. var f = undefined;
  4356. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  4357. if (f != null) {
  4358. writer.writeString(
  4359. 1,
  4360. f
  4361. );
  4362. }
  4363. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  4364. if (f != null) {
  4365. writer.writeString(
  4366. 2,
  4367. f
  4368. );
  4369. }
  4370. f = /** @type {string} */ (jspb.Message.getField(message, 3));
  4371. if (f != null) {
  4372. writer.writeString(
  4373. 3,
  4374. f
  4375. );
  4376. }
  4377. f = message.getOptions();
  4378. if (f != null) {
  4379. writer.writeMessage(
  4380. 4,
  4381. f,
  4382. proto.google.protobuf.MethodOptions.serializeBinaryToWriter
  4383. );
  4384. }
  4385. f = /** @type {boolean} */ (jspb.Message.getField(message, 5));
  4386. if (f != null) {
  4387. writer.writeBool(
  4388. 5,
  4389. f
  4390. );
  4391. }
  4392. f = /** @type {boolean} */ (jspb.Message.getField(message, 6));
  4393. if (f != null) {
  4394. writer.writeBool(
  4395. 6,
  4396. f
  4397. );
  4398. }
  4399. };
  4400. /**
  4401. * optional string name = 1;
  4402. * @return {string}
  4403. */
  4404. proto.google.protobuf.MethodDescriptorProto.prototype.getName = function() {
  4405. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  4406. };
  4407. /**
  4408. * @param {string} value
  4409. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4410. */
  4411. proto.google.protobuf.MethodDescriptorProto.prototype.setName = function(value) {
  4412. return jspb.Message.setField(this, 1, value);
  4413. };
  4414. /**
  4415. * Clears the field making it undefined.
  4416. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4417. */
  4418. proto.google.protobuf.MethodDescriptorProto.prototype.clearName = function() {
  4419. return jspb.Message.setField(this, 1, undefined);
  4420. };
  4421. /**
  4422. * Returns whether this field is set.
  4423. * @return {boolean}
  4424. */
  4425. proto.google.protobuf.MethodDescriptorProto.prototype.hasName = function() {
  4426. return jspb.Message.getField(this, 1) != null;
  4427. };
  4428. /**
  4429. * optional string input_type = 2;
  4430. * @return {string}
  4431. */
  4432. proto.google.protobuf.MethodDescriptorProto.prototype.getInputType = function() {
  4433. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  4434. };
  4435. /**
  4436. * @param {string} value
  4437. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4438. */
  4439. proto.google.protobuf.MethodDescriptorProto.prototype.setInputType = function(value) {
  4440. return jspb.Message.setField(this, 2, value);
  4441. };
  4442. /**
  4443. * Clears the field making it undefined.
  4444. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4445. */
  4446. proto.google.protobuf.MethodDescriptorProto.prototype.clearInputType = function() {
  4447. return jspb.Message.setField(this, 2, undefined);
  4448. };
  4449. /**
  4450. * Returns whether this field is set.
  4451. * @return {boolean}
  4452. */
  4453. proto.google.protobuf.MethodDescriptorProto.prototype.hasInputType = function() {
  4454. return jspb.Message.getField(this, 2) != null;
  4455. };
  4456. /**
  4457. * optional string output_type = 3;
  4458. * @return {string}
  4459. */
  4460. proto.google.protobuf.MethodDescriptorProto.prototype.getOutputType = function() {
  4461. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
  4462. };
  4463. /**
  4464. * @param {string} value
  4465. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4466. */
  4467. proto.google.protobuf.MethodDescriptorProto.prototype.setOutputType = function(value) {
  4468. return jspb.Message.setField(this, 3, value);
  4469. };
  4470. /**
  4471. * Clears the field making it undefined.
  4472. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4473. */
  4474. proto.google.protobuf.MethodDescriptorProto.prototype.clearOutputType = function() {
  4475. return jspb.Message.setField(this, 3, undefined);
  4476. };
  4477. /**
  4478. * Returns whether this field is set.
  4479. * @return {boolean}
  4480. */
  4481. proto.google.protobuf.MethodDescriptorProto.prototype.hasOutputType = function() {
  4482. return jspb.Message.getField(this, 3) != null;
  4483. };
  4484. /**
  4485. * optional MethodOptions options = 4;
  4486. * @return {?proto.google.protobuf.MethodOptions}
  4487. */
  4488. proto.google.protobuf.MethodDescriptorProto.prototype.getOptions = function() {
  4489. return /** @type{?proto.google.protobuf.MethodOptions} */ (
  4490. jspb.Message.getWrapperField(this, proto.google.protobuf.MethodOptions, 4));
  4491. };
  4492. /**
  4493. * @param {?proto.google.protobuf.MethodOptions|undefined} value
  4494. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4495. */
  4496. proto.google.protobuf.MethodDescriptorProto.prototype.setOptions = function(value) {
  4497. return jspb.Message.setWrapperField(this, 4, value);
  4498. };
  4499. /**
  4500. * Clears the message field making it undefined.
  4501. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4502. */
  4503. proto.google.protobuf.MethodDescriptorProto.prototype.clearOptions = function() {
  4504. return this.setOptions(undefined);
  4505. };
  4506. /**
  4507. * Returns whether this field is set.
  4508. * @return {boolean}
  4509. */
  4510. proto.google.protobuf.MethodDescriptorProto.prototype.hasOptions = function() {
  4511. return jspb.Message.getField(this, 4) != null;
  4512. };
  4513. /**
  4514. * optional bool client_streaming = 5;
  4515. * @return {boolean}
  4516. */
  4517. proto.google.protobuf.MethodDescriptorProto.prototype.getClientStreaming = function() {
  4518. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
  4519. };
  4520. /**
  4521. * @param {boolean} value
  4522. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4523. */
  4524. proto.google.protobuf.MethodDescriptorProto.prototype.setClientStreaming = function(value) {
  4525. return jspb.Message.setField(this, 5, value);
  4526. };
  4527. /**
  4528. * Clears the field making it undefined.
  4529. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4530. */
  4531. proto.google.protobuf.MethodDescriptorProto.prototype.clearClientStreaming = function() {
  4532. return jspb.Message.setField(this, 5, undefined);
  4533. };
  4534. /**
  4535. * Returns whether this field is set.
  4536. * @return {boolean}
  4537. */
  4538. proto.google.protobuf.MethodDescriptorProto.prototype.hasClientStreaming = function() {
  4539. return jspb.Message.getField(this, 5) != null;
  4540. };
  4541. /**
  4542. * optional bool server_streaming = 6;
  4543. * @return {boolean}
  4544. */
  4545. proto.google.protobuf.MethodDescriptorProto.prototype.getServerStreaming = function() {
  4546. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
  4547. };
  4548. /**
  4549. * @param {boolean} value
  4550. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4551. */
  4552. proto.google.protobuf.MethodDescriptorProto.prototype.setServerStreaming = function(value) {
  4553. return jspb.Message.setField(this, 6, value);
  4554. };
  4555. /**
  4556. * Clears the field making it undefined.
  4557. * @return {!proto.google.protobuf.MethodDescriptorProto} returns this
  4558. */
  4559. proto.google.protobuf.MethodDescriptorProto.prototype.clearServerStreaming = function() {
  4560. return jspb.Message.setField(this, 6, undefined);
  4561. };
  4562. /**
  4563. * Returns whether this field is set.
  4564. * @return {boolean}
  4565. */
  4566. proto.google.protobuf.MethodDescriptorProto.prototype.hasServerStreaming = function() {
  4567. return jspb.Message.getField(this, 6) != null;
  4568. };
  4569. /**
  4570. * List of repeated fields within this message type.
  4571. * @private {!Array<number>}
  4572. * @const
  4573. */
  4574. proto.google.protobuf.FileOptions.repeatedFields_ = [999];
  4575. if (jspb.Message.GENERATE_TO_OBJECT) {
  4576. /**
  4577. * Creates an object representation of this proto.
  4578. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  4579. * Optional fields that are not set will be set to undefined.
  4580. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  4581. * For the list of reserved names please see:
  4582. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  4583. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  4584. * JSPB instance for transitional soy proto support:
  4585. * http://goto/soy-param-migration
  4586. * @return {!Object}
  4587. */
  4588. proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInstance) {
  4589. return proto.google.protobuf.FileOptions.toObject(opt_includeInstance, this);
  4590. };
  4591. /**
  4592. * Static version of the {@see toObject} method.
  4593. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  4594. * the JSPB instance for transitional soy proto support:
  4595. * http://goto/soy-param-migration
  4596. * @param {!proto.google.protobuf.FileOptions} msg The msg instance to transform.
  4597. * @return {!Object}
  4598. * @suppress {unusedLocalVariables} f is only used for nested messages
  4599. */
  4600. proto.google.protobuf.FileOptions.toObject = function(includeInstance, msg) {
  4601. var f, obj = {
  4602. javaPackage: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  4603. javaOuterClassname: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f,
  4604. javaMultipleFiles: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
  4605. javaGenerateEqualsAndHash: (f = jspb.Message.getBooleanField(msg, 20)) == null ? undefined : f,
  4606. javaStringCheckUtf8: jspb.Message.getBooleanFieldWithDefault(msg, 27, false),
  4607. optimizeFor: jspb.Message.getFieldWithDefault(msg, 9, 1),
  4608. goPackage: (f = jspb.Message.getField(msg, 11)) == null ? undefined : f,
  4609. ccGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 16, false),
  4610. javaGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 17, false),
  4611. pyGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 18, false),
  4612. phpGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 42, false),
  4613. deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 23, false),
  4614. ccEnableArenas: jspb.Message.getBooleanFieldWithDefault(msg, 31, true),
  4615. objcClassPrefix: (f = jspb.Message.getField(msg, 36)) == null ? undefined : f,
  4616. csharpNamespace: (f = jspb.Message.getField(msg, 37)) == null ? undefined : f,
  4617. swiftPrefix: (f = jspb.Message.getField(msg, 39)) == null ? undefined : f,
  4618. phpClassPrefix: (f = jspb.Message.getField(msg, 40)) == null ? undefined : f,
  4619. phpNamespace: (f = jspb.Message.getField(msg, 41)) == null ? undefined : f,
  4620. phpMetadataNamespace: (f = jspb.Message.getField(msg, 44)) == null ? undefined : f,
  4621. rubyPackage: (f = jspb.Message.getField(msg, 45)) == null ? undefined : f,
  4622. uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(),
  4623. proto.google.protobuf.UninterpretedOption.toObject, includeInstance)
  4624. };
  4625. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  4626. proto.google.protobuf.FileOptions.extensions, proto.google.protobuf.FileOptions.prototype.getExtension,
  4627. includeInstance);
  4628. if (includeInstance) {
  4629. obj.$jspbMessageInstance = msg;
  4630. }
  4631. return obj;
  4632. };
  4633. }
  4634. /**
  4635. * Deserializes binary data (in protobuf wire format).
  4636. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  4637. * @return {!proto.google.protobuf.FileOptions}
  4638. */
  4639. proto.google.protobuf.FileOptions.deserializeBinary = function(bytes) {
  4640. var reader = new jspb.BinaryReader(bytes);
  4641. var msg = new proto.google.protobuf.FileOptions;
  4642. return proto.google.protobuf.FileOptions.deserializeBinaryFromReader(msg, reader);
  4643. };
  4644. /**
  4645. * Deserializes binary data (in protobuf wire format) from the
  4646. * given reader into the given message object.
  4647. * @param {!proto.google.protobuf.FileOptions} msg The message object to deserialize into.
  4648. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  4649. * @return {!proto.google.protobuf.FileOptions}
  4650. */
  4651. proto.google.protobuf.FileOptions.deserializeBinaryFromReader = function(msg, reader) {
  4652. while (reader.nextField()) {
  4653. if (reader.isEndGroup()) {
  4654. break;
  4655. }
  4656. var field = reader.getFieldNumber();
  4657. switch (field) {
  4658. case 1:
  4659. var value = /** @type {string} */ (reader.readString());
  4660. msg.setJavaPackage(value);
  4661. break;
  4662. case 8:
  4663. var value = /** @type {string} */ (reader.readString());
  4664. msg.setJavaOuterClassname(value);
  4665. break;
  4666. case 10:
  4667. var value = /** @type {boolean} */ (reader.readBool());
  4668. msg.setJavaMultipleFiles(value);
  4669. break;
  4670. case 20:
  4671. var value = /** @type {boolean} */ (reader.readBool());
  4672. msg.setJavaGenerateEqualsAndHash(value);
  4673. break;
  4674. case 27:
  4675. var value = /** @type {boolean} */ (reader.readBool());
  4676. msg.setJavaStringCheckUtf8(value);
  4677. break;
  4678. case 9:
  4679. var value = /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (reader.readEnum());
  4680. msg.setOptimizeFor(value);
  4681. break;
  4682. case 11:
  4683. var value = /** @type {string} */ (reader.readString());
  4684. msg.setGoPackage(value);
  4685. break;
  4686. case 16:
  4687. var value = /** @type {boolean} */ (reader.readBool());
  4688. msg.setCcGenericServices(value);
  4689. break;
  4690. case 17:
  4691. var value = /** @type {boolean} */ (reader.readBool());
  4692. msg.setJavaGenericServices(value);
  4693. break;
  4694. case 18:
  4695. var value = /** @type {boolean} */ (reader.readBool());
  4696. msg.setPyGenericServices(value);
  4697. break;
  4698. case 42:
  4699. var value = /** @type {boolean} */ (reader.readBool());
  4700. msg.setPhpGenericServices(value);
  4701. break;
  4702. case 23:
  4703. var value = /** @type {boolean} */ (reader.readBool());
  4704. msg.setDeprecated(value);
  4705. break;
  4706. case 31:
  4707. var value = /** @type {boolean} */ (reader.readBool());
  4708. msg.setCcEnableArenas(value);
  4709. break;
  4710. case 36:
  4711. var value = /** @type {string} */ (reader.readString());
  4712. msg.setObjcClassPrefix(value);
  4713. break;
  4714. case 37:
  4715. var value = /** @type {string} */ (reader.readString());
  4716. msg.setCsharpNamespace(value);
  4717. break;
  4718. case 39:
  4719. var value = /** @type {string} */ (reader.readString());
  4720. msg.setSwiftPrefix(value);
  4721. break;
  4722. case 40:
  4723. var value = /** @type {string} */ (reader.readString());
  4724. msg.setPhpClassPrefix(value);
  4725. break;
  4726. case 41:
  4727. var value = /** @type {string} */ (reader.readString());
  4728. msg.setPhpNamespace(value);
  4729. break;
  4730. case 44:
  4731. var value = /** @type {string} */ (reader.readString());
  4732. msg.setPhpMetadataNamespace(value);
  4733. break;
  4734. case 45:
  4735. var value = /** @type {string} */ (reader.readString());
  4736. msg.setRubyPackage(value);
  4737. break;
  4738. case 999:
  4739. var value = new proto.google.protobuf.UninterpretedOption;
  4740. reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader);
  4741. msg.addUninterpretedOption(value);
  4742. break;
  4743. default:
  4744. jspb.Message.readBinaryExtension(msg, reader,
  4745. proto.google.protobuf.FileOptions.extensionsBinary,
  4746. proto.google.protobuf.FileOptions.prototype.getExtension,
  4747. proto.google.protobuf.FileOptions.prototype.setExtension);
  4748. break;
  4749. }
  4750. }
  4751. return msg;
  4752. };
  4753. /**
  4754. * Serializes the message to binary data (in protobuf wire format).
  4755. * @return {!Uint8Array}
  4756. */
  4757. proto.google.protobuf.FileOptions.prototype.serializeBinary = function() {
  4758. var writer = new jspb.BinaryWriter();
  4759. proto.google.protobuf.FileOptions.serializeBinaryToWriter(this, writer);
  4760. return writer.getResultBuffer();
  4761. };
  4762. /**
  4763. * Serializes the given message to binary data (in protobuf wire
  4764. * format), writing to the given BinaryWriter.
  4765. * @param {!proto.google.protobuf.FileOptions} message
  4766. * @param {!jspb.BinaryWriter} writer
  4767. * @suppress {unusedLocalVariables} f is only used for nested messages
  4768. */
  4769. proto.google.protobuf.FileOptions.serializeBinaryToWriter = function(message, writer) {
  4770. var f = undefined;
  4771. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  4772. if (f != null) {
  4773. writer.writeString(
  4774. 1,
  4775. f
  4776. );
  4777. }
  4778. f = /** @type {string} */ (jspb.Message.getField(message, 8));
  4779. if (f != null) {
  4780. writer.writeString(
  4781. 8,
  4782. f
  4783. );
  4784. }
  4785. f = /** @type {boolean} */ (jspb.Message.getField(message, 10));
  4786. if (f != null) {
  4787. writer.writeBool(
  4788. 10,
  4789. f
  4790. );
  4791. }
  4792. f = /** @type {boolean} */ (jspb.Message.getField(message, 20));
  4793. if (f != null) {
  4794. writer.writeBool(
  4795. 20,
  4796. f
  4797. );
  4798. }
  4799. f = /** @type {boolean} */ (jspb.Message.getField(message, 27));
  4800. if (f != null) {
  4801. writer.writeBool(
  4802. 27,
  4803. f
  4804. );
  4805. }
  4806. f = /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (jspb.Message.getField(message, 9));
  4807. if (f != null) {
  4808. writer.writeEnum(
  4809. 9,
  4810. f
  4811. );
  4812. }
  4813. f = /** @type {string} */ (jspb.Message.getField(message, 11));
  4814. if (f != null) {
  4815. writer.writeString(
  4816. 11,
  4817. f
  4818. );
  4819. }
  4820. f = /** @type {boolean} */ (jspb.Message.getField(message, 16));
  4821. if (f != null) {
  4822. writer.writeBool(
  4823. 16,
  4824. f
  4825. );
  4826. }
  4827. f = /** @type {boolean} */ (jspb.Message.getField(message, 17));
  4828. if (f != null) {
  4829. writer.writeBool(
  4830. 17,
  4831. f
  4832. );
  4833. }
  4834. f = /** @type {boolean} */ (jspb.Message.getField(message, 18));
  4835. if (f != null) {
  4836. writer.writeBool(
  4837. 18,
  4838. f
  4839. );
  4840. }
  4841. f = /** @type {boolean} */ (jspb.Message.getField(message, 42));
  4842. if (f != null) {
  4843. writer.writeBool(
  4844. 42,
  4845. f
  4846. );
  4847. }
  4848. f = /** @type {boolean} */ (jspb.Message.getField(message, 23));
  4849. if (f != null) {
  4850. writer.writeBool(
  4851. 23,
  4852. f
  4853. );
  4854. }
  4855. f = /** @type {boolean} */ (jspb.Message.getField(message, 31));
  4856. if (f != null) {
  4857. writer.writeBool(
  4858. 31,
  4859. f
  4860. );
  4861. }
  4862. f = /** @type {string} */ (jspb.Message.getField(message, 36));
  4863. if (f != null) {
  4864. writer.writeString(
  4865. 36,
  4866. f
  4867. );
  4868. }
  4869. f = /** @type {string} */ (jspb.Message.getField(message, 37));
  4870. if (f != null) {
  4871. writer.writeString(
  4872. 37,
  4873. f
  4874. );
  4875. }
  4876. f = /** @type {string} */ (jspb.Message.getField(message, 39));
  4877. if (f != null) {
  4878. writer.writeString(
  4879. 39,
  4880. f
  4881. );
  4882. }
  4883. f = /** @type {string} */ (jspb.Message.getField(message, 40));
  4884. if (f != null) {
  4885. writer.writeString(
  4886. 40,
  4887. f
  4888. );
  4889. }
  4890. f = /** @type {string} */ (jspb.Message.getField(message, 41));
  4891. if (f != null) {
  4892. writer.writeString(
  4893. 41,
  4894. f
  4895. );
  4896. }
  4897. f = /** @type {string} */ (jspb.Message.getField(message, 44));
  4898. if (f != null) {
  4899. writer.writeString(
  4900. 44,
  4901. f
  4902. );
  4903. }
  4904. f = /** @type {string} */ (jspb.Message.getField(message, 45));
  4905. if (f != null) {
  4906. writer.writeString(
  4907. 45,
  4908. f
  4909. );
  4910. }
  4911. f = message.getUninterpretedOptionList();
  4912. if (f.length > 0) {
  4913. writer.writeRepeatedMessage(
  4914. 999,
  4915. f,
  4916. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter
  4917. );
  4918. }
  4919. jspb.Message.serializeBinaryExtensions(message, writer,
  4920. proto.google.protobuf.FileOptions.extensionsBinary, proto.google.protobuf.FileOptions.prototype.getExtension);
  4921. };
  4922. /**
  4923. * @enum {number}
  4924. */
  4925. proto.google.protobuf.FileOptions.OptimizeMode = {
  4926. SPEED: 1,
  4927. CODE_SIZE: 2,
  4928. LITE_RUNTIME: 3
  4929. };
  4930. /**
  4931. * optional string java_package = 1;
  4932. * @return {string}
  4933. */
  4934. proto.google.protobuf.FileOptions.prototype.getJavaPackage = function() {
  4935. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  4936. };
  4937. /**
  4938. * @param {string} value
  4939. * @return {!proto.google.protobuf.FileOptions} returns this
  4940. */
  4941. proto.google.protobuf.FileOptions.prototype.setJavaPackage = function(value) {
  4942. return jspb.Message.setField(this, 1, value);
  4943. };
  4944. /**
  4945. * Clears the field making it undefined.
  4946. * @return {!proto.google.protobuf.FileOptions} returns this
  4947. */
  4948. proto.google.protobuf.FileOptions.prototype.clearJavaPackage = function() {
  4949. return jspb.Message.setField(this, 1, undefined);
  4950. };
  4951. /**
  4952. * Returns whether this field is set.
  4953. * @return {boolean}
  4954. */
  4955. proto.google.protobuf.FileOptions.prototype.hasJavaPackage = function() {
  4956. return jspb.Message.getField(this, 1) != null;
  4957. };
  4958. /**
  4959. * optional string java_outer_classname = 8;
  4960. * @return {string}
  4961. */
  4962. proto.google.protobuf.FileOptions.prototype.getJavaOuterClassname = function() {
  4963. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
  4964. };
  4965. /**
  4966. * @param {string} value
  4967. * @return {!proto.google.protobuf.FileOptions} returns this
  4968. */
  4969. proto.google.protobuf.FileOptions.prototype.setJavaOuterClassname = function(value) {
  4970. return jspb.Message.setField(this, 8, value);
  4971. };
  4972. /**
  4973. * Clears the field making it undefined.
  4974. * @return {!proto.google.protobuf.FileOptions} returns this
  4975. */
  4976. proto.google.protobuf.FileOptions.prototype.clearJavaOuterClassname = function() {
  4977. return jspb.Message.setField(this, 8, undefined);
  4978. };
  4979. /**
  4980. * Returns whether this field is set.
  4981. * @return {boolean}
  4982. */
  4983. proto.google.protobuf.FileOptions.prototype.hasJavaOuterClassname = function() {
  4984. return jspb.Message.getField(this, 8) != null;
  4985. };
  4986. /**
  4987. * optional bool java_multiple_files = 10;
  4988. * @return {boolean}
  4989. */
  4990. proto.google.protobuf.FileOptions.prototype.getJavaMultipleFiles = function() {
  4991. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false));
  4992. };
  4993. /**
  4994. * @param {boolean} value
  4995. * @return {!proto.google.protobuf.FileOptions} returns this
  4996. */
  4997. proto.google.protobuf.FileOptions.prototype.setJavaMultipleFiles = function(value) {
  4998. return jspb.Message.setField(this, 10, value);
  4999. };
  5000. /**
  5001. * Clears the field making it undefined.
  5002. * @return {!proto.google.protobuf.FileOptions} returns this
  5003. */
  5004. proto.google.protobuf.FileOptions.prototype.clearJavaMultipleFiles = function() {
  5005. return jspb.Message.setField(this, 10, undefined);
  5006. };
  5007. /**
  5008. * Returns whether this field is set.
  5009. * @return {boolean}
  5010. */
  5011. proto.google.protobuf.FileOptions.prototype.hasJavaMultipleFiles = function() {
  5012. return jspb.Message.getField(this, 10) != null;
  5013. };
  5014. /**
  5015. * optional bool java_generate_equals_and_hash = 20;
  5016. * @return {boolean}
  5017. */
  5018. proto.google.protobuf.FileOptions.prototype.getJavaGenerateEqualsAndHash = function() {
  5019. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 20, false));
  5020. };
  5021. /**
  5022. * @param {boolean} value
  5023. * @return {!proto.google.protobuf.FileOptions} returns this
  5024. */
  5025. proto.google.protobuf.FileOptions.prototype.setJavaGenerateEqualsAndHash = function(value) {
  5026. return jspb.Message.setField(this, 20, value);
  5027. };
  5028. /**
  5029. * Clears the field making it undefined.
  5030. * @return {!proto.google.protobuf.FileOptions} returns this
  5031. */
  5032. proto.google.protobuf.FileOptions.prototype.clearJavaGenerateEqualsAndHash = function() {
  5033. return jspb.Message.setField(this, 20, undefined);
  5034. };
  5035. /**
  5036. * Returns whether this field is set.
  5037. * @return {boolean}
  5038. */
  5039. proto.google.protobuf.FileOptions.prototype.hasJavaGenerateEqualsAndHash = function() {
  5040. return jspb.Message.getField(this, 20) != null;
  5041. };
  5042. /**
  5043. * optional bool java_string_check_utf8 = 27;
  5044. * @return {boolean}
  5045. */
  5046. proto.google.protobuf.FileOptions.prototype.getJavaStringCheckUtf8 = function() {
  5047. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false));
  5048. };
  5049. /**
  5050. * @param {boolean} value
  5051. * @return {!proto.google.protobuf.FileOptions} returns this
  5052. */
  5053. proto.google.protobuf.FileOptions.prototype.setJavaStringCheckUtf8 = function(value) {
  5054. return jspb.Message.setField(this, 27, value);
  5055. };
  5056. /**
  5057. * Clears the field making it undefined.
  5058. * @return {!proto.google.protobuf.FileOptions} returns this
  5059. */
  5060. proto.google.protobuf.FileOptions.prototype.clearJavaStringCheckUtf8 = function() {
  5061. return jspb.Message.setField(this, 27, undefined);
  5062. };
  5063. /**
  5064. * Returns whether this field is set.
  5065. * @return {boolean}
  5066. */
  5067. proto.google.protobuf.FileOptions.prototype.hasJavaStringCheckUtf8 = function() {
  5068. return jspb.Message.getField(this, 27) != null;
  5069. };
  5070. /**
  5071. * optional OptimizeMode optimize_for = 9;
  5072. * @return {!proto.google.protobuf.FileOptions.OptimizeMode}
  5073. */
  5074. proto.google.protobuf.FileOptions.prototype.getOptimizeFor = function() {
  5075. return /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (jspb.Message.getFieldWithDefault(this, 9, 1));
  5076. };
  5077. /**
  5078. * @param {!proto.google.protobuf.FileOptions.OptimizeMode} value
  5079. * @return {!proto.google.protobuf.FileOptions} returns this
  5080. */
  5081. proto.google.protobuf.FileOptions.prototype.setOptimizeFor = function(value) {
  5082. return jspb.Message.setField(this, 9, value);
  5083. };
  5084. /**
  5085. * Clears the field making it undefined.
  5086. * @return {!proto.google.protobuf.FileOptions} returns this
  5087. */
  5088. proto.google.protobuf.FileOptions.prototype.clearOptimizeFor = function() {
  5089. return jspb.Message.setField(this, 9, undefined);
  5090. };
  5091. /**
  5092. * Returns whether this field is set.
  5093. * @return {boolean}
  5094. */
  5095. proto.google.protobuf.FileOptions.prototype.hasOptimizeFor = function() {
  5096. return jspb.Message.getField(this, 9) != null;
  5097. };
  5098. /**
  5099. * optional string go_package = 11;
  5100. * @return {string}
  5101. */
  5102. proto.google.protobuf.FileOptions.prototype.getGoPackage = function() {
  5103. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
  5104. };
  5105. /**
  5106. * @param {string} value
  5107. * @return {!proto.google.protobuf.FileOptions} returns this
  5108. */
  5109. proto.google.protobuf.FileOptions.prototype.setGoPackage = function(value) {
  5110. return jspb.Message.setField(this, 11, value);
  5111. };
  5112. /**
  5113. * Clears the field making it undefined.
  5114. * @return {!proto.google.protobuf.FileOptions} returns this
  5115. */
  5116. proto.google.protobuf.FileOptions.prototype.clearGoPackage = function() {
  5117. return jspb.Message.setField(this, 11, undefined);
  5118. };
  5119. /**
  5120. * Returns whether this field is set.
  5121. * @return {boolean}
  5122. */
  5123. proto.google.protobuf.FileOptions.prototype.hasGoPackage = function() {
  5124. return jspb.Message.getField(this, 11) != null;
  5125. };
  5126. /**
  5127. * optional bool cc_generic_services = 16;
  5128. * @return {boolean}
  5129. */
  5130. proto.google.protobuf.FileOptions.prototype.getCcGenericServices = function() {
  5131. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false));
  5132. };
  5133. /**
  5134. * @param {boolean} value
  5135. * @return {!proto.google.protobuf.FileOptions} returns this
  5136. */
  5137. proto.google.protobuf.FileOptions.prototype.setCcGenericServices = function(value) {
  5138. return jspb.Message.setField(this, 16, value);
  5139. };
  5140. /**
  5141. * Clears the field making it undefined.
  5142. * @return {!proto.google.protobuf.FileOptions} returns this
  5143. */
  5144. proto.google.protobuf.FileOptions.prototype.clearCcGenericServices = function() {
  5145. return jspb.Message.setField(this, 16, undefined);
  5146. };
  5147. /**
  5148. * Returns whether this field is set.
  5149. * @return {boolean}
  5150. */
  5151. proto.google.protobuf.FileOptions.prototype.hasCcGenericServices = function() {
  5152. return jspb.Message.getField(this, 16) != null;
  5153. };
  5154. /**
  5155. * optional bool java_generic_services = 17;
  5156. * @return {boolean}
  5157. */
  5158. proto.google.protobuf.FileOptions.prototype.getJavaGenericServices = function() {
  5159. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false));
  5160. };
  5161. /**
  5162. * @param {boolean} value
  5163. * @return {!proto.google.protobuf.FileOptions} returns this
  5164. */
  5165. proto.google.protobuf.FileOptions.prototype.setJavaGenericServices = function(value) {
  5166. return jspb.Message.setField(this, 17, value);
  5167. };
  5168. /**
  5169. * Clears the field making it undefined.
  5170. * @return {!proto.google.protobuf.FileOptions} returns this
  5171. */
  5172. proto.google.protobuf.FileOptions.prototype.clearJavaGenericServices = function() {
  5173. return jspb.Message.setField(this, 17, undefined);
  5174. };
  5175. /**
  5176. * Returns whether this field is set.
  5177. * @return {boolean}
  5178. */
  5179. proto.google.protobuf.FileOptions.prototype.hasJavaGenericServices = function() {
  5180. return jspb.Message.getField(this, 17) != null;
  5181. };
  5182. /**
  5183. * optional bool py_generic_services = 18;
  5184. * @return {boolean}
  5185. */
  5186. proto.google.protobuf.FileOptions.prototype.getPyGenericServices = function() {
  5187. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false));
  5188. };
  5189. /**
  5190. * @param {boolean} value
  5191. * @return {!proto.google.protobuf.FileOptions} returns this
  5192. */
  5193. proto.google.protobuf.FileOptions.prototype.setPyGenericServices = function(value) {
  5194. return jspb.Message.setField(this, 18, value);
  5195. };
  5196. /**
  5197. * Clears the field making it undefined.
  5198. * @return {!proto.google.protobuf.FileOptions} returns this
  5199. */
  5200. proto.google.protobuf.FileOptions.prototype.clearPyGenericServices = function() {
  5201. return jspb.Message.setField(this, 18, undefined);
  5202. };
  5203. /**
  5204. * Returns whether this field is set.
  5205. * @return {boolean}
  5206. */
  5207. proto.google.protobuf.FileOptions.prototype.hasPyGenericServices = function() {
  5208. return jspb.Message.getField(this, 18) != null;
  5209. };
  5210. /**
  5211. * optional bool php_generic_services = 42;
  5212. * @return {boolean}
  5213. */
  5214. proto.google.protobuf.FileOptions.prototype.getPhpGenericServices = function() {
  5215. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 42, false));
  5216. };
  5217. /**
  5218. * @param {boolean} value
  5219. * @return {!proto.google.protobuf.FileOptions} returns this
  5220. */
  5221. proto.google.protobuf.FileOptions.prototype.setPhpGenericServices = function(value) {
  5222. return jspb.Message.setField(this, 42, value);
  5223. };
  5224. /**
  5225. * Clears the field making it undefined.
  5226. * @return {!proto.google.protobuf.FileOptions} returns this
  5227. */
  5228. proto.google.protobuf.FileOptions.prototype.clearPhpGenericServices = function() {
  5229. return jspb.Message.setField(this, 42, undefined);
  5230. };
  5231. /**
  5232. * Returns whether this field is set.
  5233. * @return {boolean}
  5234. */
  5235. proto.google.protobuf.FileOptions.prototype.hasPhpGenericServices = function() {
  5236. return jspb.Message.getField(this, 42) != null;
  5237. };
  5238. /**
  5239. * optional bool deprecated = 23;
  5240. * @return {boolean}
  5241. */
  5242. proto.google.protobuf.FileOptions.prototype.getDeprecated = function() {
  5243. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 23, false));
  5244. };
  5245. /**
  5246. * @param {boolean} value
  5247. * @return {!proto.google.protobuf.FileOptions} returns this
  5248. */
  5249. proto.google.protobuf.FileOptions.prototype.setDeprecated = function(value) {
  5250. return jspb.Message.setField(this, 23, value);
  5251. };
  5252. /**
  5253. * Clears the field making it undefined.
  5254. * @return {!proto.google.protobuf.FileOptions} returns this
  5255. */
  5256. proto.google.protobuf.FileOptions.prototype.clearDeprecated = function() {
  5257. return jspb.Message.setField(this, 23, undefined);
  5258. };
  5259. /**
  5260. * Returns whether this field is set.
  5261. * @return {boolean}
  5262. */
  5263. proto.google.protobuf.FileOptions.prototype.hasDeprecated = function() {
  5264. return jspb.Message.getField(this, 23) != null;
  5265. };
  5266. /**
  5267. * optional bool cc_enable_arenas = 31;
  5268. * @return {boolean}
  5269. */
  5270. proto.google.protobuf.FileOptions.prototype.getCcEnableArenas = function() {
  5271. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 31, true));
  5272. };
  5273. /**
  5274. * @param {boolean} value
  5275. * @return {!proto.google.protobuf.FileOptions} returns this
  5276. */
  5277. proto.google.protobuf.FileOptions.prototype.setCcEnableArenas = function(value) {
  5278. return jspb.Message.setField(this, 31, value);
  5279. };
  5280. /**
  5281. * Clears the field making it undefined.
  5282. * @return {!proto.google.protobuf.FileOptions} returns this
  5283. */
  5284. proto.google.protobuf.FileOptions.prototype.clearCcEnableArenas = function() {
  5285. return jspb.Message.setField(this, 31, undefined);
  5286. };
  5287. /**
  5288. * Returns whether this field is set.
  5289. * @return {boolean}
  5290. */
  5291. proto.google.protobuf.FileOptions.prototype.hasCcEnableArenas = function() {
  5292. return jspb.Message.getField(this, 31) != null;
  5293. };
  5294. /**
  5295. * optional string objc_class_prefix = 36;
  5296. * @return {string}
  5297. */
  5298. proto.google.protobuf.FileOptions.prototype.getObjcClassPrefix = function() {
  5299. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 36, ""));
  5300. };
  5301. /**
  5302. * @param {string} value
  5303. * @return {!proto.google.protobuf.FileOptions} returns this
  5304. */
  5305. proto.google.protobuf.FileOptions.prototype.setObjcClassPrefix = function(value) {
  5306. return jspb.Message.setField(this, 36, value);
  5307. };
  5308. /**
  5309. * Clears the field making it undefined.
  5310. * @return {!proto.google.protobuf.FileOptions} returns this
  5311. */
  5312. proto.google.protobuf.FileOptions.prototype.clearObjcClassPrefix = function() {
  5313. return jspb.Message.setField(this, 36, undefined);
  5314. };
  5315. /**
  5316. * Returns whether this field is set.
  5317. * @return {boolean}
  5318. */
  5319. proto.google.protobuf.FileOptions.prototype.hasObjcClassPrefix = function() {
  5320. return jspb.Message.getField(this, 36) != null;
  5321. };
  5322. /**
  5323. * optional string csharp_namespace = 37;
  5324. * @return {string}
  5325. */
  5326. proto.google.protobuf.FileOptions.prototype.getCsharpNamespace = function() {
  5327. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 37, ""));
  5328. };
  5329. /**
  5330. * @param {string} value
  5331. * @return {!proto.google.protobuf.FileOptions} returns this
  5332. */
  5333. proto.google.protobuf.FileOptions.prototype.setCsharpNamespace = function(value) {
  5334. return jspb.Message.setField(this, 37, value);
  5335. };
  5336. /**
  5337. * Clears the field making it undefined.
  5338. * @return {!proto.google.protobuf.FileOptions} returns this
  5339. */
  5340. proto.google.protobuf.FileOptions.prototype.clearCsharpNamespace = function() {
  5341. return jspb.Message.setField(this, 37, undefined);
  5342. };
  5343. /**
  5344. * Returns whether this field is set.
  5345. * @return {boolean}
  5346. */
  5347. proto.google.protobuf.FileOptions.prototype.hasCsharpNamespace = function() {
  5348. return jspb.Message.getField(this, 37) != null;
  5349. };
  5350. /**
  5351. * optional string swift_prefix = 39;
  5352. * @return {string}
  5353. */
  5354. proto.google.protobuf.FileOptions.prototype.getSwiftPrefix = function() {
  5355. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 39, ""));
  5356. };
  5357. /**
  5358. * @param {string} value
  5359. * @return {!proto.google.protobuf.FileOptions} returns this
  5360. */
  5361. proto.google.protobuf.FileOptions.prototype.setSwiftPrefix = function(value) {
  5362. return jspb.Message.setField(this, 39, value);
  5363. };
  5364. /**
  5365. * Clears the field making it undefined.
  5366. * @return {!proto.google.protobuf.FileOptions} returns this
  5367. */
  5368. proto.google.protobuf.FileOptions.prototype.clearSwiftPrefix = function() {
  5369. return jspb.Message.setField(this, 39, undefined);
  5370. };
  5371. /**
  5372. * Returns whether this field is set.
  5373. * @return {boolean}
  5374. */
  5375. proto.google.protobuf.FileOptions.prototype.hasSwiftPrefix = function() {
  5376. return jspb.Message.getField(this, 39) != null;
  5377. };
  5378. /**
  5379. * optional string php_class_prefix = 40;
  5380. * @return {string}
  5381. */
  5382. proto.google.protobuf.FileOptions.prototype.getPhpClassPrefix = function() {
  5383. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 40, ""));
  5384. };
  5385. /**
  5386. * @param {string} value
  5387. * @return {!proto.google.protobuf.FileOptions} returns this
  5388. */
  5389. proto.google.protobuf.FileOptions.prototype.setPhpClassPrefix = function(value) {
  5390. return jspb.Message.setField(this, 40, value);
  5391. };
  5392. /**
  5393. * Clears the field making it undefined.
  5394. * @return {!proto.google.protobuf.FileOptions} returns this
  5395. */
  5396. proto.google.protobuf.FileOptions.prototype.clearPhpClassPrefix = function() {
  5397. return jspb.Message.setField(this, 40, undefined);
  5398. };
  5399. /**
  5400. * Returns whether this field is set.
  5401. * @return {boolean}
  5402. */
  5403. proto.google.protobuf.FileOptions.prototype.hasPhpClassPrefix = function() {
  5404. return jspb.Message.getField(this, 40) != null;
  5405. };
  5406. /**
  5407. * optional string php_namespace = 41;
  5408. * @return {string}
  5409. */
  5410. proto.google.protobuf.FileOptions.prototype.getPhpNamespace = function() {
  5411. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 41, ""));
  5412. };
  5413. /**
  5414. * @param {string} value
  5415. * @return {!proto.google.protobuf.FileOptions} returns this
  5416. */
  5417. proto.google.protobuf.FileOptions.prototype.setPhpNamespace = function(value) {
  5418. return jspb.Message.setField(this, 41, value);
  5419. };
  5420. /**
  5421. * Clears the field making it undefined.
  5422. * @return {!proto.google.protobuf.FileOptions} returns this
  5423. */
  5424. proto.google.protobuf.FileOptions.prototype.clearPhpNamespace = function() {
  5425. return jspb.Message.setField(this, 41, undefined);
  5426. };
  5427. /**
  5428. * Returns whether this field is set.
  5429. * @return {boolean}
  5430. */
  5431. proto.google.protobuf.FileOptions.prototype.hasPhpNamespace = function() {
  5432. return jspb.Message.getField(this, 41) != null;
  5433. };
  5434. /**
  5435. * optional string php_metadata_namespace = 44;
  5436. * @return {string}
  5437. */
  5438. proto.google.protobuf.FileOptions.prototype.getPhpMetadataNamespace = function() {
  5439. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 44, ""));
  5440. };
  5441. /**
  5442. * @param {string} value
  5443. * @return {!proto.google.protobuf.FileOptions} returns this
  5444. */
  5445. proto.google.protobuf.FileOptions.prototype.setPhpMetadataNamespace = function(value) {
  5446. return jspb.Message.setField(this, 44, value);
  5447. };
  5448. /**
  5449. * Clears the field making it undefined.
  5450. * @return {!proto.google.protobuf.FileOptions} returns this
  5451. */
  5452. proto.google.protobuf.FileOptions.prototype.clearPhpMetadataNamespace = function() {
  5453. return jspb.Message.setField(this, 44, undefined);
  5454. };
  5455. /**
  5456. * Returns whether this field is set.
  5457. * @return {boolean}
  5458. */
  5459. proto.google.protobuf.FileOptions.prototype.hasPhpMetadataNamespace = function() {
  5460. return jspb.Message.getField(this, 44) != null;
  5461. };
  5462. /**
  5463. * optional string ruby_package = 45;
  5464. * @return {string}
  5465. */
  5466. proto.google.protobuf.FileOptions.prototype.getRubyPackage = function() {
  5467. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 45, ""));
  5468. };
  5469. /**
  5470. * @param {string} value
  5471. * @return {!proto.google.protobuf.FileOptions} returns this
  5472. */
  5473. proto.google.protobuf.FileOptions.prototype.setRubyPackage = function(value) {
  5474. return jspb.Message.setField(this, 45, value);
  5475. };
  5476. /**
  5477. * Clears the field making it undefined.
  5478. * @return {!proto.google.protobuf.FileOptions} returns this
  5479. */
  5480. proto.google.protobuf.FileOptions.prototype.clearRubyPackage = function() {
  5481. return jspb.Message.setField(this, 45, undefined);
  5482. };
  5483. /**
  5484. * Returns whether this field is set.
  5485. * @return {boolean}
  5486. */
  5487. proto.google.protobuf.FileOptions.prototype.hasRubyPackage = function() {
  5488. return jspb.Message.getField(this, 45) != null;
  5489. };
  5490. /**
  5491. * repeated UninterpretedOption uninterpreted_option = 999;
  5492. * @return {!Array<!proto.google.protobuf.UninterpretedOption>}
  5493. */
  5494. proto.google.protobuf.FileOptions.prototype.getUninterpretedOptionList = function() {
  5495. return /** @type{!Array<!proto.google.protobuf.UninterpretedOption>} */ (
  5496. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999));
  5497. };
  5498. /**
  5499. * @param {!Array<!proto.google.protobuf.UninterpretedOption>} value
  5500. * @return {!proto.google.protobuf.FileOptions} returns this
  5501. */
  5502. proto.google.protobuf.FileOptions.prototype.setUninterpretedOptionList = function(value) {
  5503. return jspb.Message.setRepeatedWrapperField(this, 999, value);
  5504. };
  5505. /**
  5506. * @param {!proto.google.protobuf.UninterpretedOption=} opt_value
  5507. * @param {number=} opt_index
  5508. * @return {!proto.google.protobuf.UninterpretedOption}
  5509. */
  5510. proto.google.protobuf.FileOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) {
  5511. return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index);
  5512. };
  5513. /**
  5514. * Clears the list making it empty but non-null.
  5515. * @return {!proto.google.protobuf.FileOptions} returns this
  5516. */
  5517. proto.google.protobuf.FileOptions.prototype.clearUninterpretedOptionList = function() {
  5518. return this.setUninterpretedOptionList([]);
  5519. };
  5520. /**
  5521. * List of repeated fields within this message type.
  5522. * @private {!Array<number>}
  5523. * @const
  5524. */
  5525. proto.google.protobuf.MessageOptions.repeatedFields_ = [999];
  5526. if (jspb.Message.GENERATE_TO_OBJECT) {
  5527. /**
  5528. * Creates an object representation of this proto.
  5529. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  5530. * Optional fields that are not set will be set to undefined.
  5531. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  5532. * For the list of reserved names please see:
  5533. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  5534. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  5535. * JSPB instance for transitional soy proto support:
  5536. * http://goto/soy-param-migration
  5537. * @return {!Object}
  5538. */
  5539. proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeInstance) {
  5540. return proto.google.protobuf.MessageOptions.toObject(opt_includeInstance, this);
  5541. };
  5542. /**
  5543. * Static version of the {@see toObject} method.
  5544. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  5545. * the JSPB instance for transitional soy proto support:
  5546. * http://goto/soy-param-migration
  5547. * @param {!proto.google.protobuf.MessageOptions} msg The msg instance to transform.
  5548. * @return {!Object}
  5549. * @suppress {unusedLocalVariables} f is only used for nested messages
  5550. */
  5551. proto.google.protobuf.MessageOptions.toObject = function(includeInstance, msg) {
  5552. var f, obj = {
  5553. messageSetWireFormat: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
  5554. noStandardDescriptorAccessor: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
  5555. deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
  5556. mapEntry: (f = jspb.Message.getBooleanField(msg, 7)) == null ? undefined : f,
  5557. uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(),
  5558. proto.google.protobuf.UninterpretedOption.toObject, includeInstance)
  5559. };
  5560. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  5561. proto.google.protobuf.MessageOptions.extensions, proto.google.protobuf.MessageOptions.prototype.getExtension,
  5562. includeInstance);
  5563. if (includeInstance) {
  5564. obj.$jspbMessageInstance = msg;
  5565. }
  5566. return obj;
  5567. };
  5568. }
  5569. /**
  5570. * Deserializes binary data (in protobuf wire format).
  5571. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  5572. * @return {!proto.google.protobuf.MessageOptions}
  5573. */
  5574. proto.google.protobuf.MessageOptions.deserializeBinary = function(bytes) {
  5575. var reader = new jspb.BinaryReader(bytes);
  5576. var msg = new proto.google.protobuf.MessageOptions;
  5577. return proto.google.protobuf.MessageOptions.deserializeBinaryFromReader(msg, reader);
  5578. };
  5579. /**
  5580. * Deserializes binary data (in protobuf wire format) from the
  5581. * given reader into the given message object.
  5582. * @param {!proto.google.protobuf.MessageOptions} msg The message object to deserialize into.
  5583. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  5584. * @return {!proto.google.protobuf.MessageOptions}
  5585. */
  5586. proto.google.protobuf.MessageOptions.deserializeBinaryFromReader = function(msg, reader) {
  5587. while (reader.nextField()) {
  5588. if (reader.isEndGroup()) {
  5589. break;
  5590. }
  5591. var field = reader.getFieldNumber();
  5592. switch (field) {
  5593. case 1:
  5594. var value = /** @type {boolean} */ (reader.readBool());
  5595. msg.setMessageSetWireFormat(value);
  5596. break;
  5597. case 2:
  5598. var value = /** @type {boolean} */ (reader.readBool());
  5599. msg.setNoStandardDescriptorAccessor(value);
  5600. break;
  5601. case 3:
  5602. var value = /** @type {boolean} */ (reader.readBool());
  5603. msg.setDeprecated(value);
  5604. break;
  5605. case 7:
  5606. var value = /** @type {boolean} */ (reader.readBool());
  5607. msg.setMapEntry(value);
  5608. break;
  5609. case 999:
  5610. var value = new proto.google.protobuf.UninterpretedOption;
  5611. reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader);
  5612. msg.addUninterpretedOption(value);
  5613. break;
  5614. default:
  5615. jspb.Message.readBinaryExtension(msg, reader,
  5616. proto.google.protobuf.MessageOptions.extensionsBinary,
  5617. proto.google.protobuf.MessageOptions.prototype.getExtension,
  5618. proto.google.protobuf.MessageOptions.prototype.setExtension);
  5619. break;
  5620. }
  5621. }
  5622. return msg;
  5623. };
  5624. /**
  5625. * Serializes the message to binary data (in protobuf wire format).
  5626. * @return {!Uint8Array}
  5627. */
  5628. proto.google.protobuf.MessageOptions.prototype.serializeBinary = function() {
  5629. var writer = new jspb.BinaryWriter();
  5630. proto.google.protobuf.MessageOptions.serializeBinaryToWriter(this, writer);
  5631. return writer.getResultBuffer();
  5632. };
  5633. /**
  5634. * Serializes the given message to binary data (in protobuf wire
  5635. * format), writing to the given BinaryWriter.
  5636. * @param {!proto.google.protobuf.MessageOptions} message
  5637. * @param {!jspb.BinaryWriter} writer
  5638. * @suppress {unusedLocalVariables} f is only used for nested messages
  5639. */
  5640. proto.google.protobuf.MessageOptions.serializeBinaryToWriter = function(message, writer) {
  5641. var f = undefined;
  5642. f = /** @type {boolean} */ (jspb.Message.getField(message, 1));
  5643. if (f != null) {
  5644. writer.writeBool(
  5645. 1,
  5646. f
  5647. );
  5648. }
  5649. f = /** @type {boolean} */ (jspb.Message.getField(message, 2));
  5650. if (f != null) {
  5651. writer.writeBool(
  5652. 2,
  5653. f
  5654. );
  5655. }
  5656. f = /** @type {boolean} */ (jspb.Message.getField(message, 3));
  5657. if (f != null) {
  5658. writer.writeBool(
  5659. 3,
  5660. f
  5661. );
  5662. }
  5663. f = /** @type {boolean} */ (jspb.Message.getField(message, 7));
  5664. if (f != null) {
  5665. writer.writeBool(
  5666. 7,
  5667. f
  5668. );
  5669. }
  5670. f = message.getUninterpretedOptionList();
  5671. if (f.length > 0) {
  5672. writer.writeRepeatedMessage(
  5673. 999,
  5674. f,
  5675. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter
  5676. );
  5677. }
  5678. jspb.Message.serializeBinaryExtensions(message, writer,
  5679. proto.google.protobuf.MessageOptions.extensionsBinary, proto.google.protobuf.MessageOptions.prototype.getExtension);
  5680. };
  5681. /**
  5682. * optional bool message_set_wire_format = 1;
  5683. * @return {boolean}
  5684. */
  5685. proto.google.protobuf.MessageOptions.prototype.getMessageSetWireFormat = function() {
  5686. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
  5687. };
  5688. /**
  5689. * @param {boolean} value
  5690. * @return {!proto.google.protobuf.MessageOptions} returns this
  5691. */
  5692. proto.google.protobuf.MessageOptions.prototype.setMessageSetWireFormat = function(value) {
  5693. return jspb.Message.setField(this, 1, value);
  5694. };
  5695. /**
  5696. * Clears the field making it undefined.
  5697. * @return {!proto.google.protobuf.MessageOptions} returns this
  5698. */
  5699. proto.google.protobuf.MessageOptions.prototype.clearMessageSetWireFormat = function() {
  5700. return jspb.Message.setField(this, 1, undefined);
  5701. };
  5702. /**
  5703. * Returns whether this field is set.
  5704. * @return {boolean}
  5705. */
  5706. proto.google.protobuf.MessageOptions.prototype.hasMessageSetWireFormat = function() {
  5707. return jspb.Message.getField(this, 1) != null;
  5708. };
  5709. /**
  5710. * optional bool no_standard_descriptor_accessor = 2;
  5711. * @return {boolean}
  5712. */
  5713. proto.google.protobuf.MessageOptions.prototype.getNoStandardDescriptorAccessor = function() {
  5714. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
  5715. };
  5716. /**
  5717. * @param {boolean} value
  5718. * @return {!proto.google.protobuf.MessageOptions} returns this
  5719. */
  5720. proto.google.protobuf.MessageOptions.prototype.setNoStandardDescriptorAccessor = function(value) {
  5721. return jspb.Message.setField(this, 2, value);
  5722. };
  5723. /**
  5724. * Clears the field making it undefined.
  5725. * @return {!proto.google.protobuf.MessageOptions} returns this
  5726. */
  5727. proto.google.protobuf.MessageOptions.prototype.clearNoStandardDescriptorAccessor = function() {
  5728. return jspb.Message.setField(this, 2, undefined);
  5729. };
  5730. /**
  5731. * Returns whether this field is set.
  5732. * @return {boolean}
  5733. */
  5734. proto.google.protobuf.MessageOptions.prototype.hasNoStandardDescriptorAccessor = function() {
  5735. return jspb.Message.getField(this, 2) != null;
  5736. };
  5737. /**
  5738. * optional bool deprecated = 3;
  5739. * @return {boolean}
  5740. */
  5741. proto.google.protobuf.MessageOptions.prototype.getDeprecated = function() {
  5742. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
  5743. };
  5744. /**
  5745. * @param {boolean} value
  5746. * @return {!proto.google.protobuf.MessageOptions} returns this
  5747. */
  5748. proto.google.protobuf.MessageOptions.prototype.setDeprecated = function(value) {
  5749. return jspb.Message.setField(this, 3, value);
  5750. };
  5751. /**
  5752. * Clears the field making it undefined.
  5753. * @return {!proto.google.protobuf.MessageOptions} returns this
  5754. */
  5755. proto.google.protobuf.MessageOptions.prototype.clearDeprecated = function() {
  5756. return jspb.Message.setField(this, 3, undefined);
  5757. };
  5758. /**
  5759. * Returns whether this field is set.
  5760. * @return {boolean}
  5761. */
  5762. proto.google.protobuf.MessageOptions.prototype.hasDeprecated = function() {
  5763. return jspb.Message.getField(this, 3) != null;
  5764. };
  5765. /**
  5766. * optional bool map_entry = 7;
  5767. * @return {boolean}
  5768. */
  5769. proto.google.protobuf.MessageOptions.prototype.getMapEntry = function() {
  5770. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
  5771. };
  5772. /**
  5773. * @param {boolean} value
  5774. * @return {!proto.google.protobuf.MessageOptions} returns this
  5775. */
  5776. proto.google.protobuf.MessageOptions.prototype.setMapEntry = function(value) {
  5777. return jspb.Message.setField(this, 7, value);
  5778. };
  5779. /**
  5780. * Clears the field making it undefined.
  5781. * @return {!proto.google.protobuf.MessageOptions} returns this
  5782. */
  5783. proto.google.protobuf.MessageOptions.prototype.clearMapEntry = function() {
  5784. return jspb.Message.setField(this, 7, undefined);
  5785. };
  5786. /**
  5787. * Returns whether this field is set.
  5788. * @return {boolean}
  5789. */
  5790. proto.google.protobuf.MessageOptions.prototype.hasMapEntry = function() {
  5791. return jspb.Message.getField(this, 7) != null;
  5792. };
  5793. /**
  5794. * repeated UninterpretedOption uninterpreted_option = 999;
  5795. * @return {!Array<!proto.google.protobuf.UninterpretedOption>}
  5796. */
  5797. proto.google.protobuf.MessageOptions.prototype.getUninterpretedOptionList = function() {
  5798. return /** @type{!Array<!proto.google.protobuf.UninterpretedOption>} */ (
  5799. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999));
  5800. };
  5801. /**
  5802. * @param {!Array<!proto.google.protobuf.UninterpretedOption>} value
  5803. * @return {!proto.google.protobuf.MessageOptions} returns this
  5804. */
  5805. proto.google.protobuf.MessageOptions.prototype.setUninterpretedOptionList = function(value) {
  5806. return jspb.Message.setRepeatedWrapperField(this, 999, value);
  5807. };
  5808. /**
  5809. * @param {!proto.google.protobuf.UninterpretedOption=} opt_value
  5810. * @param {number=} opt_index
  5811. * @return {!proto.google.protobuf.UninterpretedOption}
  5812. */
  5813. proto.google.protobuf.MessageOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) {
  5814. return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index);
  5815. };
  5816. /**
  5817. * Clears the list making it empty but non-null.
  5818. * @return {!proto.google.protobuf.MessageOptions} returns this
  5819. */
  5820. proto.google.protobuf.MessageOptions.prototype.clearUninterpretedOptionList = function() {
  5821. return this.setUninterpretedOptionList([]);
  5822. };
  5823. /**
  5824. * List of repeated fields within this message type.
  5825. * @private {!Array<number>}
  5826. * @const
  5827. */
  5828. proto.google.protobuf.FieldOptions.repeatedFields_ = [999];
  5829. if (jspb.Message.GENERATE_TO_OBJECT) {
  5830. /**
  5831. * Creates an object representation of this proto.
  5832. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  5833. * Optional fields that are not set will be set to undefined.
  5834. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  5835. * For the list of reserved names please see:
  5836. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  5837. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  5838. * JSPB instance for transitional soy proto support:
  5839. * http://goto/soy-param-migration
  5840. * @return {!Object}
  5841. */
  5842. proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInstance) {
  5843. return proto.google.protobuf.FieldOptions.toObject(opt_includeInstance, this);
  5844. };
  5845. /**
  5846. * Static version of the {@see toObject} method.
  5847. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  5848. * the JSPB instance for transitional soy proto support:
  5849. * http://goto/soy-param-migration
  5850. * @param {!proto.google.protobuf.FieldOptions} msg The msg instance to transform.
  5851. * @return {!Object}
  5852. * @suppress {unusedLocalVariables} f is only used for nested messages
  5853. */
  5854. proto.google.protobuf.FieldOptions.toObject = function(includeInstance, msg) {
  5855. var f, obj = {
  5856. ctype: jspb.Message.getFieldWithDefault(msg, 1, 0),
  5857. packed: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f,
  5858. jstype: jspb.Message.getFieldWithDefault(msg, 6, 0),
  5859. lazy: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
  5860. deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
  5861. weak: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
  5862. uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(),
  5863. proto.google.protobuf.UninterpretedOption.toObject, includeInstance)
  5864. };
  5865. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  5866. proto.google.protobuf.FieldOptions.extensions, proto.google.protobuf.FieldOptions.prototype.getExtension,
  5867. includeInstance);
  5868. if (includeInstance) {
  5869. obj.$jspbMessageInstance = msg;
  5870. }
  5871. return obj;
  5872. };
  5873. }
  5874. /**
  5875. * Deserializes binary data (in protobuf wire format).
  5876. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  5877. * @return {!proto.google.protobuf.FieldOptions}
  5878. */
  5879. proto.google.protobuf.FieldOptions.deserializeBinary = function(bytes) {
  5880. var reader = new jspb.BinaryReader(bytes);
  5881. var msg = new proto.google.protobuf.FieldOptions;
  5882. return proto.google.protobuf.FieldOptions.deserializeBinaryFromReader(msg, reader);
  5883. };
  5884. /**
  5885. * Deserializes binary data (in protobuf wire format) from the
  5886. * given reader into the given message object.
  5887. * @param {!proto.google.protobuf.FieldOptions} msg The message object to deserialize into.
  5888. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  5889. * @return {!proto.google.protobuf.FieldOptions}
  5890. */
  5891. proto.google.protobuf.FieldOptions.deserializeBinaryFromReader = function(msg, reader) {
  5892. while (reader.nextField()) {
  5893. if (reader.isEndGroup()) {
  5894. break;
  5895. }
  5896. var field = reader.getFieldNumber();
  5897. switch (field) {
  5898. case 1:
  5899. var value = /** @type {!proto.google.protobuf.FieldOptions.CType} */ (reader.readEnum());
  5900. msg.setCtype(value);
  5901. break;
  5902. case 2:
  5903. var value = /** @type {boolean} */ (reader.readBool());
  5904. msg.setPacked(value);
  5905. break;
  5906. case 6:
  5907. var value = /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (reader.readEnum());
  5908. msg.setJstype(value);
  5909. break;
  5910. case 5:
  5911. var value = /** @type {boolean} */ (reader.readBool());
  5912. msg.setLazy(value);
  5913. break;
  5914. case 3:
  5915. var value = /** @type {boolean} */ (reader.readBool());
  5916. msg.setDeprecated(value);
  5917. break;
  5918. case 10:
  5919. var value = /** @type {boolean} */ (reader.readBool());
  5920. msg.setWeak(value);
  5921. break;
  5922. case 999:
  5923. var value = new proto.google.protobuf.UninterpretedOption;
  5924. reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader);
  5925. msg.addUninterpretedOption(value);
  5926. break;
  5927. default:
  5928. jspb.Message.readBinaryExtension(msg, reader,
  5929. proto.google.protobuf.FieldOptions.extensionsBinary,
  5930. proto.google.protobuf.FieldOptions.prototype.getExtension,
  5931. proto.google.protobuf.FieldOptions.prototype.setExtension);
  5932. break;
  5933. }
  5934. }
  5935. return msg;
  5936. };
  5937. /**
  5938. * Serializes the message to binary data (in protobuf wire format).
  5939. * @return {!Uint8Array}
  5940. */
  5941. proto.google.protobuf.FieldOptions.prototype.serializeBinary = function() {
  5942. var writer = new jspb.BinaryWriter();
  5943. proto.google.protobuf.FieldOptions.serializeBinaryToWriter(this, writer);
  5944. return writer.getResultBuffer();
  5945. };
  5946. /**
  5947. * Serializes the given message to binary data (in protobuf wire
  5948. * format), writing to the given BinaryWriter.
  5949. * @param {!proto.google.protobuf.FieldOptions} message
  5950. * @param {!jspb.BinaryWriter} writer
  5951. * @suppress {unusedLocalVariables} f is only used for nested messages
  5952. */
  5953. proto.google.protobuf.FieldOptions.serializeBinaryToWriter = function(message, writer) {
  5954. var f = undefined;
  5955. f = /** @type {!proto.google.protobuf.FieldOptions.CType} */ (jspb.Message.getField(message, 1));
  5956. if (f != null) {
  5957. writer.writeEnum(
  5958. 1,
  5959. f
  5960. );
  5961. }
  5962. f = /** @type {boolean} */ (jspb.Message.getField(message, 2));
  5963. if (f != null) {
  5964. writer.writeBool(
  5965. 2,
  5966. f
  5967. );
  5968. }
  5969. f = /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (jspb.Message.getField(message, 6));
  5970. if (f != null) {
  5971. writer.writeEnum(
  5972. 6,
  5973. f
  5974. );
  5975. }
  5976. f = /** @type {boolean} */ (jspb.Message.getField(message, 5));
  5977. if (f != null) {
  5978. writer.writeBool(
  5979. 5,
  5980. f
  5981. );
  5982. }
  5983. f = /** @type {boolean} */ (jspb.Message.getField(message, 3));
  5984. if (f != null) {
  5985. writer.writeBool(
  5986. 3,
  5987. f
  5988. );
  5989. }
  5990. f = /** @type {boolean} */ (jspb.Message.getField(message, 10));
  5991. if (f != null) {
  5992. writer.writeBool(
  5993. 10,
  5994. f
  5995. );
  5996. }
  5997. f = message.getUninterpretedOptionList();
  5998. if (f.length > 0) {
  5999. writer.writeRepeatedMessage(
  6000. 999,
  6001. f,
  6002. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter
  6003. );
  6004. }
  6005. jspb.Message.serializeBinaryExtensions(message, writer,
  6006. proto.google.protobuf.FieldOptions.extensionsBinary, proto.google.protobuf.FieldOptions.prototype.getExtension);
  6007. };
  6008. /**
  6009. * @enum {number}
  6010. */
  6011. proto.google.protobuf.FieldOptions.CType = {
  6012. STRING: 0,
  6013. CORD: 1,
  6014. STRING_PIECE: 2
  6015. };
  6016. /**
  6017. * @enum {number}
  6018. */
  6019. proto.google.protobuf.FieldOptions.JSType = {
  6020. JS_NORMAL: 0,
  6021. JS_STRING: 1,
  6022. JS_NUMBER: 2
  6023. };
  6024. /**
  6025. * optional CType ctype = 1;
  6026. * @return {!proto.google.protobuf.FieldOptions.CType}
  6027. */
  6028. proto.google.protobuf.FieldOptions.prototype.getCtype = function() {
  6029. return /** @type {!proto.google.protobuf.FieldOptions.CType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  6030. };
  6031. /**
  6032. * @param {!proto.google.protobuf.FieldOptions.CType} value
  6033. * @return {!proto.google.protobuf.FieldOptions} returns this
  6034. */
  6035. proto.google.protobuf.FieldOptions.prototype.setCtype = function(value) {
  6036. return jspb.Message.setField(this, 1, value);
  6037. };
  6038. /**
  6039. * Clears the field making it undefined.
  6040. * @return {!proto.google.protobuf.FieldOptions} returns this
  6041. */
  6042. proto.google.protobuf.FieldOptions.prototype.clearCtype = function() {
  6043. return jspb.Message.setField(this, 1, undefined);
  6044. };
  6045. /**
  6046. * Returns whether this field is set.
  6047. * @return {boolean}
  6048. */
  6049. proto.google.protobuf.FieldOptions.prototype.hasCtype = function() {
  6050. return jspb.Message.getField(this, 1) != null;
  6051. };
  6052. /**
  6053. * optional bool packed = 2;
  6054. * @return {boolean}
  6055. */
  6056. proto.google.protobuf.FieldOptions.prototype.getPacked = function() {
  6057. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
  6058. };
  6059. /**
  6060. * @param {boolean} value
  6061. * @return {!proto.google.protobuf.FieldOptions} returns this
  6062. */
  6063. proto.google.protobuf.FieldOptions.prototype.setPacked = function(value) {
  6064. return jspb.Message.setField(this, 2, value);
  6065. };
  6066. /**
  6067. * Clears the field making it undefined.
  6068. * @return {!proto.google.protobuf.FieldOptions} returns this
  6069. */
  6070. proto.google.protobuf.FieldOptions.prototype.clearPacked = function() {
  6071. return jspb.Message.setField(this, 2, undefined);
  6072. };
  6073. /**
  6074. * Returns whether this field is set.
  6075. * @return {boolean}
  6076. */
  6077. proto.google.protobuf.FieldOptions.prototype.hasPacked = function() {
  6078. return jspb.Message.getField(this, 2) != null;
  6079. };
  6080. /**
  6081. * optional JSType jstype = 6;
  6082. * @return {!proto.google.protobuf.FieldOptions.JSType}
  6083. */
  6084. proto.google.protobuf.FieldOptions.prototype.getJstype = function() {
  6085. return /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
  6086. };
  6087. /**
  6088. * @param {!proto.google.protobuf.FieldOptions.JSType} value
  6089. * @return {!proto.google.protobuf.FieldOptions} returns this
  6090. */
  6091. proto.google.protobuf.FieldOptions.prototype.setJstype = function(value) {
  6092. return jspb.Message.setField(this, 6, value);
  6093. };
  6094. /**
  6095. * Clears the field making it undefined.
  6096. * @return {!proto.google.protobuf.FieldOptions} returns this
  6097. */
  6098. proto.google.protobuf.FieldOptions.prototype.clearJstype = function() {
  6099. return jspb.Message.setField(this, 6, undefined);
  6100. };
  6101. /**
  6102. * Returns whether this field is set.
  6103. * @return {boolean}
  6104. */
  6105. proto.google.protobuf.FieldOptions.prototype.hasJstype = function() {
  6106. return jspb.Message.getField(this, 6) != null;
  6107. };
  6108. /**
  6109. * optional bool lazy = 5;
  6110. * @return {boolean}
  6111. */
  6112. proto.google.protobuf.FieldOptions.prototype.getLazy = function() {
  6113. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
  6114. };
  6115. /**
  6116. * @param {boolean} value
  6117. * @return {!proto.google.protobuf.FieldOptions} returns this
  6118. */
  6119. proto.google.protobuf.FieldOptions.prototype.setLazy = function(value) {
  6120. return jspb.Message.setField(this, 5, value);
  6121. };
  6122. /**
  6123. * Clears the field making it undefined.
  6124. * @return {!proto.google.protobuf.FieldOptions} returns this
  6125. */
  6126. proto.google.protobuf.FieldOptions.prototype.clearLazy = function() {
  6127. return jspb.Message.setField(this, 5, undefined);
  6128. };
  6129. /**
  6130. * Returns whether this field is set.
  6131. * @return {boolean}
  6132. */
  6133. proto.google.protobuf.FieldOptions.prototype.hasLazy = function() {
  6134. return jspb.Message.getField(this, 5) != null;
  6135. };
  6136. /**
  6137. * optional bool deprecated = 3;
  6138. * @return {boolean}
  6139. */
  6140. proto.google.protobuf.FieldOptions.prototype.getDeprecated = function() {
  6141. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
  6142. };
  6143. /**
  6144. * @param {boolean} value
  6145. * @return {!proto.google.protobuf.FieldOptions} returns this
  6146. */
  6147. proto.google.protobuf.FieldOptions.prototype.setDeprecated = function(value) {
  6148. return jspb.Message.setField(this, 3, value);
  6149. };
  6150. /**
  6151. * Clears the field making it undefined.
  6152. * @return {!proto.google.protobuf.FieldOptions} returns this
  6153. */
  6154. proto.google.protobuf.FieldOptions.prototype.clearDeprecated = function() {
  6155. return jspb.Message.setField(this, 3, undefined);
  6156. };
  6157. /**
  6158. * Returns whether this field is set.
  6159. * @return {boolean}
  6160. */
  6161. proto.google.protobuf.FieldOptions.prototype.hasDeprecated = function() {
  6162. return jspb.Message.getField(this, 3) != null;
  6163. };
  6164. /**
  6165. * optional bool weak = 10;
  6166. * @return {boolean}
  6167. */
  6168. proto.google.protobuf.FieldOptions.prototype.getWeak = function() {
  6169. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false));
  6170. };
  6171. /**
  6172. * @param {boolean} value
  6173. * @return {!proto.google.protobuf.FieldOptions} returns this
  6174. */
  6175. proto.google.protobuf.FieldOptions.prototype.setWeak = function(value) {
  6176. return jspb.Message.setField(this, 10, value);
  6177. };
  6178. /**
  6179. * Clears the field making it undefined.
  6180. * @return {!proto.google.protobuf.FieldOptions} returns this
  6181. */
  6182. proto.google.protobuf.FieldOptions.prototype.clearWeak = function() {
  6183. return jspb.Message.setField(this, 10, undefined);
  6184. };
  6185. /**
  6186. * Returns whether this field is set.
  6187. * @return {boolean}
  6188. */
  6189. proto.google.protobuf.FieldOptions.prototype.hasWeak = function() {
  6190. return jspb.Message.getField(this, 10) != null;
  6191. };
  6192. /**
  6193. * repeated UninterpretedOption uninterpreted_option = 999;
  6194. * @return {!Array<!proto.google.protobuf.UninterpretedOption>}
  6195. */
  6196. proto.google.protobuf.FieldOptions.prototype.getUninterpretedOptionList = function() {
  6197. return /** @type{!Array<!proto.google.protobuf.UninterpretedOption>} */ (
  6198. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999));
  6199. };
  6200. /**
  6201. * @param {!Array<!proto.google.protobuf.UninterpretedOption>} value
  6202. * @return {!proto.google.protobuf.FieldOptions} returns this
  6203. */
  6204. proto.google.protobuf.FieldOptions.prototype.setUninterpretedOptionList = function(value) {
  6205. return jspb.Message.setRepeatedWrapperField(this, 999, value);
  6206. };
  6207. /**
  6208. * @param {!proto.google.protobuf.UninterpretedOption=} opt_value
  6209. * @param {number=} opt_index
  6210. * @return {!proto.google.protobuf.UninterpretedOption}
  6211. */
  6212. proto.google.protobuf.FieldOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) {
  6213. return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index);
  6214. };
  6215. /**
  6216. * Clears the list making it empty but non-null.
  6217. * @return {!proto.google.protobuf.FieldOptions} returns this
  6218. */
  6219. proto.google.protobuf.FieldOptions.prototype.clearUninterpretedOptionList = function() {
  6220. return this.setUninterpretedOptionList([]);
  6221. };
  6222. /**
  6223. * List of repeated fields within this message type.
  6224. * @private {!Array<number>}
  6225. * @const
  6226. */
  6227. proto.google.protobuf.OneofOptions.repeatedFields_ = [999];
  6228. if (jspb.Message.GENERATE_TO_OBJECT) {
  6229. /**
  6230. * Creates an object representation of this proto.
  6231. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  6232. * Optional fields that are not set will be set to undefined.
  6233. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  6234. * For the list of reserved names please see:
  6235. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  6236. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  6237. * JSPB instance for transitional soy proto support:
  6238. * http://goto/soy-param-migration
  6239. * @return {!Object}
  6240. */
  6241. proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInstance) {
  6242. return proto.google.protobuf.OneofOptions.toObject(opt_includeInstance, this);
  6243. };
  6244. /**
  6245. * Static version of the {@see toObject} method.
  6246. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  6247. * the JSPB instance for transitional soy proto support:
  6248. * http://goto/soy-param-migration
  6249. * @param {!proto.google.protobuf.OneofOptions} msg The msg instance to transform.
  6250. * @return {!Object}
  6251. * @suppress {unusedLocalVariables} f is only used for nested messages
  6252. */
  6253. proto.google.protobuf.OneofOptions.toObject = function(includeInstance, msg) {
  6254. var f, obj = {
  6255. uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(),
  6256. proto.google.protobuf.UninterpretedOption.toObject, includeInstance)
  6257. };
  6258. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  6259. proto.google.protobuf.OneofOptions.extensions, proto.google.protobuf.OneofOptions.prototype.getExtension,
  6260. includeInstance);
  6261. if (includeInstance) {
  6262. obj.$jspbMessageInstance = msg;
  6263. }
  6264. return obj;
  6265. };
  6266. }
  6267. /**
  6268. * Deserializes binary data (in protobuf wire format).
  6269. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  6270. * @return {!proto.google.protobuf.OneofOptions}
  6271. */
  6272. proto.google.protobuf.OneofOptions.deserializeBinary = function(bytes) {
  6273. var reader = new jspb.BinaryReader(bytes);
  6274. var msg = new proto.google.protobuf.OneofOptions;
  6275. return proto.google.protobuf.OneofOptions.deserializeBinaryFromReader(msg, reader);
  6276. };
  6277. /**
  6278. * Deserializes binary data (in protobuf wire format) from the
  6279. * given reader into the given message object.
  6280. * @param {!proto.google.protobuf.OneofOptions} msg The message object to deserialize into.
  6281. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  6282. * @return {!proto.google.protobuf.OneofOptions}
  6283. */
  6284. proto.google.protobuf.OneofOptions.deserializeBinaryFromReader = function(msg, reader) {
  6285. while (reader.nextField()) {
  6286. if (reader.isEndGroup()) {
  6287. break;
  6288. }
  6289. var field = reader.getFieldNumber();
  6290. switch (field) {
  6291. case 999:
  6292. var value = new proto.google.protobuf.UninterpretedOption;
  6293. reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader);
  6294. msg.addUninterpretedOption(value);
  6295. break;
  6296. default:
  6297. jspb.Message.readBinaryExtension(msg, reader,
  6298. proto.google.protobuf.OneofOptions.extensionsBinary,
  6299. proto.google.protobuf.OneofOptions.prototype.getExtension,
  6300. proto.google.protobuf.OneofOptions.prototype.setExtension);
  6301. break;
  6302. }
  6303. }
  6304. return msg;
  6305. };
  6306. /**
  6307. * Serializes the message to binary data (in protobuf wire format).
  6308. * @return {!Uint8Array}
  6309. */
  6310. proto.google.protobuf.OneofOptions.prototype.serializeBinary = function() {
  6311. var writer = new jspb.BinaryWriter();
  6312. proto.google.protobuf.OneofOptions.serializeBinaryToWriter(this, writer);
  6313. return writer.getResultBuffer();
  6314. };
  6315. /**
  6316. * Serializes the given message to binary data (in protobuf wire
  6317. * format), writing to the given BinaryWriter.
  6318. * @param {!proto.google.protobuf.OneofOptions} message
  6319. * @param {!jspb.BinaryWriter} writer
  6320. * @suppress {unusedLocalVariables} f is only used for nested messages
  6321. */
  6322. proto.google.protobuf.OneofOptions.serializeBinaryToWriter = function(message, writer) {
  6323. var f = undefined;
  6324. f = message.getUninterpretedOptionList();
  6325. if (f.length > 0) {
  6326. writer.writeRepeatedMessage(
  6327. 999,
  6328. f,
  6329. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter
  6330. );
  6331. }
  6332. jspb.Message.serializeBinaryExtensions(message, writer,
  6333. proto.google.protobuf.OneofOptions.extensionsBinary, proto.google.protobuf.OneofOptions.prototype.getExtension);
  6334. };
  6335. /**
  6336. * repeated UninterpretedOption uninterpreted_option = 999;
  6337. * @return {!Array<!proto.google.protobuf.UninterpretedOption>}
  6338. */
  6339. proto.google.protobuf.OneofOptions.prototype.getUninterpretedOptionList = function() {
  6340. return /** @type{!Array<!proto.google.protobuf.UninterpretedOption>} */ (
  6341. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999));
  6342. };
  6343. /**
  6344. * @param {!Array<!proto.google.protobuf.UninterpretedOption>} value
  6345. * @return {!proto.google.protobuf.OneofOptions} returns this
  6346. */
  6347. proto.google.protobuf.OneofOptions.prototype.setUninterpretedOptionList = function(value) {
  6348. return jspb.Message.setRepeatedWrapperField(this, 999, value);
  6349. };
  6350. /**
  6351. * @param {!proto.google.protobuf.UninterpretedOption=} opt_value
  6352. * @param {number=} opt_index
  6353. * @return {!proto.google.protobuf.UninterpretedOption}
  6354. */
  6355. proto.google.protobuf.OneofOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) {
  6356. return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index);
  6357. };
  6358. /**
  6359. * Clears the list making it empty but non-null.
  6360. * @return {!proto.google.protobuf.OneofOptions} returns this
  6361. */
  6362. proto.google.protobuf.OneofOptions.prototype.clearUninterpretedOptionList = function() {
  6363. return this.setUninterpretedOptionList([]);
  6364. };
  6365. /**
  6366. * List of repeated fields within this message type.
  6367. * @private {!Array<number>}
  6368. * @const
  6369. */
  6370. proto.google.protobuf.EnumOptions.repeatedFields_ = [999];
  6371. if (jspb.Message.GENERATE_TO_OBJECT) {
  6372. /**
  6373. * Creates an object representation of this proto.
  6374. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  6375. * Optional fields that are not set will be set to undefined.
  6376. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  6377. * For the list of reserved names please see:
  6378. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  6379. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  6380. * JSPB instance for transitional soy proto support:
  6381. * http://goto/soy-param-migration
  6382. * @return {!Object}
  6383. */
  6384. proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInstance) {
  6385. return proto.google.protobuf.EnumOptions.toObject(opt_includeInstance, this);
  6386. };
  6387. /**
  6388. * Static version of the {@see toObject} method.
  6389. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  6390. * the JSPB instance for transitional soy proto support:
  6391. * http://goto/soy-param-migration
  6392. * @param {!proto.google.protobuf.EnumOptions} msg The msg instance to transform.
  6393. * @return {!Object}
  6394. * @suppress {unusedLocalVariables} f is only used for nested messages
  6395. */
  6396. proto.google.protobuf.EnumOptions.toObject = function(includeInstance, msg) {
  6397. var f, obj = {
  6398. allowAlias: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f,
  6399. deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
  6400. uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(),
  6401. proto.google.protobuf.UninterpretedOption.toObject, includeInstance)
  6402. };
  6403. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  6404. proto.google.protobuf.EnumOptions.extensions, proto.google.protobuf.EnumOptions.prototype.getExtension,
  6405. includeInstance);
  6406. if (includeInstance) {
  6407. obj.$jspbMessageInstance = msg;
  6408. }
  6409. return obj;
  6410. };
  6411. }
  6412. /**
  6413. * Deserializes binary data (in protobuf wire format).
  6414. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  6415. * @return {!proto.google.protobuf.EnumOptions}
  6416. */
  6417. proto.google.protobuf.EnumOptions.deserializeBinary = function(bytes) {
  6418. var reader = new jspb.BinaryReader(bytes);
  6419. var msg = new proto.google.protobuf.EnumOptions;
  6420. return proto.google.protobuf.EnumOptions.deserializeBinaryFromReader(msg, reader);
  6421. };
  6422. /**
  6423. * Deserializes binary data (in protobuf wire format) from the
  6424. * given reader into the given message object.
  6425. * @param {!proto.google.protobuf.EnumOptions} msg The message object to deserialize into.
  6426. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  6427. * @return {!proto.google.protobuf.EnumOptions}
  6428. */
  6429. proto.google.protobuf.EnumOptions.deserializeBinaryFromReader = function(msg, reader) {
  6430. while (reader.nextField()) {
  6431. if (reader.isEndGroup()) {
  6432. break;
  6433. }
  6434. var field = reader.getFieldNumber();
  6435. switch (field) {
  6436. case 2:
  6437. var value = /** @type {boolean} */ (reader.readBool());
  6438. msg.setAllowAlias(value);
  6439. break;
  6440. case 3:
  6441. var value = /** @type {boolean} */ (reader.readBool());
  6442. msg.setDeprecated(value);
  6443. break;
  6444. case 999:
  6445. var value = new proto.google.protobuf.UninterpretedOption;
  6446. reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader);
  6447. msg.addUninterpretedOption(value);
  6448. break;
  6449. default:
  6450. jspb.Message.readBinaryExtension(msg, reader,
  6451. proto.google.protobuf.EnumOptions.extensionsBinary,
  6452. proto.google.protobuf.EnumOptions.prototype.getExtension,
  6453. proto.google.protobuf.EnumOptions.prototype.setExtension);
  6454. break;
  6455. }
  6456. }
  6457. return msg;
  6458. };
  6459. /**
  6460. * Serializes the message to binary data (in protobuf wire format).
  6461. * @return {!Uint8Array}
  6462. */
  6463. proto.google.protobuf.EnumOptions.prototype.serializeBinary = function() {
  6464. var writer = new jspb.BinaryWriter();
  6465. proto.google.protobuf.EnumOptions.serializeBinaryToWriter(this, writer);
  6466. return writer.getResultBuffer();
  6467. };
  6468. /**
  6469. * Serializes the given message to binary data (in protobuf wire
  6470. * format), writing to the given BinaryWriter.
  6471. * @param {!proto.google.protobuf.EnumOptions} message
  6472. * @param {!jspb.BinaryWriter} writer
  6473. * @suppress {unusedLocalVariables} f is only used for nested messages
  6474. */
  6475. proto.google.protobuf.EnumOptions.serializeBinaryToWriter = function(message, writer) {
  6476. var f = undefined;
  6477. f = /** @type {boolean} */ (jspb.Message.getField(message, 2));
  6478. if (f != null) {
  6479. writer.writeBool(
  6480. 2,
  6481. f
  6482. );
  6483. }
  6484. f = /** @type {boolean} */ (jspb.Message.getField(message, 3));
  6485. if (f != null) {
  6486. writer.writeBool(
  6487. 3,
  6488. f
  6489. );
  6490. }
  6491. f = message.getUninterpretedOptionList();
  6492. if (f.length > 0) {
  6493. writer.writeRepeatedMessage(
  6494. 999,
  6495. f,
  6496. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter
  6497. );
  6498. }
  6499. jspb.Message.serializeBinaryExtensions(message, writer,
  6500. proto.google.protobuf.EnumOptions.extensionsBinary, proto.google.protobuf.EnumOptions.prototype.getExtension);
  6501. };
  6502. /**
  6503. * optional bool allow_alias = 2;
  6504. * @return {boolean}
  6505. */
  6506. proto.google.protobuf.EnumOptions.prototype.getAllowAlias = function() {
  6507. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
  6508. };
  6509. /**
  6510. * @param {boolean} value
  6511. * @return {!proto.google.protobuf.EnumOptions} returns this
  6512. */
  6513. proto.google.protobuf.EnumOptions.prototype.setAllowAlias = function(value) {
  6514. return jspb.Message.setField(this, 2, value);
  6515. };
  6516. /**
  6517. * Clears the field making it undefined.
  6518. * @return {!proto.google.protobuf.EnumOptions} returns this
  6519. */
  6520. proto.google.protobuf.EnumOptions.prototype.clearAllowAlias = function() {
  6521. return jspb.Message.setField(this, 2, undefined);
  6522. };
  6523. /**
  6524. * Returns whether this field is set.
  6525. * @return {boolean}
  6526. */
  6527. proto.google.protobuf.EnumOptions.prototype.hasAllowAlias = function() {
  6528. return jspb.Message.getField(this, 2) != null;
  6529. };
  6530. /**
  6531. * optional bool deprecated = 3;
  6532. * @return {boolean}
  6533. */
  6534. proto.google.protobuf.EnumOptions.prototype.getDeprecated = function() {
  6535. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
  6536. };
  6537. /**
  6538. * @param {boolean} value
  6539. * @return {!proto.google.protobuf.EnumOptions} returns this
  6540. */
  6541. proto.google.protobuf.EnumOptions.prototype.setDeprecated = function(value) {
  6542. return jspb.Message.setField(this, 3, value);
  6543. };
  6544. /**
  6545. * Clears the field making it undefined.
  6546. * @return {!proto.google.protobuf.EnumOptions} returns this
  6547. */
  6548. proto.google.protobuf.EnumOptions.prototype.clearDeprecated = function() {
  6549. return jspb.Message.setField(this, 3, undefined);
  6550. };
  6551. /**
  6552. * Returns whether this field is set.
  6553. * @return {boolean}
  6554. */
  6555. proto.google.protobuf.EnumOptions.prototype.hasDeprecated = function() {
  6556. return jspb.Message.getField(this, 3) != null;
  6557. };
  6558. /**
  6559. * repeated UninterpretedOption uninterpreted_option = 999;
  6560. * @return {!Array<!proto.google.protobuf.UninterpretedOption>}
  6561. */
  6562. proto.google.protobuf.EnumOptions.prototype.getUninterpretedOptionList = function() {
  6563. return /** @type{!Array<!proto.google.protobuf.UninterpretedOption>} */ (
  6564. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999));
  6565. };
  6566. /**
  6567. * @param {!Array<!proto.google.protobuf.UninterpretedOption>} value
  6568. * @return {!proto.google.protobuf.EnumOptions} returns this
  6569. */
  6570. proto.google.protobuf.EnumOptions.prototype.setUninterpretedOptionList = function(value) {
  6571. return jspb.Message.setRepeatedWrapperField(this, 999, value);
  6572. };
  6573. /**
  6574. * @param {!proto.google.protobuf.UninterpretedOption=} opt_value
  6575. * @param {number=} opt_index
  6576. * @return {!proto.google.protobuf.UninterpretedOption}
  6577. */
  6578. proto.google.protobuf.EnumOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) {
  6579. return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index);
  6580. };
  6581. /**
  6582. * Clears the list making it empty but non-null.
  6583. * @return {!proto.google.protobuf.EnumOptions} returns this
  6584. */
  6585. proto.google.protobuf.EnumOptions.prototype.clearUninterpretedOptionList = function() {
  6586. return this.setUninterpretedOptionList([]);
  6587. };
  6588. /**
  6589. * List of repeated fields within this message type.
  6590. * @private {!Array<number>}
  6591. * @const
  6592. */
  6593. proto.google.protobuf.EnumValueOptions.repeatedFields_ = [999];
  6594. if (jspb.Message.GENERATE_TO_OBJECT) {
  6595. /**
  6596. * Creates an object representation of this proto.
  6597. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  6598. * Optional fields that are not set will be set to undefined.
  6599. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  6600. * For the list of reserved names please see:
  6601. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  6602. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  6603. * JSPB instance for transitional soy proto support:
  6604. * http://goto/soy-param-migration
  6605. * @return {!Object}
  6606. */
  6607. proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_includeInstance) {
  6608. return proto.google.protobuf.EnumValueOptions.toObject(opt_includeInstance, this);
  6609. };
  6610. /**
  6611. * Static version of the {@see toObject} method.
  6612. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  6613. * the JSPB instance for transitional soy proto support:
  6614. * http://goto/soy-param-migration
  6615. * @param {!proto.google.protobuf.EnumValueOptions} msg The msg instance to transform.
  6616. * @return {!Object}
  6617. * @suppress {unusedLocalVariables} f is only used for nested messages
  6618. */
  6619. proto.google.protobuf.EnumValueOptions.toObject = function(includeInstance, msg) {
  6620. var f, obj = {
  6621. deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
  6622. uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(),
  6623. proto.google.protobuf.UninterpretedOption.toObject, includeInstance)
  6624. };
  6625. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  6626. proto.google.protobuf.EnumValueOptions.extensions, proto.google.protobuf.EnumValueOptions.prototype.getExtension,
  6627. includeInstance);
  6628. if (includeInstance) {
  6629. obj.$jspbMessageInstance = msg;
  6630. }
  6631. return obj;
  6632. };
  6633. }
  6634. /**
  6635. * Deserializes binary data (in protobuf wire format).
  6636. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  6637. * @return {!proto.google.protobuf.EnumValueOptions}
  6638. */
  6639. proto.google.protobuf.EnumValueOptions.deserializeBinary = function(bytes) {
  6640. var reader = new jspb.BinaryReader(bytes);
  6641. var msg = new proto.google.protobuf.EnumValueOptions;
  6642. return proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader(msg, reader);
  6643. };
  6644. /**
  6645. * Deserializes binary data (in protobuf wire format) from the
  6646. * given reader into the given message object.
  6647. * @param {!proto.google.protobuf.EnumValueOptions} msg The message object to deserialize into.
  6648. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  6649. * @return {!proto.google.protobuf.EnumValueOptions}
  6650. */
  6651. proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader = function(msg, reader) {
  6652. while (reader.nextField()) {
  6653. if (reader.isEndGroup()) {
  6654. break;
  6655. }
  6656. var field = reader.getFieldNumber();
  6657. switch (field) {
  6658. case 1:
  6659. var value = /** @type {boolean} */ (reader.readBool());
  6660. msg.setDeprecated(value);
  6661. break;
  6662. case 999:
  6663. var value = new proto.google.protobuf.UninterpretedOption;
  6664. reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader);
  6665. msg.addUninterpretedOption(value);
  6666. break;
  6667. default:
  6668. jspb.Message.readBinaryExtension(msg, reader,
  6669. proto.google.protobuf.EnumValueOptions.extensionsBinary,
  6670. proto.google.protobuf.EnumValueOptions.prototype.getExtension,
  6671. proto.google.protobuf.EnumValueOptions.prototype.setExtension);
  6672. break;
  6673. }
  6674. }
  6675. return msg;
  6676. };
  6677. /**
  6678. * Serializes the message to binary data (in protobuf wire format).
  6679. * @return {!Uint8Array}
  6680. */
  6681. proto.google.protobuf.EnumValueOptions.prototype.serializeBinary = function() {
  6682. var writer = new jspb.BinaryWriter();
  6683. proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter(this, writer);
  6684. return writer.getResultBuffer();
  6685. };
  6686. /**
  6687. * Serializes the given message to binary data (in protobuf wire
  6688. * format), writing to the given BinaryWriter.
  6689. * @param {!proto.google.protobuf.EnumValueOptions} message
  6690. * @param {!jspb.BinaryWriter} writer
  6691. * @suppress {unusedLocalVariables} f is only used for nested messages
  6692. */
  6693. proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter = function(message, writer) {
  6694. var f = undefined;
  6695. f = /** @type {boolean} */ (jspb.Message.getField(message, 1));
  6696. if (f != null) {
  6697. writer.writeBool(
  6698. 1,
  6699. f
  6700. );
  6701. }
  6702. f = message.getUninterpretedOptionList();
  6703. if (f.length > 0) {
  6704. writer.writeRepeatedMessage(
  6705. 999,
  6706. f,
  6707. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter
  6708. );
  6709. }
  6710. jspb.Message.serializeBinaryExtensions(message, writer,
  6711. proto.google.protobuf.EnumValueOptions.extensionsBinary, proto.google.protobuf.EnumValueOptions.prototype.getExtension);
  6712. };
  6713. /**
  6714. * optional bool deprecated = 1;
  6715. * @return {boolean}
  6716. */
  6717. proto.google.protobuf.EnumValueOptions.prototype.getDeprecated = function() {
  6718. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
  6719. };
  6720. /**
  6721. * @param {boolean} value
  6722. * @return {!proto.google.protobuf.EnumValueOptions} returns this
  6723. */
  6724. proto.google.protobuf.EnumValueOptions.prototype.setDeprecated = function(value) {
  6725. return jspb.Message.setField(this, 1, value);
  6726. };
  6727. /**
  6728. * Clears the field making it undefined.
  6729. * @return {!proto.google.protobuf.EnumValueOptions} returns this
  6730. */
  6731. proto.google.protobuf.EnumValueOptions.prototype.clearDeprecated = function() {
  6732. return jspb.Message.setField(this, 1, undefined);
  6733. };
  6734. /**
  6735. * Returns whether this field is set.
  6736. * @return {boolean}
  6737. */
  6738. proto.google.protobuf.EnumValueOptions.prototype.hasDeprecated = function() {
  6739. return jspb.Message.getField(this, 1) != null;
  6740. };
  6741. /**
  6742. * repeated UninterpretedOption uninterpreted_option = 999;
  6743. * @return {!Array<!proto.google.protobuf.UninterpretedOption>}
  6744. */
  6745. proto.google.protobuf.EnumValueOptions.prototype.getUninterpretedOptionList = function() {
  6746. return /** @type{!Array<!proto.google.protobuf.UninterpretedOption>} */ (
  6747. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999));
  6748. };
  6749. /**
  6750. * @param {!Array<!proto.google.protobuf.UninterpretedOption>} value
  6751. * @return {!proto.google.protobuf.EnumValueOptions} returns this
  6752. */
  6753. proto.google.protobuf.EnumValueOptions.prototype.setUninterpretedOptionList = function(value) {
  6754. return jspb.Message.setRepeatedWrapperField(this, 999, value);
  6755. };
  6756. /**
  6757. * @param {!proto.google.protobuf.UninterpretedOption=} opt_value
  6758. * @param {number=} opt_index
  6759. * @return {!proto.google.protobuf.UninterpretedOption}
  6760. */
  6761. proto.google.protobuf.EnumValueOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) {
  6762. return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index);
  6763. };
  6764. /**
  6765. * Clears the list making it empty but non-null.
  6766. * @return {!proto.google.protobuf.EnumValueOptions} returns this
  6767. */
  6768. proto.google.protobuf.EnumValueOptions.prototype.clearUninterpretedOptionList = function() {
  6769. return this.setUninterpretedOptionList([]);
  6770. };
  6771. /**
  6772. * List of repeated fields within this message type.
  6773. * @private {!Array<number>}
  6774. * @const
  6775. */
  6776. proto.google.protobuf.ServiceOptions.repeatedFields_ = [999];
  6777. if (jspb.Message.GENERATE_TO_OBJECT) {
  6778. /**
  6779. * Creates an object representation of this proto.
  6780. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  6781. * Optional fields that are not set will be set to undefined.
  6782. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  6783. * For the list of reserved names please see:
  6784. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  6785. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  6786. * JSPB instance for transitional soy proto support:
  6787. * http://goto/soy-param-migration
  6788. * @return {!Object}
  6789. */
  6790. proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeInstance) {
  6791. return proto.google.protobuf.ServiceOptions.toObject(opt_includeInstance, this);
  6792. };
  6793. /**
  6794. * Static version of the {@see toObject} method.
  6795. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  6796. * the JSPB instance for transitional soy proto support:
  6797. * http://goto/soy-param-migration
  6798. * @param {!proto.google.protobuf.ServiceOptions} msg The msg instance to transform.
  6799. * @return {!Object}
  6800. * @suppress {unusedLocalVariables} f is only used for nested messages
  6801. */
  6802. proto.google.protobuf.ServiceOptions.toObject = function(includeInstance, msg) {
  6803. var f, obj = {
  6804. deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false),
  6805. uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(),
  6806. proto.google.protobuf.UninterpretedOption.toObject, includeInstance)
  6807. };
  6808. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  6809. proto.google.protobuf.ServiceOptions.extensions, proto.google.protobuf.ServiceOptions.prototype.getExtension,
  6810. includeInstance);
  6811. if (includeInstance) {
  6812. obj.$jspbMessageInstance = msg;
  6813. }
  6814. return obj;
  6815. };
  6816. }
  6817. /**
  6818. * Deserializes binary data (in protobuf wire format).
  6819. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  6820. * @return {!proto.google.protobuf.ServiceOptions}
  6821. */
  6822. proto.google.protobuf.ServiceOptions.deserializeBinary = function(bytes) {
  6823. var reader = new jspb.BinaryReader(bytes);
  6824. var msg = new proto.google.protobuf.ServiceOptions;
  6825. return proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader(msg, reader);
  6826. };
  6827. /**
  6828. * Deserializes binary data (in protobuf wire format) from the
  6829. * given reader into the given message object.
  6830. * @param {!proto.google.protobuf.ServiceOptions} msg The message object to deserialize into.
  6831. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  6832. * @return {!proto.google.protobuf.ServiceOptions}
  6833. */
  6834. proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader = function(msg, reader) {
  6835. while (reader.nextField()) {
  6836. if (reader.isEndGroup()) {
  6837. break;
  6838. }
  6839. var field = reader.getFieldNumber();
  6840. switch (field) {
  6841. case 33:
  6842. var value = /** @type {boolean} */ (reader.readBool());
  6843. msg.setDeprecated(value);
  6844. break;
  6845. case 999:
  6846. var value = new proto.google.protobuf.UninterpretedOption;
  6847. reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader);
  6848. msg.addUninterpretedOption(value);
  6849. break;
  6850. default:
  6851. jspb.Message.readBinaryExtension(msg, reader,
  6852. proto.google.protobuf.ServiceOptions.extensionsBinary,
  6853. proto.google.protobuf.ServiceOptions.prototype.getExtension,
  6854. proto.google.protobuf.ServiceOptions.prototype.setExtension);
  6855. break;
  6856. }
  6857. }
  6858. return msg;
  6859. };
  6860. /**
  6861. * Serializes the message to binary data (in protobuf wire format).
  6862. * @return {!Uint8Array}
  6863. */
  6864. proto.google.protobuf.ServiceOptions.prototype.serializeBinary = function() {
  6865. var writer = new jspb.BinaryWriter();
  6866. proto.google.protobuf.ServiceOptions.serializeBinaryToWriter(this, writer);
  6867. return writer.getResultBuffer();
  6868. };
  6869. /**
  6870. * Serializes the given message to binary data (in protobuf wire
  6871. * format), writing to the given BinaryWriter.
  6872. * @param {!proto.google.protobuf.ServiceOptions} message
  6873. * @param {!jspb.BinaryWriter} writer
  6874. * @suppress {unusedLocalVariables} f is only used for nested messages
  6875. */
  6876. proto.google.protobuf.ServiceOptions.serializeBinaryToWriter = function(message, writer) {
  6877. var f = undefined;
  6878. f = /** @type {boolean} */ (jspb.Message.getField(message, 33));
  6879. if (f != null) {
  6880. writer.writeBool(
  6881. 33,
  6882. f
  6883. );
  6884. }
  6885. f = message.getUninterpretedOptionList();
  6886. if (f.length > 0) {
  6887. writer.writeRepeatedMessage(
  6888. 999,
  6889. f,
  6890. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter
  6891. );
  6892. }
  6893. jspb.Message.serializeBinaryExtensions(message, writer,
  6894. proto.google.protobuf.ServiceOptions.extensionsBinary, proto.google.protobuf.ServiceOptions.prototype.getExtension);
  6895. };
  6896. /**
  6897. * optional bool deprecated = 33;
  6898. * @return {boolean}
  6899. */
  6900. proto.google.protobuf.ServiceOptions.prototype.getDeprecated = function() {
  6901. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false));
  6902. };
  6903. /**
  6904. * @param {boolean} value
  6905. * @return {!proto.google.protobuf.ServiceOptions} returns this
  6906. */
  6907. proto.google.protobuf.ServiceOptions.prototype.setDeprecated = function(value) {
  6908. return jspb.Message.setField(this, 33, value);
  6909. };
  6910. /**
  6911. * Clears the field making it undefined.
  6912. * @return {!proto.google.protobuf.ServiceOptions} returns this
  6913. */
  6914. proto.google.protobuf.ServiceOptions.prototype.clearDeprecated = function() {
  6915. return jspb.Message.setField(this, 33, undefined);
  6916. };
  6917. /**
  6918. * Returns whether this field is set.
  6919. * @return {boolean}
  6920. */
  6921. proto.google.protobuf.ServiceOptions.prototype.hasDeprecated = function() {
  6922. return jspb.Message.getField(this, 33) != null;
  6923. };
  6924. /**
  6925. * repeated UninterpretedOption uninterpreted_option = 999;
  6926. * @return {!Array<!proto.google.protobuf.UninterpretedOption>}
  6927. */
  6928. proto.google.protobuf.ServiceOptions.prototype.getUninterpretedOptionList = function() {
  6929. return /** @type{!Array<!proto.google.protobuf.UninterpretedOption>} */ (
  6930. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999));
  6931. };
  6932. /**
  6933. * @param {!Array<!proto.google.protobuf.UninterpretedOption>} value
  6934. * @return {!proto.google.protobuf.ServiceOptions} returns this
  6935. */
  6936. proto.google.protobuf.ServiceOptions.prototype.setUninterpretedOptionList = function(value) {
  6937. return jspb.Message.setRepeatedWrapperField(this, 999, value);
  6938. };
  6939. /**
  6940. * @param {!proto.google.protobuf.UninterpretedOption=} opt_value
  6941. * @param {number=} opt_index
  6942. * @return {!proto.google.protobuf.UninterpretedOption}
  6943. */
  6944. proto.google.protobuf.ServiceOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) {
  6945. return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index);
  6946. };
  6947. /**
  6948. * Clears the list making it empty but non-null.
  6949. * @return {!proto.google.protobuf.ServiceOptions} returns this
  6950. */
  6951. proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList = function() {
  6952. return this.setUninterpretedOptionList([]);
  6953. };
  6954. /**
  6955. * List of repeated fields within this message type.
  6956. * @private {!Array<number>}
  6957. * @const
  6958. */
  6959. proto.google.protobuf.MethodOptions.repeatedFields_ = [999];
  6960. if (jspb.Message.GENERATE_TO_OBJECT) {
  6961. /**
  6962. * Creates an object representation of this proto.
  6963. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  6964. * Optional fields that are not set will be set to undefined.
  6965. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  6966. * For the list of reserved names please see:
  6967. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  6968. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  6969. * JSPB instance for transitional soy proto support:
  6970. * http://goto/soy-param-migration
  6971. * @return {!Object}
  6972. */
  6973. proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeInstance) {
  6974. return proto.google.protobuf.MethodOptions.toObject(opt_includeInstance, this);
  6975. };
  6976. /**
  6977. * Static version of the {@see toObject} method.
  6978. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  6979. * the JSPB instance for transitional soy proto support:
  6980. * http://goto/soy-param-migration
  6981. * @param {!proto.google.protobuf.MethodOptions} msg The msg instance to transform.
  6982. * @return {!Object}
  6983. * @suppress {unusedLocalVariables} f is only used for nested messages
  6984. */
  6985. proto.google.protobuf.MethodOptions.toObject = function(includeInstance, msg) {
  6986. var f, obj = {
  6987. deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false),
  6988. idempotencyLevel: jspb.Message.getFieldWithDefault(msg, 34, 0),
  6989. uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(),
  6990. proto.google.protobuf.UninterpretedOption.toObject, includeInstance)
  6991. };
  6992. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  6993. proto.google.protobuf.MethodOptions.extensions, proto.google.protobuf.MethodOptions.prototype.getExtension,
  6994. includeInstance);
  6995. if (includeInstance) {
  6996. obj.$jspbMessageInstance = msg;
  6997. }
  6998. return obj;
  6999. };
  7000. }
  7001. /**
  7002. * Deserializes binary data (in protobuf wire format).
  7003. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  7004. * @return {!proto.google.protobuf.MethodOptions}
  7005. */
  7006. proto.google.protobuf.MethodOptions.deserializeBinary = function(bytes) {
  7007. var reader = new jspb.BinaryReader(bytes);
  7008. var msg = new proto.google.protobuf.MethodOptions;
  7009. return proto.google.protobuf.MethodOptions.deserializeBinaryFromReader(msg, reader);
  7010. };
  7011. /**
  7012. * Deserializes binary data (in protobuf wire format) from the
  7013. * given reader into the given message object.
  7014. * @param {!proto.google.protobuf.MethodOptions} msg The message object to deserialize into.
  7015. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  7016. * @return {!proto.google.protobuf.MethodOptions}
  7017. */
  7018. proto.google.protobuf.MethodOptions.deserializeBinaryFromReader = function(msg, reader) {
  7019. while (reader.nextField()) {
  7020. if (reader.isEndGroup()) {
  7021. break;
  7022. }
  7023. var field = reader.getFieldNumber();
  7024. switch (field) {
  7025. case 33:
  7026. var value = /** @type {boolean} */ (reader.readBool());
  7027. msg.setDeprecated(value);
  7028. break;
  7029. case 34:
  7030. var value = /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (reader.readEnum());
  7031. msg.setIdempotencyLevel(value);
  7032. break;
  7033. case 999:
  7034. var value = new proto.google.protobuf.UninterpretedOption;
  7035. reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader);
  7036. msg.addUninterpretedOption(value);
  7037. break;
  7038. default:
  7039. jspb.Message.readBinaryExtension(msg, reader,
  7040. proto.google.protobuf.MethodOptions.extensionsBinary,
  7041. proto.google.protobuf.MethodOptions.prototype.getExtension,
  7042. proto.google.protobuf.MethodOptions.prototype.setExtension);
  7043. break;
  7044. }
  7045. }
  7046. return msg;
  7047. };
  7048. /**
  7049. * Serializes the message to binary data (in protobuf wire format).
  7050. * @return {!Uint8Array}
  7051. */
  7052. proto.google.protobuf.MethodOptions.prototype.serializeBinary = function() {
  7053. var writer = new jspb.BinaryWriter();
  7054. proto.google.protobuf.MethodOptions.serializeBinaryToWriter(this, writer);
  7055. return writer.getResultBuffer();
  7056. };
  7057. /**
  7058. * Serializes the given message to binary data (in protobuf wire
  7059. * format), writing to the given BinaryWriter.
  7060. * @param {!proto.google.protobuf.MethodOptions} message
  7061. * @param {!jspb.BinaryWriter} writer
  7062. * @suppress {unusedLocalVariables} f is only used for nested messages
  7063. */
  7064. proto.google.protobuf.MethodOptions.serializeBinaryToWriter = function(message, writer) {
  7065. var f = undefined;
  7066. f = /** @type {boolean} */ (jspb.Message.getField(message, 33));
  7067. if (f != null) {
  7068. writer.writeBool(
  7069. 33,
  7070. f
  7071. );
  7072. }
  7073. f = /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (jspb.Message.getField(message, 34));
  7074. if (f != null) {
  7075. writer.writeEnum(
  7076. 34,
  7077. f
  7078. );
  7079. }
  7080. f = message.getUninterpretedOptionList();
  7081. if (f.length > 0) {
  7082. writer.writeRepeatedMessage(
  7083. 999,
  7084. f,
  7085. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter
  7086. );
  7087. }
  7088. jspb.Message.serializeBinaryExtensions(message, writer,
  7089. proto.google.protobuf.MethodOptions.extensionsBinary, proto.google.protobuf.MethodOptions.prototype.getExtension);
  7090. };
  7091. /**
  7092. * @enum {number}
  7093. */
  7094. proto.google.protobuf.MethodOptions.IdempotencyLevel = {
  7095. IDEMPOTENCY_UNKNOWN: 0,
  7096. NO_SIDE_EFFECTS: 1,
  7097. IDEMPOTENT: 2
  7098. };
  7099. /**
  7100. * optional bool deprecated = 33;
  7101. * @return {boolean}
  7102. */
  7103. proto.google.protobuf.MethodOptions.prototype.getDeprecated = function() {
  7104. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false));
  7105. };
  7106. /**
  7107. * @param {boolean} value
  7108. * @return {!proto.google.protobuf.MethodOptions} returns this
  7109. */
  7110. proto.google.protobuf.MethodOptions.prototype.setDeprecated = function(value) {
  7111. return jspb.Message.setField(this, 33, value);
  7112. };
  7113. /**
  7114. * Clears the field making it undefined.
  7115. * @return {!proto.google.protobuf.MethodOptions} returns this
  7116. */
  7117. proto.google.protobuf.MethodOptions.prototype.clearDeprecated = function() {
  7118. return jspb.Message.setField(this, 33, undefined);
  7119. };
  7120. /**
  7121. * Returns whether this field is set.
  7122. * @return {boolean}
  7123. */
  7124. proto.google.protobuf.MethodOptions.prototype.hasDeprecated = function() {
  7125. return jspb.Message.getField(this, 33) != null;
  7126. };
  7127. /**
  7128. * optional IdempotencyLevel idempotency_level = 34;
  7129. * @return {!proto.google.protobuf.MethodOptions.IdempotencyLevel}
  7130. */
  7131. proto.google.protobuf.MethodOptions.prototype.getIdempotencyLevel = function() {
  7132. return /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (jspb.Message.getFieldWithDefault(this, 34, 0));
  7133. };
  7134. /**
  7135. * @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value
  7136. * @return {!proto.google.protobuf.MethodOptions} returns this
  7137. */
  7138. proto.google.protobuf.MethodOptions.prototype.setIdempotencyLevel = function(value) {
  7139. return jspb.Message.setField(this, 34, value);
  7140. };
  7141. /**
  7142. * Clears the field making it undefined.
  7143. * @return {!proto.google.protobuf.MethodOptions} returns this
  7144. */
  7145. proto.google.protobuf.MethodOptions.prototype.clearIdempotencyLevel = function() {
  7146. return jspb.Message.setField(this, 34, undefined);
  7147. };
  7148. /**
  7149. * Returns whether this field is set.
  7150. * @return {boolean}
  7151. */
  7152. proto.google.protobuf.MethodOptions.prototype.hasIdempotencyLevel = function() {
  7153. return jspb.Message.getField(this, 34) != null;
  7154. };
  7155. /**
  7156. * repeated UninterpretedOption uninterpreted_option = 999;
  7157. * @return {!Array<!proto.google.protobuf.UninterpretedOption>}
  7158. */
  7159. proto.google.protobuf.MethodOptions.prototype.getUninterpretedOptionList = function() {
  7160. return /** @type{!Array<!proto.google.protobuf.UninterpretedOption>} */ (
  7161. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999));
  7162. };
  7163. /**
  7164. * @param {!Array<!proto.google.protobuf.UninterpretedOption>} value
  7165. * @return {!proto.google.protobuf.MethodOptions} returns this
  7166. */
  7167. proto.google.protobuf.MethodOptions.prototype.setUninterpretedOptionList = function(value) {
  7168. return jspb.Message.setRepeatedWrapperField(this, 999, value);
  7169. };
  7170. /**
  7171. * @param {!proto.google.protobuf.UninterpretedOption=} opt_value
  7172. * @param {number=} opt_index
  7173. * @return {!proto.google.protobuf.UninterpretedOption}
  7174. */
  7175. proto.google.protobuf.MethodOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) {
  7176. return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index);
  7177. };
  7178. /**
  7179. * Clears the list making it empty but non-null.
  7180. * @return {!proto.google.protobuf.MethodOptions} returns this
  7181. */
  7182. proto.google.protobuf.MethodOptions.prototype.clearUninterpretedOptionList = function() {
  7183. return this.setUninterpretedOptionList([]);
  7184. };
  7185. /**
  7186. * List of repeated fields within this message type.
  7187. * @private {!Array<number>}
  7188. * @const
  7189. */
  7190. proto.google.protobuf.UninterpretedOption.repeatedFields_ = [2];
  7191. if (jspb.Message.GENERATE_TO_OBJECT) {
  7192. /**
  7193. * Creates an object representation of this proto.
  7194. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  7195. * Optional fields that are not set will be set to undefined.
  7196. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  7197. * For the list of reserved names please see:
  7198. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  7199. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  7200. * JSPB instance for transitional soy proto support:
  7201. * http://goto/soy-param-migration
  7202. * @return {!Object}
  7203. */
  7204. proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_includeInstance) {
  7205. return proto.google.protobuf.UninterpretedOption.toObject(opt_includeInstance, this);
  7206. };
  7207. /**
  7208. * Static version of the {@see toObject} method.
  7209. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  7210. * the JSPB instance for transitional soy proto support:
  7211. * http://goto/soy-param-migration
  7212. * @param {!proto.google.protobuf.UninterpretedOption} msg The msg instance to transform.
  7213. * @return {!Object}
  7214. * @suppress {unusedLocalVariables} f is only used for nested messages
  7215. */
  7216. proto.google.protobuf.UninterpretedOption.toObject = function(includeInstance, msg) {
  7217. var f, obj = {
  7218. nameList: jspb.Message.toObjectList(msg.getNameList(),
  7219. proto.google.protobuf.UninterpretedOption.NamePart.toObject, includeInstance),
  7220. identifierValue: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
  7221. positiveIntValue: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
  7222. negativeIntValue: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f,
  7223. doubleValue: (f = jspb.Message.getOptionalFloatingPointField(msg, 6)) == null ? undefined : f,
  7224. stringValue: msg.getStringValue_asB64(),
  7225. aggregateValue: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f
  7226. };
  7227. if (includeInstance) {
  7228. obj.$jspbMessageInstance = msg;
  7229. }
  7230. return obj;
  7231. };
  7232. }
  7233. /**
  7234. * Deserializes binary data (in protobuf wire format).
  7235. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  7236. * @return {!proto.google.protobuf.UninterpretedOption}
  7237. */
  7238. proto.google.protobuf.UninterpretedOption.deserializeBinary = function(bytes) {
  7239. var reader = new jspb.BinaryReader(bytes);
  7240. var msg = new proto.google.protobuf.UninterpretedOption;
  7241. return proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader(msg, reader);
  7242. };
  7243. /**
  7244. * Deserializes binary data (in protobuf wire format) from the
  7245. * given reader into the given message object.
  7246. * @param {!proto.google.protobuf.UninterpretedOption} msg The message object to deserialize into.
  7247. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  7248. * @return {!proto.google.protobuf.UninterpretedOption}
  7249. */
  7250. proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader = function(msg, reader) {
  7251. while (reader.nextField()) {
  7252. if (reader.isEndGroup()) {
  7253. break;
  7254. }
  7255. var field = reader.getFieldNumber();
  7256. switch (field) {
  7257. case 2:
  7258. var value = new proto.google.protobuf.UninterpretedOption.NamePart;
  7259. reader.readMessage(value,proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader);
  7260. msg.addName(value);
  7261. break;
  7262. case 3:
  7263. var value = /** @type {string} */ (reader.readString());
  7264. msg.setIdentifierValue(value);
  7265. break;
  7266. case 4:
  7267. var value = /** @type {number} */ (reader.readUint64());
  7268. msg.setPositiveIntValue(value);
  7269. break;
  7270. case 5:
  7271. var value = /** @type {number} */ (reader.readInt64());
  7272. msg.setNegativeIntValue(value);
  7273. break;
  7274. case 6:
  7275. var value = /** @type {number} */ (reader.readDouble());
  7276. msg.setDoubleValue(value);
  7277. break;
  7278. case 7:
  7279. var value = /** @type {!Uint8Array} */ (reader.readBytes());
  7280. msg.setStringValue(value);
  7281. break;
  7282. case 8:
  7283. var value = /** @type {string} */ (reader.readString());
  7284. msg.setAggregateValue(value);
  7285. break;
  7286. default:
  7287. reader.skipField();
  7288. break;
  7289. }
  7290. }
  7291. return msg;
  7292. };
  7293. /**
  7294. * Serializes the message to binary data (in protobuf wire format).
  7295. * @return {!Uint8Array}
  7296. */
  7297. proto.google.protobuf.UninterpretedOption.prototype.serializeBinary = function() {
  7298. var writer = new jspb.BinaryWriter();
  7299. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter(this, writer);
  7300. return writer.getResultBuffer();
  7301. };
  7302. /**
  7303. * Serializes the given message to binary data (in protobuf wire
  7304. * format), writing to the given BinaryWriter.
  7305. * @param {!proto.google.protobuf.UninterpretedOption} message
  7306. * @param {!jspb.BinaryWriter} writer
  7307. * @suppress {unusedLocalVariables} f is only used for nested messages
  7308. */
  7309. proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter = function(message, writer) {
  7310. var f = undefined;
  7311. f = message.getNameList();
  7312. if (f.length > 0) {
  7313. writer.writeRepeatedMessage(
  7314. 2,
  7315. f,
  7316. proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter
  7317. );
  7318. }
  7319. f = /** @type {string} */ (jspb.Message.getField(message, 3));
  7320. if (f != null) {
  7321. writer.writeString(
  7322. 3,
  7323. f
  7324. );
  7325. }
  7326. f = /** @type {number} */ (jspb.Message.getField(message, 4));
  7327. if (f != null) {
  7328. writer.writeUint64(
  7329. 4,
  7330. f
  7331. );
  7332. }
  7333. f = /** @type {number} */ (jspb.Message.getField(message, 5));
  7334. if (f != null) {
  7335. writer.writeInt64(
  7336. 5,
  7337. f
  7338. );
  7339. }
  7340. f = /** @type {number} */ (jspb.Message.getField(message, 6));
  7341. if (f != null) {
  7342. writer.writeDouble(
  7343. 6,
  7344. f
  7345. );
  7346. }
  7347. f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7));
  7348. if (f != null) {
  7349. writer.writeBytes(
  7350. 7,
  7351. f
  7352. );
  7353. }
  7354. f = /** @type {string} */ (jspb.Message.getField(message, 8));
  7355. if (f != null) {
  7356. writer.writeString(
  7357. 8,
  7358. f
  7359. );
  7360. }
  7361. };
  7362. if (jspb.Message.GENERATE_TO_OBJECT) {
  7363. /**
  7364. * Creates an object representation of this proto.
  7365. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  7366. * Optional fields that are not set will be set to undefined.
  7367. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  7368. * For the list of reserved names please see:
  7369. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  7370. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  7371. * JSPB instance for transitional soy proto support:
  7372. * http://goto/soy-param-migration
  7373. * @return {!Object}
  7374. */
  7375. proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function(opt_includeInstance) {
  7376. return proto.google.protobuf.UninterpretedOption.NamePart.toObject(opt_includeInstance, this);
  7377. };
  7378. /**
  7379. * Static version of the {@see toObject} method.
  7380. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  7381. * the JSPB instance for transitional soy proto support:
  7382. * http://goto/soy-param-migration
  7383. * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The msg instance to transform.
  7384. * @return {!Object}
  7385. * @suppress {unusedLocalVariables} f is only used for nested messages
  7386. */
  7387. proto.google.protobuf.UninterpretedOption.NamePart.toObject = function(includeInstance, msg) {
  7388. var f, obj = {
  7389. namePart: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  7390. isExtension: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f
  7391. };
  7392. if (includeInstance) {
  7393. obj.$jspbMessageInstance = msg;
  7394. }
  7395. return obj;
  7396. };
  7397. }
  7398. /**
  7399. * Deserializes binary data (in protobuf wire format).
  7400. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  7401. * @return {!proto.google.protobuf.UninterpretedOption.NamePart}
  7402. */
  7403. proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinary = function(bytes) {
  7404. var reader = new jspb.BinaryReader(bytes);
  7405. var msg = new proto.google.protobuf.UninterpretedOption.NamePart;
  7406. return proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader(msg, reader);
  7407. };
  7408. /**
  7409. * Deserializes binary data (in protobuf wire format) from the
  7410. * given reader into the given message object.
  7411. * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The message object to deserialize into.
  7412. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  7413. * @return {!proto.google.protobuf.UninterpretedOption.NamePart}
  7414. */
  7415. proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader = function(msg, reader) {
  7416. while (reader.nextField()) {
  7417. if (reader.isEndGroup()) {
  7418. break;
  7419. }
  7420. var field = reader.getFieldNumber();
  7421. switch (field) {
  7422. case 1:
  7423. var value = /** @type {string} */ (reader.readString());
  7424. msg.setNamePart(value);
  7425. break;
  7426. case 2:
  7427. var value = /** @type {boolean} */ (reader.readBool());
  7428. msg.setIsExtension(value);
  7429. break;
  7430. default:
  7431. reader.skipField();
  7432. break;
  7433. }
  7434. }
  7435. return msg;
  7436. };
  7437. /**
  7438. * Serializes the message to binary data (in protobuf wire format).
  7439. * @return {!Uint8Array}
  7440. */
  7441. proto.google.protobuf.UninterpretedOption.NamePart.prototype.serializeBinary = function() {
  7442. var writer = new jspb.BinaryWriter();
  7443. proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter(this, writer);
  7444. return writer.getResultBuffer();
  7445. };
  7446. /**
  7447. * Serializes the given message to binary data (in protobuf wire
  7448. * format), writing to the given BinaryWriter.
  7449. * @param {!proto.google.protobuf.UninterpretedOption.NamePart} message
  7450. * @param {!jspb.BinaryWriter} writer
  7451. * @suppress {unusedLocalVariables} f is only used for nested messages
  7452. */
  7453. proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter = function(message, writer) {
  7454. var f = undefined;
  7455. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  7456. if (f != null) {
  7457. writer.writeString(
  7458. 1,
  7459. f
  7460. );
  7461. }
  7462. f = /** @type {boolean} */ (jspb.Message.getField(message, 2));
  7463. if (f != null) {
  7464. writer.writeBool(
  7465. 2,
  7466. f
  7467. );
  7468. }
  7469. };
  7470. /**
  7471. * required string name_part = 1;
  7472. * @return {string}
  7473. */
  7474. proto.google.protobuf.UninterpretedOption.NamePart.prototype.getNamePart = function() {
  7475. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  7476. };
  7477. /**
  7478. * @param {string} value
  7479. * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this
  7480. */
  7481. proto.google.protobuf.UninterpretedOption.NamePart.prototype.setNamePart = function(value) {
  7482. return jspb.Message.setField(this, 1, value);
  7483. };
  7484. /**
  7485. * Clears the field making it undefined.
  7486. * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this
  7487. */
  7488. proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearNamePart = function() {
  7489. return jspb.Message.setField(this, 1, undefined);
  7490. };
  7491. /**
  7492. * Returns whether this field is set.
  7493. * @return {boolean}
  7494. */
  7495. proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasNamePart = function() {
  7496. return jspb.Message.getField(this, 1) != null;
  7497. };
  7498. /**
  7499. * required bool is_extension = 2;
  7500. * @return {boolean}
  7501. */
  7502. proto.google.protobuf.UninterpretedOption.NamePart.prototype.getIsExtension = function() {
  7503. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
  7504. };
  7505. /**
  7506. * @param {boolean} value
  7507. * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this
  7508. */
  7509. proto.google.protobuf.UninterpretedOption.NamePart.prototype.setIsExtension = function(value) {
  7510. return jspb.Message.setField(this, 2, value);
  7511. };
  7512. /**
  7513. * Clears the field making it undefined.
  7514. * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this
  7515. */
  7516. proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearIsExtension = function() {
  7517. return jspb.Message.setField(this, 2, undefined);
  7518. };
  7519. /**
  7520. * Returns whether this field is set.
  7521. * @return {boolean}
  7522. */
  7523. proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasIsExtension = function() {
  7524. return jspb.Message.getField(this, 2) != null;
  7525. };
  7526. /**
  7527. * repeated NamePart name = 2;
  7528. * @return {!Array<!proto.google.protobuf.UninterpretedOption.NamePart>}
  7529. */
  7530. proto.google.protobuf.UninterpretedOption.prototype.getNameList = function() {
  7531. return /** @type{!Array<!proto.google.protobuf.UninterpretedOption.NamePart>} */ (
  7532. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption.NamePart, 2));
  7533. };
  7534. /**
  7535. * @param {!Array<!proto.google.protobuf.UninterpretedOption.NamePart>} value
  7536. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7537. */
  7538. proto.google.protobuf.UninterpretedOption.prototype.setNameList = function(value) {
  7539. return jspb.Message.setRepeatedWrapperField(this, 2, value);
  7540. };
  7541. /**
  7542. * @param {!proto.google.protobuf.UninterpretedOption.NamePart=} opt_value
  7543. * @param {number=} opt_index
  7544. * @return {!proto.google.protobuf.UninterpretedOption.NamePart}
  7545. */
  7546. proto.google.protobuf.UninterpretedOption.prototype.addName = function(opt_value, opt_index) {
  7547. return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.UninterpretedOption.NamePart, opt_index);
  7548. };
  7549. /**
  7550. * Clears the list making it empty but non-null.
  7551. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7552. */
  7553. proto.google.protobuf.UninterpretedOption.prototype.clearNameList = function() {
  7554. return this.setNameList([]);
  7555. };
  7556. /**
  7557. * optional string identifier_value = 3;
  7558. * @return {string}
  7559. */
  7560. proto.google.protobuf.UninterpretedOption.prototype.getIdentifierValue = function() {
  7561. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
  7562. };
  7563. /**
  7564. * @param {string} value
  7565. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7566. */
  7567. proto.google.protobuf.UninterpretedOption.prototype.setIdentifierValue = function(value) {
  7568. return jspb.Message.setField(this, 3, value);
  7569. };
  7570. /**
  7571. * Clears the field making it undefined.
  7572. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7573. */
  7574. proto.google.protobuf.UninterpretedOption.prototype.clearIdentifierValue = function() {
  7575. return jspb.Message.setField(this, 3, undefined);
  7576. };
  7577. /**
  7578. * Returns whether this field is set.
  7579. * @return {boolean}
  7580. */
  7581. proto.google.protobuf.UninterpretedOption.prototype.hasIdentifierValue = function() {
  7582. return jspb.Message.getField(this, 3) != null;
  7583. };
  7584. /**
  7585. * optional uint64 positive_int_value = 4;
  7586. * @return {number}
  7587. */
  7588. proto.google.protobuf.UninterpretedOption.prototype.getPositiveIntValue = function() {
  7589. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
  7590. };
  7591. /**
  7592. * @param {number} value
  7593. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7594. */
  7595. proto.google.protobuf.UninterpretedOption.prototype.setPositiveIntValue = function(value) {
  7596. return jspb.Message.setField(this, 4, value);
  7597. };
  7598. /**
  7599. * Clears the field making it undefined.
  7600. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7601. */
  7602. proto.google.protobuf.UninterpretedOption.prototype.clearPositiveIntValue = function() {
  7603. return jspb.Message.setField(this, 4, undefined);
  7604. };
  7605. /**
  7606. * Returns whether this field is set.
  7607. * @return {boolean}
  7608. */
  7609. proto.google.protobuf.UninterpretedOption.prototype.hasPositiveIntValue = function() {
  7610. return jspb.Message.getField(this, 4) != null;
  7611. };
  7612. /**
  7613. * optional int64 negative_int_value = 5;
  7614. * @return {number}
  7615. */
  7616. proto.google.protobuf.UninterpretedOption.prototype.getNegativeIntValue = function() {
  7617. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
  7618. };
  7619. /**
  7620. * @param {number} value
  7621. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7622. */
  7623. proto.google.protobuf.UninterpretedOption.prototype.setNegativeIntValue = function(value) {
  7624. return jspb.Message.setField(this, 5, value);
  7625. };
  7626. /**
  7627. * Clears the field making it undefined.
  7628. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7629. */
  7630. proto.google.protobuf.UninterpretedOption.prototype.clearNegativeIntValue = function() {
  7631. return jspb.Message.setField(this, 5, undefined);
  7632. };
  7633. /**
  7634. * Returns whether this field is set.
  7635. * @return {boolean}
  7636. */
  7637. proto.google.protobuf.UninterpretedOption.prototype.hasNegativeIntValue = function() {
  7638. return jspb.Message.getField(this, 5) != null;
  7639. };
  7640. /**
  7641. * optional double double_value = 6;
  7642. * @return {number}
  7643. */
  7644. proto.google.protobuf.UninterpretedOption.prototype.getDoubleValue = function() {
  7645. return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0));
  7646. };
  7647. /**
  7648. * @param {number} value
  7649. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7650. */
  7651. proto.google.protobuf.UninterpretedOption.prototype.setDoubleValue = function(value) {
  7652. return jspb.Message.setField(this, 6, value);
  7653. };
  7654. /**
  7655. * Clears the field making it undefined.
  7656. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7657. */
  7658. proto.google.protobuf.UninterpretedOption.prototype.clearDoubleValue = function() {
  7659. return jspb.Message.setField(this, 6, undefined);
  7660. };
  7661. /**
  7662. * Returns whether this field is set.
  7663. * @return {boolean}
  7664. */
  7665. proto.google.protobuf.UninterpretedOption.prototype.hasDoubleValue = function() {
  7666. return jspb.Message.getField(this, 6) != null;
  7667. };
  7668. /**
  7669. * optional bytes string_value = 7;
  7670. * @return {string}
  7671. */
  7672. proto.google.protobuf.UninterpretedOption.prototype.getStringValue = function() {
  7673. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
  7674. };
  7675. /**
  7676. * optional bytes string_value = 7;
  7677. * This is a type-conversion wrapper around `getStringValue()`
  7678. * @return {string}
  7679. */
  7680. proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asB64 = function() {
  7681. return /** @type {string} */ (jspb.Message.bytesAsB64(
  7682. this.getStringValue()));
  7683. };
  7684. /**
  7685. * optional bytes string_value = 7;
  7686. * Note that Uint8Array is not supported on all browsers.
  7687. * @see http://caniuse.com/Uint8Array
  7688. * This is a type-conversion wrapper around `getStringValue()`
  7689. * @return {!Uint8Array}
  7690. */
  7691. proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asU8 = function() {
  7692. return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
  7693. this.getStringValue()));
  7694. };
  7695. /**
  7696. * @param {!(string|Uint8Array)} value
  7697. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7698. */
  7699. proto.google.protobuf.UninterpretedOption.prototype.setStringValue = function(value) {
  7700. return jspb.Message.setField(this, 7, value);
  7701. };
  7702. /**
  7703. * Clears the field making it undefined.
  7704. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7705. */
  7706. proto.google.protobuf.UninterpretedOption.prototype.clearStringValue = function() {
  7707. return jspb.Message.setField(this, 7, undefined);
  7708. };
  7709. /**
  7710. * Returns whether this field is set.
  7711. * @return {boolean}
  7712. */
  7713. proto.google.protobuf.UninterpretedOption.prototype.hasStringValue = function() {
  7714. return jspb.Message.getField(this, 7) != null;
  7715. };
  7716. /**
  7717. * optional string aggregate_value = 8;
  7718. * @return {string}
  7719. */
  7720. proto.google.protobuf.UninterpretedOption.prototype.getAggregateValue = function() {
  7721. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
  7722. };
  7723. /**
  7724. * @param {string} value
  7725. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7726. */
  7727. proto.google.protobuf.UninterpretedOption.prototype.setAggregateValue = function(value) {
  7728. return jspb.Message.setField(this, 8, value);
  7729. };
  7730. /**
  7731. * Clears the field making it undefined.
  7732. * @return {!proto.google.protobuf.UninterpretedOption} returns this
  7733. */
  7734. proto.google.protobuf.UninterpretedOption.prototype.clearAggregateValue = function() {
  7735. return jspb.Message.setField(this, 8, undefined);
  7736. };
  7737. /**
  7738. * Returns whether this field is set.
  7739. * @return {boolean}
  7740. */
  7741. proto.google.protobuf.UninterpretedOption.prototype.hasAggregateValue = function() {
  7742. return jspb.Message.getField(this, 8) != null;
  7743. };
  7744. /**
  7745. * List of repeated fields within this message type.
  7746. * @private {!Array<number>}
  7747. * @const
  7748. */
  7749. proto.google.protobuf.SourceCodeInfo.repeatedFields_ = [1];
  7750. if (jspb.Message.GENERATE_TO_OBJECT) {
  7751. /**
  7752. * Creates an object representation of this proto.
  7753. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  7754. * Optional fields that are not set will be set to undefined.
  7755. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  7756. * For the list of reserved names please see:
  7757. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  7758. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  7759. * JSPB instance for transitional soy proto support:
  7760. * http://goto/soy-param-migration
  7761. * @return {!Object}
  7762. */
  7763. proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeInstance) {
  7764. return proto.google.protobuf.SourceCodeInfo.toObject(opt_includeInstance, this);
  7765. };
  7766. /**
  7767. * Static version of the {@see toObject} method.
  7768. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  7769. * the JSPB instance for transitional soy proto support:
  7770. * http://goto/soy-param-migration
  7771. * @param {!proto.google.protobuf.SourceCodeInfo} msg The msg instance to transform.
  7772. * @return {!Object}
  7773. * @suppress {unusedLocalVariables} f is only used for nested messages
  7774. */
  7775. proto.google.protobuf.SourceCodeInfo.toObject = function(includeInstance, msg) {
  7776. var f, obj = {
  7777. locationList: jspb.Message.toObjectList(msg.getLocationList(),
  7778. proto.google.protobuf.SourceCodeInfo.Location.toObject, includeInstance)
  7779. };
  7780. if (includeInstance) {
  7781. obj.$jspbMessageInstance = msg;
  7782. }
  7783. return obj;
  7784. };
  7785. }
  7786. /**
  7787. * Deserializes binary data (in protobuf wire format).
  7788. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  7789. * @return {!proto.google.protobuf.SourceCodeInfo}
  7790. */
  7791. proto.google.protobuf.SourceCodeInfo.deserializeBinary = function(bytes) {
  7792. var reader = new jspb.BinaryReader(bytes);
  7793. var msg = new proto.google.protobuf.SourceCodeInfo;
  7794. return proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader(msg, reader);
  7795. };
  7796. /**
  7797. * Deserializes binary data (in protobuf wire format) from the
  7798. * given reader into the given message object.
  7799. * @param {!proto.google.protobuf.SourceCodeInfo} msg The message object to deserialize into.
  7800. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  7801. * @return {!proto.google.protobuf.SourceCodeInfo}
  7802. */
  7803. proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader = function(msg, reader) {
  7804. while (reader.nextField()) {
  7805. if (reader.isEndGroup()) {
  7806. break;
  7807. }
  7808. var field = reader.getFieldNumber();
  7809. switch (field) {
  7810. case 1:
  7811. var value = new proto.google.protobuf.SourceCodeInfo.Location;
  7812. reader.readMessage(value,proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader);
  7813. msg.addLocation(value);
  7814. break;
  7815. default:
  7816. reader.skipField();
  7817. break;
  7818. }
  7819. }
  7820. return msg;
  7821. };
  7822. /**
  7823. * Serializes the message to binary data (in protobuf wire format).
  7824. * @return {!Uint8Array}
  7825. */
  7826. proto.google.protobuf.SourceCodeInfo.prototype.serializeBinary = function() {
  7827. var writer = new jspb.BinaryWriter();
  7828. proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter(this, writer);
  7829. return writer.getResultBuffer();
  7830. };
  7831. /**
  7832. * Serializes the given message to binary data (in protobuf wire
  7833. * format), writing to the given BinaryWriter.
  7834. * @param {!proto.google.protobuf.SourceCodeInfo} message
  7835. * @param {!jspb.BinaryWriter} writer
  7836. * @suppress {unusedLocalVariables} f is only used for nested messages
  7837. */
  7838. proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter = function(message, writer) {
  7839. var f = undefined;
  7840. f = message.getLocationList();
  7841. if (f.length > 0) {
  7842. writer.writeRepeatedMessage(
  7843. 1,
  7844. f,
  7845. proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter
  7846. );
  7847. }
  7848. };
  7849. /**
  7850. * List of repeated fields within this message type.
  7851. * @private {!Array<number>}
  7852. * @const
  7853. */
  7854. proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_ = [1,2,6];
  7855. if (jspb.Message.GENERATE_TO_OBJECT) {
  7856. /**
  7857. * Creates an object representation of this proto.
  7858. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  7859. * Optional fields that are not set will be set to undefined.
  7860. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  7861. * For the list of reserved names please see:
  7862. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  7863. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  7864. * JSPB instance for transitional soy proto support:
  7865. * http://goto/soy-param-migration
  7866. * @return {!Object}
  7867. */
  7868. proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_includeInstance) {
  7869. return proto.google.protobuf.SourceCodeInfo.Location.toObject(opt_includeInstance, this);
  7870. };
  7871. /**
  7872. * Static version of the {@see toObject} method.
  7873. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  7874. * the JSPB instance for transitional soy proto support:
  7875. * http://goto/soy-param-migration
  7876. * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The msg instance to transform.
  7877. * @return {!Object}
  7878. * @suppress {unusedLocalVariables} f is only used for nested messages
  7879. */
  7880. proto.google.protobuf.SourceCodeInfo.Location.toObject = function(includeInstance, msg) {
  7881. var f, obj = {
  7882. pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
  7883. spanList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
  7884. leadingComments: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
  7885. trailingComments: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
  7886. leadingDetachedCommentsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f
  7887. };
  7888. if (includeInstance) {
  7889. obj.$jspbMessageInstance = msg;
  7890. }
  7891. return obj;
  7892. };
  7893. }
  7894. /**
  7895. * Deserializes binary data (in protobuf wire format).
  7896. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  7897. * @return {!proto.google.protobuf.SourceCodeInfo.Location}
  7898. */
  7899. proto.google.protobuf.SourceCodeInfo.Location.deserializeBinary = function(bytes) {
  7900. var reader = new jspb.BinaryReader(bytes);
  7901. var msg = new proto.google.protobuf.SourceCodeInfo.Location;
  7902. return proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader(msg, reader);
  7903. };
  7904. /**
  7905. * Deserializes binary data (in protobuf wire format) from the
  7906. * given reader into the given message object.
  7907. * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The message object to deserialize into.
  7908. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  7909. * @return {!proto.google.protobuf.SourceCodeInfo.Location}
  7910. */
  7911. proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader = function(msg, reader) {
  7912. while (reader.nextField()) {
  7913. if (reader.isEndGroup()) {
  7914. break;
  7915. }
  7916. var field = reader.getFieldNumber();
  7917. switch (field) {
  7918. case 1:
  7919. var value = /** @type {!Array<number>} */ (reader.readPackedInt32());
  7920. msg.setPathList(value);
  7921. break;
  7922. case 2:
  7923. var value = /** @type {!Array<number>} */ (reader.readPackedInt32());
  7924. msg.setSpanList(value);
  7925. break;
  7926. case 3:
  7927. var value = /** @type {string} */ (reader.readString());
  7928. msg.setLeadingComments(value);
  7929. break;
  7930. case 4:
  7931. var value = /** @type {string} */ (reader.readString());
  7932. msg.setTrailingComments(value);
  7933. break;
  7934. case 6:
  7935. var value = /** @type {string} */ (reader.readString());
  7936. msg.addLeadingDetachedComments(value);
  7937. break;
  7938. default:
  7939. reader.skipField();
  7940. break;
  7941. }
  7942. }
  7943. return msg;
  7944. };
  7945. /**
  7946. * Serializes the message to binary data (in protobuf wire format).
  7947. * @return {!Uint8Array}
  7948. */
  7949. proto.google.protobuf.SourceCodeInfo.Location.prototype.serializeBinary = function() {
  7950. var writer = new jspb.BinaryWriter();
  7951. proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter(this, writer);
  7952. return writer.getResultBuffer();
  7953. };
  7954. /**
  7955. * Serializes the given message to binary data (in protobuf wire
  7956. * format), writing to the given BinaryWriter.
  7957. * @param {!proto.google.protobuf.SourceCodeInfo.Location} message
  7958. * @param {!jspb.BinaryWriter} writer
  7959. * @suppress {unusedLocalVariables} f is only used for nested messages
  7960. */
  7961. proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter = function(message, writer) {
  7962. var f = undefined;
  7963. f = message.getPathList();
  7964. if (f.length > 0) {
  7965. writer.writePackedInt32(
  7966. 1,
  7967. f
  7968. );
  7969. }
  7970. f = message.getSpanList();
  7971. if (f.length > 0) {
  7972. writer.writePackedInt32(
  7973. 2,
  7974. f
  7975. );
  7976. }
  7977. f = /** @type {string} */ (jspb.Message.getField(message, 3));
  7978. if (f != null) {
  7979. writer.writeString(
  7980. 3,
  7981. f
  7982. );
  7983. }
  7984. f = /** @type {string} */ (jspb.Message.getField(message, 4));
  7985. if (f != null) {
  7986. writer.writeString(
  7987. 4,
  7988. f
  7989. );
  7990. }
  7991. f = message.getLeadingDetachedCommentsList();
  7992. if (f.length > 0) {
  7993. writer.writeRepeatedString(
  7994. 6,
  7995. f
  7996. );
  7997. }
  7998. };
  7999. /**
  8000. * repeated int32 path = 1;
  8001. * @return {!Array<number>}
  8002. */
  8003. proto.google.protobuf.SourceCodeInfo.Location.prototype.getPathList = function() {
  8004. return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 1));
  8005. };
  8006. /**
  8007. * @param {!Array<number>} value
  8008. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8009. */
  8010. proto.google.protobuf.SourceCodeInfo.Location.prototype.setPathList = function(value) {
  8011. return jspb.Message.setField(this, 1, value || []);
  8012. };
  8013. /**
  8014. * @param {number} value
  8015. * @param {number=} opt_index
  8016. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8017. */
  8018. proto.google.protobuf.SourceCodeInfo.Location.prototype.addPath = function(value, opt_index) {
  8019. return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
  8020. };
  8021. /**
  8022. * Clears the list making it empty but non-null.
  8023. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8024. */
  8025. proto.google.protobuf.SourceCodeInfo.Location.prototype.clearPathList = function() {
  8026. return this.setPathList([]);
  8027. };
  8028. /**
  8029. * repeated int32 span = 2;
  8030. * @return {!Array<number>}
  8031. */
  8032. proto.google.protobuf.SourceCodeInfo.Location.prototype.getSpanList = function() {
  8033. return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
  8034. };
  8035. /**
  8036. * @param {!Array<number>} value
  8037. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8038. */
  8039. proto.google.protobuf.SourceCodeInfo.Location.prototype.setSpanList = function(value) {
  8040. return jspb.Message.setField(this, 2, value || []);
  8041. };
  8042. /**
  8043. * @param {number} value
  8044. * @param {number=} opt_index
  8045. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8046. */
  8047. proto.google.protobuf.SourceCodeInfo.Location.prototype.addSpan = function(value, opt_index) {
  8048. return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
  8049. };
  8050. /**
  8051. * Clears the list making it empty but non-null.
  8052. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8053. */
  8054. proto.google.protobuf.SourceCodeInfo.Location.prototype.clearSpanList = function() {
  8055. return this.setSpanList([]);
  8056. };
  8057. /**
  8058. * optional string leading_comments = 3;
  8059. * @return {string}
  8060. */
  8061. proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingComments = function() {
  8062. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
  8063. };
  8064. /**
  8065. * @param {string} value
  8066. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8067. */
  8068. proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingComments = function(value) {
  8069. return jspb.Message.setField(this, 3, value);
  8070. };
  8071. /**
  8072. * Clears the field making it undefined.
  8073. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8074. */
  8075. proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingComments = function() {
  8076. return jspb.Message.setField(this, 3, undefined);
  8077. };
  8078. /**
  8079. * Returns whether this field is set.
  8080. * @return {boolean}
  8081. */
  8082. proto.google.protobuf.SourceCodeInfo.Location.prototype.hasLeadingComments = function() {
  8083. return jspb.Message.getField(this, 3) != null;
  8084. };
  8085. /**
  8086. * optional string trailing_comments = 4;
  8087. * @return {string}
  8088. */
  8089. proto.google.protobuf.SourceCodeInfo.Location.prototype.getTrailingComments = function() {
  8090. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
  8091. };
  8092. /**
  8093. * @param {string} value
  8094. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8095. */
  8096. proto.google.protobuf.SourceCodeInfo.Location.prototype.setTrailingComments = function(value) {
  8097. return jspb.Message.setField(this, 4, value);
  8098. };
  8099. /**
  8100. * Clears the field making it undefined.
  8101. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8102. */
  8103. proto.google.protobuf.SourceCodeInfo.Location.prototype.clearTrailingComments = function() {
  8104. return jspb.Message.setField(this, 4, undefined);
  8105. };
  8106. /**
  8107. * Returns whether this field is set.
  8108. * @return {boolean}
  8109. */
  8110. proto.google.protobuf.SourceCodeInfo.Location.prototype.hasTrailingComments = function() {
  8111. return jspb.Message.getField(this, 4) != null;
  8112. };
  8113. /**
  8114. * repeated string leading_detached_comments = 6;
  8115. * @return {!Array<string>}
  8116. */
  8117. proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingDetachedCommentsList = function() {
  8118. return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 6));
  8119. };
  8120. /**
  8121. * @param {!Array<string>} value
  8122. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8123. */
  8124. proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingDetachedCommentsList = function(value) {
  8125. return jspb.Message.setField(this, 6, value || []);
  8126. };
  8127. /**
  8128. * @param {string} value
  8129. * @param {number=} opt_index
  8130. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8131. */
  8132. proto.google.protobuf.SourceCodeInfo.Location.prototype.addLeadingDetachedComments = function(value, opt_index) {
  8133. return jspb.Message.addToRepeatedField(this, 6, value, opt_index);
  8134. };
  8135. /**
  8136. * Clears the list making it empty but non-null.
  8137. * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this
  8138. */
  8139. proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingDetachedCommentsList = function() {
  8140. return this.setLeadingDetachedCommentsList([]);
  8141. };
  8142. /**
  8143. * repeated Location location = 1;
  8144. * @return {!Array<!proto.google.protobuf.SourceCodeInfo.Location>}
  8145. */
  8146. proto.google.protobuf.SourceCodeInfo.prototype.getLocationList = function() {
  8147. return /** @type{!Array<!proto.google.protobuf.SourceCodeInfo.Location>} */ (
  8148. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.SourceCodeInfo.Location, 1));
  8149. };
  8150. /**
  8151. * @param {!Array<!proto.google.protobuf.SourceCodeInfo.Location>} value
  8152. * @return {!proto.google.protobuf.SourceCodeInfo} returns this
  8153. */
  8154. proto.google.protobuf.SourceCodeInfo.prototype.setLocationList = function(value) {
  8155. return jspb.Message.setRepeatedWrapperField(this, 1, value);
  8156. };
  8157. /**
  8158. * @param {!proto.google.protobuf.SourceCodeInfo.Location=} opt_value
  8159. * @param {number=} opt_index
  8160. * @return {!proto.google.protobuf.SourceCodeInfo.Location}
  8161. */
  8162. proto.google.protobuf.SourceCodeInfo.prototype.addLocation = function(opt_value, opt_index) {
  8163. return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.SourceCodeInfo.Location, opt_index);
  8164. };
  8165. /**
  8166. * Clears the list making it empty but non-null.
  8167. * @return {!proto.google.protobuf.SourceCodeInfo} returns this
  8168. */
  8169. proto.google.protobuf.SourceCodeInfo.prototype.clearLocationList = function() {
  8170. return this.setLocationList([]);
  8171. };
  8172. /**
  8173. * List of repeated fields within this message type.
  8174. * @private {!Array<number>}
  8175. * @const
  8176. */
  8177. proto.google.protobuf.GeneratedCodeInfo.repeatedFields_ = [1];
  8178. if (jspb.Message.GENERATE_TO_OBJECT) {
  8179. /**
  8180. * Creates an object representation of this proto.
  8181. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  8182. * Optional fields that are not set will be set to undefined.
  8183. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  8184. * For the list of reserved names please see:
  8185. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  8186. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  8187. * JSPB instance for transitional soy proto support:
  8188. * http://goto/soy-param-migration
  8189. * @return {!Object}
  8190. */
  8191. proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includeInstance) {
  8192. return proto.google.protobuf.GeneratedCodeInfo.toObject(opt_includeInstance, this);
  8193. };
  8194. /**
  8195. * Static version of the {@see toObject} method.
  8196. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  8197. * the JSPB instance for transitional soy proto support:
  8198. * http://goto/soy-param-migration
  8199. * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The msg instance to transform.
  8200. * @return {!Object}
  8201. * @suppress {unusedLocalVariables} f is only used for nested messages
  8202. */
  8203. proto.google.protobuf.GeneratedCodeInfo.toObject = function(includeInstance, msg) {
  8204. var f, obj = {
  8205. annotationList: jspb.Message.toObjectList(msg.getAnnotationList(),
  8206. proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject, includeInstance)
  8207. };
  8208. if (includeInstance) {
  8209. obj.$jspbMessageInstance = msg;
  8210. }
  8211. return obj;
  8212. };
  8213. }
  8214. /**
  8215. * Deserializes binary data (in protobuf wire format).
  8216. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  8217. * @return {!proto.google.protobuf.GeneratedCodeInfo}
  8218. */
  8219. proto.google.protobuf.GeneratedCodeInfo.deserializeBinary = function(bytes) {
  8220. var reader = new jspb.BinaryReader(bytes);
  8221. var msg = new proto.google.protobuf.GeneratedCodeInfo;
  8222. return proto.google.protobuf.GeneratedCodeInfo.deserializeBinaryFromReader(msg, reader);
  8223. };
  8224. /**
  8225. * Deserializes binary data (in protobuf wire format) from the
  8226. * given reader into the given message object.
  8227. * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The message object to deserialize into.
  8228. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  8229. * @return {!proto.google.protobuf.GeneratedCodeInfo}
  8230. */
  8231. proto.google.protobuf.GeneratedCodeInfo.deserializeBinaryFromReader = function(msg, reader) {
  8232. while (reader.nextField()) {
  8233. if (reader.isEndGroup()) {
  8234. break;
  8235. }
  8236. var field = reader.getFieldNumber();
  8237. switch (field) {
  8238. case 1:
  8239. var value = new proto.google.protobuf.GeneratedCodeInfo.Annotation;
  8240. reader.readMessage(value,proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader);
  8241. msg.addAnnotation(value);
  8242. break;
  8243. default:
  8244. reader.skipField();
  8245. break;
  8246. }
  8247. }
  8248. return msg;
  8249. };
  8250. /**
  8251. * Serializes the message to binary data (in protobuf wire format).
  8252. * @return {!Uint8Array}
  8253. */
  8254. proto.google.protobuf.GeneratedCodeInfo.prototype.serializeBinary = function() {
  8255. var writer = new jspb.BinaryWriter();
  8256. proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter(this, writer);
  8257. return writer.getResultBuffer();
  8258. };
  8259. /**
  8260. * Serializes the given message to binary data (in protobuf wire
  8261. * format), writing to the given BinaryWriter.
  8262. * @param {!proto.google.protobuf.GeneratedCodeInfo} message
  8263. * @param {!jspb.BinaryWriter} writer
  8264. * @suppress {unusedLocalVariables} f is only used for nested messages
  8265. */
  8266. proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter = function(message, writer) {
  8267. var f = undefined;
  8268. f = message.getAnnotationList();
  8269. if (f.length > 0) {
  8270. writer.writeRepeatedMessage(
  8271. 1,
  8272. f,
  8273. proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter
  8274. );
  8275. }
  8276. };
  8277. /**
  8278. * List of repeated fields within this message type.
  8279. * @private {!Array<number>}
  8280. * @const
  8281. */
  8282. proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_ = [1];
  8283. if (jspb.Message.GENERATE_TO_OBJECT) {
  8284. /**
  8285. * Creates an object representation of this proto.
  8286. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  8287. * Optional fields that are not set will be set to undefined.
  8288. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  8289. * For the list of reserved names please see:
  8290. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  8291. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  8292. * JSPB instance for transitional soy proto support:
  8293. * http://goto/soy-param-migration
  8294. * @return {!Object}
  8295. */
  8296. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function(opt_includeInstance) {
  8297. return proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject(opt_includeInstance, this);
  8298. };
  8299. /**
  8300. * Static version of the {@see toObject} method.
  8301. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  8302. * the JSPB instance for transitional soy proto support:
  8303. * http://goto/soy-param-migration
  8304. * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The msg instance to transform.
  8305. * @return {!Object}
  8306. * @suppress {unusedLocalVariables} f is only used for nested messages
  8307. */
  8308. proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject = function(includeInstance, msg) {
  8309. var f, obj = {
  8310. pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
  8311. sourceFile: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
  8312. begin: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
  8313. end: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f
  8314. };
  8315. if (includeInstance) {
  8316. obj.$jspbMessageInstance = msg;
  8317. }
  8318. return obj;
  8319. };
  8320. }
  8321. /**
  8322. * Deserializes binary data (in protobuf wire format).
  8323. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  8324. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation}
  8325. */
  8326. proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinary = function(bytes) {
  8327. var reader = new jspb.BinaryReader(bytes);
  8328. var msg = new proto.google.protobuf.GeneratedCodeInfo.Annotation;
  8329. return proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader(msg, reader);
  8330. };
  8331. /**
  8332. * Deserializes binary data (in protobuf wire format) from the
  8333. * given reader into the given message object.
  8334. * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The message object to deserialize into.
  8335. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  8336. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation}
  8337. */
  8338. proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader = function(msg, reader) {
  8339. while (reader.nextField()) {
  8340. if (reader.isEndGroup()) {
  8341. break;
  8342. }
  8343. var field = reader.getFieldNumber();
  8344. switch (field) {
  8345. case 1:
  8346. var value = /** @type {!Array<number>} */ (reader.readPackedInt32());
  8347. msg.setPathList(value);
  8348. break;
  8349. case 2:
  8350. var value = /** @type {string} */ (reader.readString());
  8351. msg.setSourceFile(value);
  8352. break;
  8353. case 3:
  8354. var value = /** @type {number} */ (reader.readInt32());
  8355. msg.setBegin(value);
  8356. break;
  8357. case 4:
  8358. var value = /** @type {number} */ (reader.readInt32());
  8359. msg.setEnd(value);
  8360. break;
  8361. default:
  8362. reader.skipField();
  8363. break;
  8364. }
  8365. }
  8366. return msg;
  8367. };
  8368. /**
  8369. * Serializes the message to binary data (in protobuf wire format).
  8370. * @return {!Uint8Array}
  8371. */
  8372. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.serializeBinary = function() {
  8373. var writer = new jspb.BinaryWriter();
  8374. proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter(this, writer);
  8375. return writer.getResultBuffer();
  8376. };
  8377. /**
  8378. * Serializes the given message to binary data (in protobuf wire
  8379. * format), writing to the given BinaryWriter.
  8380. * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} message
  8381. * @param {!jspb.BinaryWriter} writer
  8382. * @suppress {unusedLocalVariables} f is only used for nested messages
  8383. */
  8384. proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter = function(message, writer) {
  8385. var f = undefined;
  8386. f = message.getPathList();
  8387. if (f.length > 0) {
  8388. writer.writePackedInt32(
  8389. 1,
  8390. f
  8391. );
  8392. }
  8393. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  8394. if (f != null) {
  8395. writer.writeString(
  8396. 2,
  8397. f
  8398. );
  8399. }
  8400. f = /** @type {number} */ (jspb.Message.getField(message, 3));
  8401. if (f != null) {
  8402. writer.writeInt32(
  8403. 3,
  8404. f
  8405. );
  8406. }
  8407. f = /** @type {number} */ (jspb.Message.getField(message, 4));
  8408. if (f != null) {
  8409. writer.writeInt32(
  8410. 4,
  8411. f
  8412. );
  8413. }
  8414. };
  8415. /**
  8416. * repeated int32 path = 1;
  8417. * @return {!Array<number>}
  8418. */
  8419. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getPathList = function() {
  8420. return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 1));
  8421. };
  8422. /**
  8423. * @param {!Array<number>} value
  8424. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this
  8425. */
  8426. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setPathList = function(value) {
  8427. return jspb.Message.setField(this, 1, value || []);
  8428. };
  8429. /**
  8430. * @param {number} value
  8431. * @param {number=} opt_index
  8432. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this
  8433. */
  8434. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.addPath = function(value, opt_index) {
  8435. return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
  8436. };
  8437. /**
  8438. * Clears the list making it empty but non-null.
  8439. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this
  8440. */
  8441. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearPathList = function() {
  8442. return this.setPathList([]);
  8443. };
  8444. /**
  8445. * optional string source_file = 2;
  8446. * @return {string}
  8447. */
  8448. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSourceFile = function() {
  8449. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  8450. };
  8451. /**
  8452. * @param {string} value
  8453. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this
  8454. */
  8455. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSourceFile = function(value) {
  8456. return jspb.Message.setField(this, 2, value);
  8457. };
  8458. /**
  8459. * Clears the field making it undefined.
  8460. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this
  8461. */
  8462. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSourceFile = function() {
  8463. return jspb.Message.setField(this, 2, undefined);
  8464. };
  8465. /**
  8466. * Returns whether this field is set.
  8467. * @return {boolean}
  8468. */
  8469. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasSourceFile = function() {
  8470. return jspb.Message.getField(this, 2) != null;
  8471. };
  8472. /**
  8473. * optional int32 begin = 3;
  8474. * @return {number}
  8475. */
  8476. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getBegin = function() {
  8477. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
  8478. };
  8479. /**
  8480. * @param {number} value
  8481. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this
  8482. */
  8483. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setBegin = function(value) {
  8484. return jspb.Message.setField(this, 3, value);
  8485. };
  8486. /**
  8487. * Clears the field making it undefined.
  8488. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this
  8489. */
  8490. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearBegin = function() {
  8491. return jspb.Message.setField(this, 3, undefined);
  8492. };
  8493. /**
  8494. * Returns whether this field is set.
  8495. * @return {boolean}
  8496. */
  8497. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasBegin = function() {
  8498. return jspb.Message.getField(this, 3) != null;
  8499. };
  8500. /**
  8501. * optional int32 end = 4;
  8502. * @return {number}
  8503. */
  8504. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getEnd = function() {
  8505. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
  8506. };
  8507. /**
  8508. * @param {number} value
  8509. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this
  8510. */
  8511. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setEnd = function(value) {
  8512. return jspb.Message.setField(this, 4, value);
  8513. };
  8514. /**
  8515. * Clears the field making it undefined.
  8516. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this
  8517. */
  8518. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearEnd = function() {
  8519. return jspb.Message.setField(this, 4, undefined);
  8520. };
  8521. /**
  8522. * Returns whether this field is set.
  8523. * @return {boolean}
  8524. */
  8525. proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasEnd = function() {
  8526. return jspb.Message.getField(this, 4) != null;
  8527. };
  8528. /**
  8529. * repeated Annotation annotation = 1;
  8530. * @return {!Array<!proto.google.protobuf.GeneratedCodeInfo.Annotation>}
  8531. */
  8532. proto.google.protobuf.GeneratedCodeInfo.prototype.getAnnotationList = function() {
  8533. return /** @type{!Array<!proto.google.protobuf.GeneratedCodeInfo.Annotation>} */ (
  8534. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.GeneratedCodeInfo.Annotation, 1));
  8535. };
  8536. /**
  8537. * @param {!Array<!proto.google.protobuf.GeneratedCodeInfo.Annotation>} value
  8538. * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this
  8539. */
  8540. proto.google.protobuf.GeneratedCodeInfo.prototype.setAnnotationList = function(value) {
  8541. return jspb.Message.setRepeatedWrapperField(this, 1, value);
  8542. };
  8543. /**
  8544. * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation=} opt_value
  8545. * @param {number=} opt_index
  8546. * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation}
  8547. */
  8548. proto.google.protobuf.GeneratedCodeInfo.prototype.addAnnotation = function(opt_value, opt_index) {
  8549. return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.GeneratedCodeInfo.Annotation, opt_index);
  8550. };
  8551. /**
  8552. * Clears the list making it empty but non-null.
  8553. * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this
  8554. */
  8555. proto.google.protobuf.GeneratedCodeInfo.prototype.clearAnnotationList = function() {
  8556. return this.setAnnotationList([]);
  8557. };
  8558. goog.object.extend(exports, proto.google.protobuf);
  8559. // Generated by Spine ProtoJs Plugin
  8560. proto.google.protobuf.DescriptorProto.typeUrl = function() {
  8561. return 'type.googleapis.com/google.protobuf.DescriptorProto';
  8562. };
  8563. // Generated by Spine ProtoJs Plugin
  8564. proto.google.protobuf.UninterpretedOption.typeUrl = function() {
  8565. return 'type.googleapis.com/google.protobuf.UninterpretedOption';
  8566. };
  8567. // Generated by Spine ProtoJs Plugin
  8568. proto.google.protobuf.FieldDescriptorProto.typeUrl = function() {
  8569. return 'type.googleapis.com/google.protobuf.FieldDescriptorProto';
  8570. };
  8571. // Generated by Spine ProtoJs Plugin
  8572. proto.google.protobuf.ServiceOptions.typeUrl = function() {
  8573. return 'type.googleapis.com/google.protobuf.ServiceOptions';
  8574. };
  8575. // Generated by Spine ProtoJs Plugin
  8576. proto.google.protobuf.UninterpretedOption.NamePart.typeUrl = function() {
  8577. return 'type.googleapis.com/google.protobuf.UninterpretedOption.NamePart';
  8578. };
  8579. // Generated by Spine ProtoJs Plugin
  8580. proto.google.protobuf.FieldOptions.typeUrl = function() {
  8581. return 'type.googleapis.com/google.protobuf.FieldOptions';
  8582. };
  8583. // Generated by Spine ProtoJs Plugin
  8584. proto.google.protobuf.EnumDescriptorProto.typeUrl = function() {
  8585. return 'type.googleapis.com/google.protobuf.EnumDescriptorProto';
  8586. };
  8587. // Generated by Spine ProtoJs Plugin
  8588. proto.google.protobuf.OneofDescriptorProto.typeUrl = function() {
  8589. return 'type.googleapis.com/google.protobuf.OneofDescriptorProto';
  8590. };
  8591. // Generated by Spine ProtoJs Plugin
  8592. proto.google.protobuf.EnumOptions.typeUrl = function() {
  8593. return 'type.googleapis.com/google.protobuf.EnumOptions';
  8594. };
  8595. // Generated by Spine ProtoJs Plugin
  8596. proto.google.protobuf.EnumValueOptions.typeUrl = function() {
  8597. return 'type.googleapis.com/google.protobuf.EnumValueOptions';
  8598. };
  8599. // Generated by Spine ProtoJs Plugin
  8600. proto.google.protobuf.GeneratedCodeInfo.typeUrl = function() {
  8601. return 'type.googleapis.com/google.protobuf.GeneratedCodeInfo';
  8602. };
  8603. // Generated by Spine ProtoJs Plugin
  8604. proto.google.protobuf.ExtensionRangeOptions.typeUrl = function() {
  8605. return 'type.googleapis.com/google.protobuf.ExtensionRangeOptions';
  8606. };
  8607. // Generated by Spine ProtoJs Plugin
  8608. proto.google.protobuf.FileOptions.typeUrl = function() {
  8609. return 'type.googleapis.com/google.protobuf.FileOptions';
  8610. };
  8611. // Generated by Spine ProtoJs Plugin
  8612. proto.google.protobuf.OneofOptions.typeUrl = function() {
  8613. return 'type.googleapis.com/google.protobuf.OneofOptions';
  8614. };
  8615. // Generated by Spine ProtoJs Plugin
  8616. proto.google.protobuf.GeneratedCodeInfo.Annotation.typeUrl = function() {
  8617. return 'type.googleapis.com/google.protobuf.GeneratedCodeInfo.Annotation';
  8618. };
  8619. // Generated by Spine ProtoJs Plugin
  8620. proto.google.protobuf.ServiceDescriptorProto.typeUrl = function() {
  8621. return 'type.googleapis.com/google.protobuf.ServiceDescriptorProto';
  8622. };
  8623. // Generated by Spine ProtoJs Plugin
  8624. proto.google.protobuf.EnumValueDescriptorProto.typeUrl = function() {
  8625. return 'type.googleapis.com/google.protobuf.EnumValueDescriptorProto';
  8626. };
  8627. // Generated by Spine ProtoJs Plugin
  8628. proto.google.protobuf.FileDescriptorSet.typeUrl = function() {
  8629. return 'type.googleapis.com/google.protobuf.FileDescriptorSet';
  8630. };
  8631. // Generated by Spine ProtoJs Plugin
  8632. proto.google.protobuf.DescriptorProto.ExtensionRange.typeUrl = function() {
  8633. return 'type.googleapis.com/google.protobuf.DescriptorProto.ExtensionRange';
  8634. };
  8635. // Generated by Spine ProtoJs Plugin
  8636. proto.google.protobuf.SourceCodeInfo.typeUrl = function() {
  8637. return 'type.googleapis.com/google.protobuf.SourceCodeInfo';
  8638. };
  8639. // Generated by Spine ProtoJs Plugin
  8640. proto.google.protobuf.FileDescriptorProto.typeUrl = function() {
  8641. return 'type.googleapis.com/google.protobuf.FileDescriptorProto';
  8642. };
  8643. // Generated by Spine ProtoJs Plugin
  8644. proto.google.protobuf.MethodDescriptorProto.typeUrl = function() {
  8645. return 'type.googleapis.com/google.protobuf.MethodDescriptorProto';
  8646. };
  8647. // Generated by Spine ProtoJs Plugin
  8648. proto.google.protobuf.MessageOptions.typeUrl = function() {
  8649. return 'type.googleapis.com/google.protobuf.MessageOptions';
  8650. };
  8651. // Generated by Spine ProtoJs Plugin
  8652. proto.google.protobuf.DescriptorProto.ReservedRange.typeUrl = function() {
  8653. return 'type.googleapis.com/google.protobuf.DescriptorProto.ReservedRange';
  8654. };
  8655. // Generated by Spine ProtoJs Plugin
  8656. proto.google.protobuf.SourceCodeInfo.Location.typeUrl = function() {
  8657. return 'type.googleapis.com/google.protobuf.SourceCodeInfo.Location';
  8658. };
  8659. // Generated by Spine ProtoJs Plugin
  8660. proto.google.protobuf.MethodOptions.typeUrl = function() {
  8661. return 'type.googleapis.com/google.protobuf.MethodOptions';
  8662. };
  8663. // Generated by Spine ProtoJs Plugin
  8664. proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.typeUrl = function() {
  8665. return 'type.googleapis.com/google.protobuf.EnumDescriptorProto.EnumReservedRange';
  8666. };
  8667. // Generated by Spine ProtoJs Plugin
  8668. proto.google.protobuf.FieldDescriptorProto.Label.typeUrl = function() {
  8669. return 'type.googleapis.com/google.protobuf.FieldDescriptorProto.Label';
  8670. };
  8671. // Generated by Spine ProtoJs Plugin
  8672. proto.google.protobuf.FieldOptions.JSType.typeUrl = function() {
  8673. return 'type.googleapis.com/google.protobuf.FieldOptions.JSType';
  8674. };
  8675. // Generated by Spine ProtoJs Plugin
  8676. proto.google.protobuf.FieldOptions.CType.typeUrl = function() {
  8677. return 'type.googleapis.com/google.protobuf.FieldOptions.CType';
  8678. };
  8679. // Generated by Spine ProtoJs Plugin
  8680. proto.google.protobuf.FieldDescriptorProto.Type.typeUrl = function() {
  8681. return 'type.googleapis.com/google.protobuf.FieldDescriptorProto.Type';
  8682. };
  8683. // Generated by Spine ProtoJs Plugin
  8684. proto.google.protobuf.FileOptions.OptimizeMode.typeUrl = function() {
  8685. return 'type.googleapis.com/google.protobuf.FileOptions.OptimizeMode';
  8686. };
  8687. // Generated by Spine ProtoJs Plugin
  8688. proto.google.protobuf.MethodOptions.IdempotencyLevel.typeUrl = function() {
  8689. return 'type.googleapis.com/google.protobuf.MethodOptions.IdempotencyLevel';
  8690. };