wrappers_pb.js 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416
  1. // source: google/protobuf/wrappers.proto
  2. /**
  3. * @fileoverview
  4. * @enhanceable
  5. * @suppress {missingRequire} reports error on implicit type usages.
  6. * @suppress {messageConventions} JS Compiler reports an error if a variable or
  7. * field starts with 'MSG_' and isn't a translatable message.
  8. * @public
  9. */
  10. // GENERATED CODE -- DO NOT EDIT!
  11. /* eslint-disable */
  12. // @ts-nocheck
  13. var jspb = require('google-protobuf');
  14. var goog = jspb;
  15. var global =
  16. (typeof globalThis !== 'undefined' && globalThis) ||
  17. (typeof window !== 'undefined' && window) ||
  18. (typeof global !== 'undefined' && global) ||
  19. (typeof self !== 'undefined' && self) ||
  20. (function () { return this; }).call(null) ||
  21. Function('return this')();
  22. goog.exportSymbol('proto.google.protobuf.BoolValue', null, global);
  23. goog.exportSymbol('proto.google.protobuf.BytesValue', null, global);
  24. goog.exportSymbol('proto.google.protobuf.DoubleValue', null, global);
  25. goog.exportSymbol('proto.google.protobuf.FloatValue', null, global);
  26. goog.exportSymbol('proto.google.protobuf.Int32Value', null, global);
  27. goog.exportSymbol('proto.google.protobuf.Int64Value', null, global);
  28. goog.exportSymbol('proto.google.protobuf.StringValue', null, global);
  29. goog.exportSymbol('proto.google.protobuf.UInt32Value', null, global);
  30. goog.exportSymbol('proto.google.protobuf.UInt64Value', null, global);
  31. /**
  32. * Generated by JsPbCodeGenerator.
  33. * @param {Array=} opt_data Optional initial data array, typically from a
  34. * server response, or constructed directly in Javascript. The array is used
  35. * in place and becomes part of the constructed object. It is not cloned.
  36. * If no data is provided, the constructed object will be empty, but still
  37. * valid.
  38. * @extends {jspb.Message}
  39. * @constructor
  40. */
  41. proto.google.protobuf.DoubleValue = function(opt_data) {
  42. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  43. };
  44. goog.inherits(proto.google.protobuf.DoubleValue, jspb.Message);
  45. if (goog.DEBUG && !COMPILED) {
  46. /**
  47. * @public
  48. * @override
  49. */
  50. proto.google.protobuf.DoubleValue.displayName = 'proto.google.protobuf.DoubleValue';
  51. }
  52. /**
  53. * Generated by JsPbCodeGenerator.
  54. * @param {Array=} opt_data Optional initial data array, typically from a
  55. * server response, or constructed directly in Javascript. The array is used
  56. * in place and becomes part of the constructed object. It is not cloned.
  57. * If no data is provided, the constructed object will be empty, but still
  58. * valid.
  59. * @extends {jspb.Message}
  60. * @constructor
  61. */
  62. proto.google.protobuf.FloatValue = function(opt_data) {
  63. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  64. };
  65. goog.inherits(proto.google.protobuf.FloatValue, jspb.Message);
  66. if (goog.DEBUG && !COMPILED) {
  67. /**
  68. * @public
  69. * @override
  70. */
  71. proto.google.protobuf.FloatValue.displayName = 'proto.google.protobuf.FloatValue';
  72. }
  73. /**
  74. * Generated by JsPbCodeGenerator.
  75. * @param {Array=} opt_data Optional initial data array, typically from a
  76. * server response, or constructed directly in Javascript. The array is used
  77. * in place and becomes part of the constructed object. It is not cloned.
  78. * If no data is provided, the constructed object will be empty, but still
  79. * valid.
  80. * @extends {jspb.Message}
  81. * @constructor
  82. */
  83. proto.google.protobuf.Int64Value = function(opt_data) {
  84. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  85. };
  86. goog.inherits(proto.google.protobuf.Int64Value, jspb.Message);
  87. if (goog.DEBUG && !COMPILED) {
  88. /**
  89. * @public
  90. * @override
  91. */
  92. proto.google.protobuf.Int64Value.displayName = 'proto.google.protobuf.Int64Value';
  93. }
  94. /**
  95. * Generated by JsPbCodeGenerator.
  96. * @param {Array=} opt_data Optional initial data array, typically from a
  97. * server response, or constructed directly in Javascript. The array is used
  98. * in place and becomes part of the constructed object. It is not cloned.
  99. * If no data is provided, the constructed object will be empty, but still
  100. * valid.
  101. * @extends {jspb.Message}
  102. * @constructor
  103. */
  104. proto.google.protobuf.UInt64Value = function(opt_data) {
  105. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  106. };
  107. goog.inherits(proto.google.protobuf.UInt64Value, jspb.Message);
  108. if (goog.DEBUG && !COMPILED) {
  109. /**
  110. * @public
  111. * @override
  112. */
  113. proto.google.protobuf.UInt64Value.displayName = 'proto.google.protobuf.UInt64Value';
  114. }
  115. /**
  116. * Generated by JsPbCodeGenerator.
  117. * @param {Array=} opt_data Optional initial data array, typically from a
  118. * server response, or constructed directly in Javascript. The array is used
  119. * in place and becomes part of the constructed object. It is not cloned.
  120. * If no data is provided, the constructed object will be empty, but still
  121. * valid.
  122. * @extends {jspb.Message}
  123. * @constructor
  124. */
  125. proto.google.protobuf.Int32Value = function(opt_data) {
  126. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  127. };
  128. goog.inherits(proto.google.protobuf.Int32Value, jspb.Message);
  129. if (goog.DEBUG && !COMPILED) {
  130. /**
  131. * @public
  132. * @override
  133. */
  134. proto.google.protobuf.Int32Value.displayName = 'proto.google.protobuf.Int32Value';
  135. }
  136. /**
  137. * Generated by JsPbCodeGenerator.
  138. * @param {Array=} opt_data Optional initial data array, typically from a
  139. * server response, or constructed directly in Javascript. The array is used
  140. * in place and becomes part of the constructed object. It is not cloned.
  141. * If no data is provided, the constructed object will be empty, but still
  142. * valid.
  143. * @extends {jspb.Message}
  144. * @constructor
  145. */
  146. proto.google.protobuf.UInt32Value = function(opt_data) {
  147. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  148. };
  149. goog.inherits(proto.google.protobuf.UInt32Value, jspb.Message);
  150. if (goog.DEBUG && !COMPILED) {
  151. /**
  152. * @public
  153. * @override
  154. */
  155. proto.google.protobuf.UInt32Value.displayName = 'proto.google.protobuf.UInt32Value';
  156. }
  157. /**
  158. * Generated by JsPbCodeGenerator.
  159. * @param {Array=} opt_data Optional initial data array, typically from a
  160. * server response, or constructed directly in Javascript. The array is used
  161. * in place and becomes part of the constructed object. It is not cloned.
  162. * If no data is provided, the constructed object will be empty, but still
  163. * valid.
  164. * @extends {jspb.Message}
  165. * @constructor
  166. */
  167. proto.google.protobuf.BoolValue = function(opt_data) {
  168. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  169. };
  170. goog.inherits(proto.google.protobuf.BoolValue, jspb.Message);
  171. if (goog.DEBUG && !COMPILED) {
  172. /**
  173. * @public
  174. * @override
  175. */
  176. proto.google.protobuf.BoolValue.displayName = 'proto.google.protobuf.BoolValue';
  177. }
  178. /**
  179. * Generated by JsPbCodeGenerator.
  180. * @param {Array=} opt_data Optional initial data array, typically from a
  181. * server response, or constructed directly in Javascript. The array is used
  182. * in place and becomes part of the constructed object. It is not cloned.
  183. * If no data is provided, the constructed object will be empty, but still
  184. * valid.
  185. * @extends {jspb.Message}
  186. * @constructor
  187. */
  188. proto.google.protobuf.StringValue = function(opt_data) {
  189. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  190. };
  191. goog.inherits(proto.google.protobuf.StringValue, jspb.Message);
  192. if (goog.DEBUG && !COMPILED) {
  193. /**
  194. * @public
  195. * @override
  196. */
  197. proto.google.protobuf.StringValue.displayName = 'proto.google.protobuf.StringValue';
  198. }
  199. /**
  200. * Generated by JsPbCodeGenerator.
  201. * @param {Array=} opt_data Optional initial data array, typically from a
  202. * server response, or constructed directly in Javascript. The array is used
  203. * in place and becomes part of the constructed object. It is not cloned.
  204. * If no data is provided, the constructed object will be empty, but still
  205. * valid.
  206. * @extends {jspb.Message}
  207. * @constructor
  208. */
  209. proto.google.protobuf.BytesValue = function(opt_data) {
  210. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  211. };
  212. goog.inherits(proto.google.protobuf.BytesValue, jspb.Message);
  213. if (goog.DEBUG && !COMPILED) {
  214. /**
  215. * @public
  216. * @override
  217. */
  218. proto.google.protobuf.BytesValue.displayName = 'proto.google.protobuf.BytesValue';
  219. }
  220. if (jspb.Message.GENERATE_TO_OBJECT) {
  221. /**
  222. * Creates an object representation of this proto.
  223. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  224. * Optional fields that are not set will be set to undefined.
  225. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  226. * For the list of reserved names please see:
  227. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  228. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  229. * JSPB instance for transitional soy proto support:
  230. * http://goto/soy-param-migration
  231. * @return {!Object}
  232. */
  233. proto.google.protobuf.DoubleValue.prototype.toObject = function(opt_includeInstance) {
  234. return proto.google.protobuf.DoubleValue.toObject(opt_includeInstance, this);
  235. };
  236. /**
  237. * Static version of the {@see toObject} method.
  238. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  239. * the JSPB instance for transitional soy proto support:
  240. * http://goto/soy-param-migration
  241. * @param {!proto.google.protobuf.DoubleValue} msg The msg instance to transform.
  242. * @return {!Object}
  243. * @suppress {unusedLocalVariables} f is only used for nested messages
  244. */
  245. proto.google.protobuf.DoubleValue.toObject = function(includeInstance, msg) {
  246. var f, obj = {
  247. value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0)
  248. };
  249. if (includeInstance) {
  250. obj.$jspbMessageInstance = msg;
  251. }
  252. return obj;
  253. };
  254. }
  255. /**
  256. * Deserializes binary data (in protobuf wire format).
  257. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  258. * @return {!proto.google.protobuf.DoubleValue}
  259. */
  260. proto.google.protobuf.DoubleValue.deserializeBinary = function(bytes) {
  261. var reader = new jspb.BinaryReader(bytes);
  262. var msg = new proto.google.protobuf.DoubleValue;
  263. return proto.google.protobuf.DoubleValue.deserializeBinaryFromReader(msg, reader);
  264. };
  265. /**
  266. * Deserializes binary data (in protobuf wire format) from the
  267. * given reader into the given message object.
  268. * @param {!proto.google.protobuf.DoubleValue} msg The message object to deserialize into.
  269. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  270. * @return {!proto.google.protobuf.DoubleValue}
  271. */
  272. proto.google.protobuf.DoubleValue.deserializeBinaryFromReader = function(msg, reader) {
  273. while (reader.nextField()) {
  274. if (reader.isEndGroup()) {
  275. break;
  276. }
  277. var field = reader.getFieldNumber();
  278. switch (field) {
  279. case 1:
  280. var value = /** @type {number} */ (reader.readDouble());
  281. msg.setValue(value);
  282. break;
  283. default:
  284. reader.skipField();
  285. break;
  286. }
  287. }
  288. return msg;
  289. };
  290. /**
  291. * Serializes the message to binary data (in protobuf wire format).
  292. * @return {!Uint8Array}
  293. */
  294. proto.google.protobuf.DoubleValue.prototype.serializeBinary = function() {
  295. var writer = new jspb.BinaryWriter();
  296. proto.google.protobuf.DoubleValue.serializeBinaryToWriter(this, writer);
  297. return writer.getResultBuffer();
  298. };
  299. /**
  300. * Serializes the given message to binary data (in protobuf wire
  301. * format), writing to the given BinaryWriter.
  302. * @param {!proto.google.protobuf.DoubleValue} message
  303. * @param {!jspb.BinaryWriter} writer
  304. * @suppress {unusedLocalVariables} f is only used for nested messages
  305. */
  306. proto.google.protobuf.DoubleValue.serializeBinaryToWriter = function(message, writer) {
  307. var f = undefined;
  308. f = message.getValue();
  309. if (f !== 0.0) {
  310. writer.writeDouble(
  311. 1,
  312. f
  313. );
  314. }
  315. };
  316. /**
  317. * optional double value = 1;
  318. * @return {number}
  319. */
  320. proto.google.protobuf.DoubleValue.prototype.getValue = function() {
  321. return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
  322. };
  323. /**
  324. * @param {number} value
  325. * @return {!proto.google.protobuf.DoubleValue} returns this
  326. */
  327. proto.google.protobuf.DoubleValue.prototype.setValue = function(value) {
  328. return jspb.Message.setProto3FloatField(this, 1, value);
  329. };
  330. if (jspb.Message.GENERATE_TO_OBJECT) {
  331. /**
  332. * Creates an object representation of this proto.
  333. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  334. * Optional fields that are not set will be set to undefined.
  335. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  336. * For the list of reserved names please see:
  337. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  338. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  339. * JSPB instance for transitional soy proto support:
  340. * http://goto/soy-param-migration
  341. * @return {!Object}
  342. */
  343. proto.google.protobuf.FloatValue.prototype.toObject = function(opt_includeInstance) {
  344. return proto.google.protobuf.FloatValue.toObject(opt_includeInstance, this);
  345. };
  346. /**
  347. * Static version of the {@see toObject} method.
  348. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  349. * the JSPB instance for transitional soy proto support:
  350. * http://goto/soy-param-migration
  351. * @param {!proto.google.protobuf.FloatValue} msg The msg instance to transform.
  352. * @return {!Object}
  353. * @suppress {unusedLocalVariables} f is only used for nested messages
  354. */
  355. proto.google.protobuf.FloatValue.toObject = function(includeInstance, msg) {
  356. var f, obj = {
  357. value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0)
  358. };
  359. if (includeInstance) {
  360. obj.$jspbMessageInstance = msg;
  361. }
  362. return obj;
  363. };
  364. }
  365. /**
  366. * Deserializes binary data (in protobuf wire format).
  367. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  368. * @return {!proto.google.protobuf.FloatValue}
  369. */
  370. proto.google.protobuf.FloatValue.deserializeBinary = function(bytes) {
  371. var reader = new jspb.BinaryReader(bytes);
  372. var msg = new proto.google.protobuf.FloatValue;
  373. return proto.google.protobuf.FloatValue.deserializeBinaryFromReader(msg, reader);
  374. };
  375. /**
  376. * Deserializes binary data (in protobuf wire format) from the
  377. * given reader into the given message object.
  378. * @param {!proto.google.protobuf.FloatValue} msg The message object to deserialize into.
  379. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  380. * @return {!proto.google.protobuf.FloatValue}
  381. */
  382. proto.google.protobuf.FloatValue.deserializeBinaryFromReader = function(msg, reader) {
  383. while (reader.nextField()) {
  384. if (reader.isEndGroup()) {
  385. break;
  386. }
  387. var field = reader.getFieldNumber();
  388. switch (field) {
  389. case 1:
  390. var value = /** @type {number} */ (reader.readFloat());
  391. msg.setValue(value);
  392. break;
  393. default:
  394. reader.skipField();
  395. break;
  396. }
  397. }
  398. return msg;
  399. };
  400. /**
  401. * Serializes the message to binary data (in protobuf wire format).
  402. * @return {!Uint8Array}
  403. */
  404. proto.google.protobuf.FloatValue.prototype.serializeBinary = function() {
  405. var writer = new jspb.BinaryWriter();
  406. proto.google.protobuf.FloatValue.serializeBinaryToWriter(this, writer);
  407. return writer.getResultBuffer();
  408. };
  409. /**
  410. * Serializes the given message to binary data (in protobuf wire
  411. * format), writing to the given BinaryWriter.
  412. * @param {!proto.google.protobuf.FloatValue} message
  413. * @param {!jspb.BinaryWriter} writer
  414. * @suppress {unusedLocalVariables} f is only used for nested messages
  415. */
  416. proto.google.protobuf.FloatValue.serializeBinaryToWriter = function(message, writer) {
  417. var f = undefined;
  418. f = message.getValue();
  419. if (f !== 0.0) {
  420. writer.writeFloat(
  421. 1,
  422. f
  423. );
  424. }
  425. };
  426. /**
  427. * optional float value = 1;
  428. * @return {number}
  429. */
  430. proto.google.protobuf.FloatValue.prototype.getValue = function() {
  431. return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
  432. };
  433. /**
  434. * @param {number} value
  435. * @return {!proto.google.protobuf.FloatValue} returns this
  436. */
  437. proto.google.protobuf.FloatValue.prototype.setValue = function(value) {
  438. return jspb.Message.setProto3FloatField(this, 1, value);
  439. };
  440. if (jspb.Message.GENERATE_TO_OBJECT) {
  441. /**
  442. * Creates an object representation of this proto.
  443. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  444. * Optional fields that are not set will be set to undefined.
  445. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  446. * For the list of reserved names please see:
  447. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  448. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  449. * JSPB instance for transitional soy proto support:
  450. * http://goto/soy-param-migration
  451. * @return {!Object}
  452. */
  453. proto.google.protobuf.Int64Value.prototype.toObject = function(opt_includeInstance) {
  454. return proto.google.protobuf.Int64Value.toObject(opt_includeInstance, this);
  455. };
  456. /**
  457. * Static version of the {@see toObject} method.
  458. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  459. * the JSPB instance for transitional soy proto support:
  460. * http://goto/soy-param-migration
  461. * @param {!proto.google.protobuf.Int64Value} msg The msg instance to transform.
  462. * @return {!Object}
  463. * @suppress {unusedLocalVariables} f is only used for nested messages
  464. */
  465. proto.google.protobuf.Int64Value.toObject = function(includeInstance, msg) {
  466. var f, obj = {
  467. value: jspb.Message.getFieldWithDefault(msg, 1, 0)
  468. };
  469. if (includeInstance) {
  470. obj.$jspbMessageInstance = msg;
  471. }
  472. return obj;
  473. };
  474. }
  475. /**
  476. * Deserializes binary data (in protobuf wire format).
  477. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  478. * @return {!proto.google.protobuf.Int64Value}
  479. */
  480. proto.google.protobuf.Int64Value.deserializeBinary = function(bytes) {
  481. var reader = new jspb.BinaryReader(bytes);
  482. var msg = new proto.google.protobuf.Int64Value;
  483. return proto.google.protobuf.Int64Value.deserializeBinaryFromReader(msg, reader);
  484. };
  485. /**
  486. * Deserializes binary data (in protobuf wire format) from the
  487. * given reader into the given message object.
  488. * @param {!proto.google.protobuf.Int64Value} msg The message object to deserialize into.
  489. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  490. * @return {!proto.google.protobuf.Int64Value}
  491. */
  492. proto.google.protobuf.Int64Value.deserializeBinaryFromReader = function(msg, reader) {
  493. while (reader.nextField()) {
  494. if (reader.isEndGroup()) {
  495. break;
  496. }
  497. var field = reader.getFieldNumber();
  498. switch (field) {
  499. case 1:
  500. var value = /** @type {number} */ (reader.readInt64());
  501. msg.setValue(value);
  502. break;
  503. default:
  504. reader.skipField();
  505. break;
  506. }
  507. }
  508. return msg;
  509. };
  510. /**
  511. * Serializes the message to binary data (in protobuf wire format).
  512. * @return {!Uint8Array}
  513. */
  514. proto.google.protobuf.Int64Value.prototype.serializeBinary = function() {
  515. var writer = new jspb.BinaryWriter();
  516. proto.google.protobuf.Int64Value.serializeBinaryToWriter(this, writer);
  517. return writer.getResultBuffer();
  518. };
  519. /**
  520. * Serializes the given message to binary data (in protobuf wire
  521. * format), writing to the given BinaryWriter.
  522. * @param {!proto.google.protobuf.Int64Value} message
  523. * @param {!jspb.BinaryWriter} writer
  524. * @suppress {unusedLocalVariables} f is only used for nested messages
  525. */
  526. proto.google.protobuf.Int64Value.serializeBinaryToWriter = function(message, writer) {
  527. var f = undefined;
  528. f = message.getValue();
  529. if (f !== 0) {
  530. writer.writeInt64(
  531. 1,
  532. f
  533. );
  534. }
  535. };
  536. /**
  537. * optional int64 value = 1;
  538. * @return {number}
  539. */
  540. proto.google.protobuf.Int64Value.prototype.getValue = function() {
  541. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  542. };
  543. /**
  544. * @param {number} value
  545. * @return {!proto.google.protobuf.Int64Value} returns this
  546. */
  547. proto.google.protobuf.Int64Value.prototype.setValue = function(value) {
  548. return jspb.Message.setProto3IntField(this, 1, value);
  549. };
  550. if (jspb.Message.GENERATE_TO_OBJECT) {
  551. /**
  552. * Creates an object representation of this proto.
  553. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  554. * Optional fields that are not set will be set to undefined.
  555. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  556. * For the list of reserved names please see:
  557. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  558. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  559. * JSPB instance for transitional soy proto support:
  560. * http://goto/soy-param-migration
  561. * @return {!Object}
  562. */
  563. proto.google.protobuf.UInt64Value.prototype.toObject = function(opt_includeInstance) {
  564. return proto.google.protobuf.UInt64Value.toObject(opt_includeInstance, this);
  565. };
  566. /**
  567. * Static version of the {@see toObject} method.
  568. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  569. * the JSPB instance for transitional soy proto support:
  570. * http://goto/soy-param-migration
  571. * @param {!proto.google.protobuf.UInt64Value} msg The msg instance to transform.
  572. * @return {!Object}
  573. * @suppress {unusedLocalVariables} f is only used for nested messages
  574. */
  575. proto.google.protobuf.UInt64Value.toObject = function(includeInstance, msg) {
  576. var f, obj = {
  577. value: jspb.Message.getFieldWithDefault(msg, 1, 0)
  578. };
  579. if (includeInstance) {
  580. obj.$jspbMessageInstance = msg;
  581. }
  582. return obj;
  583. };
  584. }
  585. /**
  586. * Deserializes binary data (in protobuf wire format).
  587. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  588. * @return {!proto.google.protobuf.UInt64Value}
  589. */
  590. proto.google.protobuf.UInt64Value.deserializeBinary = function(bytes) {
  591. var reader = new jspb.BinaryReader(bytes);
  592. var msg = new proto.google.protobuf.UInt64Value;
  593. return proto.google.protobuf.UInt64Value.deserializeBinaryFromReader(msg, reader);
  594. };
  595. /**
  596. * Deserializes binary data (in protobuf wire format) from the
  597. * given reader into the given message object.
  598. * @param {!proto.google.protobuf.UInt64Value} msg The message object to deserialize into.
  599. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  600. * @return {!proto.google.protobuf.UInt64Value}
  601. */
  602. proto.google.protobuf.UInt64Value.deserializeBinaryFromReader = function(msg, reader) {
  603. while (reader.nextField()) {
  604. if (reader.isEndGroup()) {
  605. break;
  606. }
  607. var field = reader.getFieldNumber();
  608. switch (field) {
  609. case 1:
  610. var value = /** @type {number} */ (reader.readUint64());
  611. msg.setValue(value);
  612. break;
  613. default:
  614. reader.skipField();
  615. break;
  616. }
  617. }
  618. return msg;
  619. };
  620. /**
  621. * Serializes the message to binary data (in protobuf wire format).
  622. * @return {!Uint8Array}
  623. */
  624. proto.google.protobuf.UInt64Value.prototype.serializeBinary = function() {
  625. var writer = new jspb.BinaryWriter();
  626. proto.google.protobuf.UInt64Value.serializeBinaryToWriter(this, writer);
  627. return writer.getResultBuffer();
  628. };
  629. /**
  630. * Serializes the given message to binary data (in protobuf wire
  631. * format), writing to the given BinaryWriter.
  632. * @param {!proto.google.protobuf.UInt64Value} message
  633. * @param {!jspb.BinaryWriter} writer
  634. * @suppress {unusedLocalVariables} f is only used for nested messages
  635. */
  636. proto.google.protobuf.UInt64Value.serializeBinaryToWriter = function(message, writer) {
  637. var f = undefined;
  638. f = message.getValue();
  639. if (f !== 0) {
  640. writer.writeUint64(
  641. 1,
  642. f
  643. );
  644. }
  645. };
  646. /**
  647. * optional uint64 value = 1;
  648. * @return {number}
  649. */
  650. proto.google.protobuf.UInt64Value.prototype.getValue = function() {
  651. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  652. };
  653. /**
  654. * @param {number} value
  655. * @return {!proto.google.protobuf.UInt64Value} returns this
  656. */
  657. proto.google.protobuf.UInt64Value.prototype.setValue = function(value) {
  658. return jspb.Message.setProto3IntField(this, 1, value);
  659. };
  660. if (jspb.Message.GENERATE_TO_OBJECT) {
  661. /**
  662. * Creates an object representation of this proto.
  663. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  664. * Optional fields that are not set will be set to undefined.
  665. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  666. * For the list of reserved names please see:
  667. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  668. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  669. * JSPB instance for transitional soy proto support:
  670. * http://goto/soy-param-migration
  671. * @return {!Object}
  672. */
  673. proto.google.protobuf.Int32Value.prototype.toObject = function(opt_includeInstance) {
  674. return proto.google.protobuf.Int32Value.toObject(opt_includeInstance, this);
  675. };
  676. /**
  677. * Static version of the {@see toObject} method.
  678. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  679. * the JSPB instance for transitional soy proto support:
  680. * http://goto/soy-param-migration
  681. * @param {!proto.google.protobuf.Int32Value} msg The msg instance to transform.
  682. * @return {!Object}
  683. * @suppress {unusedLocalVariables} f is only used for nested messages
  684. */
  685. proto.google.protobuf.Int32Value.toObject = function(includeInstance, msg) {
  686. var f, obj = {
  687. value: jspb.Message.getFieldWithDefault(msg, 1, 0)
  688. };
  689. if (includeInstance) {
  690. obj.$jspbMessageInstance = msg;
  691. }
  692. return obj;
  693. };
  694. }
  695. /**
  696. * Deserializes binary data (in protobuf wire format).
  697. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  698. * @return {!proto.google.protobuf.Int32Value}
  699. */
  700. proto.google.protobuf.Int32Value.deserializeBinary = function(bytes) {
  701. var reader = new jspb.BinaryReader(bytes);
  702. var msg = new proto.google.protobuf.Int32Value;
  703. return proto.google.protobuf.Int32Value.deserializeBinaryFromReader(msg, reader);
  704. };
  705. /**
  706. * Deserializes binary data (in protobuf wire format) from the
  707. * given reader into the given message object.
  708. * @param {!proto.google.protobuf.Int32Value} msg The message object to deserialize into.
  709. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  710. * @return {!proto.google.protobuf.Int32Value}
  711. */
  712. proto.google.protobuf.Int32Value.deserializeBinaryFromReader = function(msg, reader) {
  713. while (reader.nextField()) {
  714. if (reader.isEndGroup()) {
  715. break;
  716. }
  717. var field = reader.getFieldNumber();
  718. switch (field) {
  719. case 1:
  720. var value = /** @type {number} */ (reader.readInt32());
  721. msg.setValue(value);
  722. break;
  723. default:
  724. reader.skipField();
  725. break;
  726. }
  727. }
  728. return msg;
  729. };
  730. /**
  731. * Serializes the message to binary data (in protobuf wire format).
  732. * @return {!Uint8Array}
  733. */
  734. proto.google.protobuf.Int32Value.prototype.serializeBinary = function() {
  735. var writer = new jspb.BinaryWriter();
  736. proto.google.protobuf.Int32Value.serializeBinaryToWriter(this, writer);
  737. return writer.getResultBuffer();
  738. };
  739. /**
  740. * Serializes the given message to binary data (in protobuf wire
  741. * format), writing to the given BinaryWriter.
  742. * @param {!proto.google.protobuf.Int32Value} message
  743. * @param {!jspb.BinaryWriter} writer
  744. * @suppress {unusedLocalVariables} f is only used for nested messages
  745. */
  746. proto.google.protobuf.Int32Value.serializeBinaryToWriter = function(message, writer) {
  747. var f = undefined;
  748. f = message.getValue();
  749. if (f !== 0) {
  750. writer.writeInt32(
  751. 1,
  752. f
  753. );
  754. }
  755. };
  756. /**
  757. * optional int32 value = 1;
  758. * @return {number}
  759. */
  760. proto.google.protobuf.Int32Value.prototype.getValue = function() {
  761. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  762. };
  763. /**
  764. * @param {number} value
  765. * @return {!proto.google.protobuf.Int32Value} returns this
  766. */
  767. proto.google.protobuf.Int32Value.prototype.setValue = function(value) {
  768. return jspb.Message.setProto3IntField(this, 1, value);
  769. };
  770. if (jspb.Message.GENERATE_TO_OBJECT) {
  771. /**
  772. * Creates an object representation of this proto.
  773. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  774. * Optional fields that are not set will be set to undefined.
  775. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  776. * For the list of reserved names please see:
  777. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  778. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  779. * JSPB instance for transitional soy proto support:
  780. * http://goto/soy-param-migration
  781. * @return {!Object}
  782. */
  783. proto.google.protobuf.UInt32Value.prototype.toObject = function(opt_includeInstance) {
  784. return proto.google.protobuf.UInt32Value.toObject(opt_includeInstance, this);
  785. };
  786. /**
  787. * Static version of the {@see toObject} method.
  788. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  789. * the JSPB instance for transitional soy proto support:
  790. * http://goto/soy-param-migration
  791. * @param {!proto.google.protobuf.UInt32Value} msg The msg instance to transform.
  792. * @return {!Object}
  793. * @suppress {unusedLocalVariables} f is only used for nested messages
  794. */
  795. proto.google.protobuf.UInt32Value.toObject = function(includeInstance, msg) {
  796. var f, obj = {
  797. value: jspb.Message.getFieldWithDefault(msg, 1, 0)
  798. };
  799. if (includeInstance) {
  800. obj.$jspbMessageInstance = msg;
  801. }
  802. return obj;
  803. };
  804. }
  805. /**
  806. * Deserializes binary data (in protobuf wire format).
  807. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  808. * @return {!proto.google.protobuf.UInt32Value}
  809. */
  810. proto.google.protobuf.UInt32Value.deserializeBinary = function(bytes) {
  811. var reader = new jspb.BinaryReader(bytes);
  812. var msg = new proto.google.protobuf.UInt32Value;
  813. return proto.google.protobuf.UInt32Value.deserializeBinaryFromReader(msg, reader);
  814. };
  815. /**
  816. * Deserializes binary data (in protobuf wire format) from the
  817. * given reader into the given message object.
  818. * @param {!proto.google.protobuf.UInt32Value} msg The message object to deserialize into.
  819. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  820. * @return {!proto.google.protobuf.UInt32Value}
  821. */
  822. proto.google.protobuf.UInt32Value.deserializeBinaryFromReader = function(msg, reader) {
  823. while (reader.nextField()) {
  824. if (reader.isEndGroup()) {
  825. break;
  826. }
  827. var field = reader.getFieldNumber();
  828. switch (field) {
  829. case 1:
  830. var value = /** @type {number} */ (reader.readUint32());
  831. msg.setValue(value);
  832. break;
  833. default:
  834. reader.skipField();
  835. break;
  836. }
  837. }
  838. return msg;
  839. };
  840. /**
  841. * Serializes the message to binary data (in protobuf wire format).
  842. * @return {!Uint8Array}
  843. */
  844. proto.google.protobuf.UInt32Value.prototype.serializeBinary = function() {
  845. var writer = new jspb.BinaryWriter();
  846. proto.google.protobuf.UInt32Value.serializeBinaryToWriter(this, writer);
  847. return writer.getResultBuffer();
  848. };
  849. /**
  850. * Serializes the given message to binary data (in protobuf wire
  851. * format), writing to the given BinaryWriter.
  852. * @param {!proto.google.protobuf.UInt32Value} message
  853. * @param {!jspb.BinaryWriter} writer
  854. * @suppress {unusedLocalVariables} f is only used for nested messages
  855. */
  856. proto.google.protobuf.UInt32Value.serializeBinaryToWriter = function(message, writer) {
  857. var f = undefined;
  858. f = message.getValue();
  859. if (f !== 0) {
  860. writer.writeUint32(
  861. 1,
  862. f
  863. );
  864. }
  865. };
  866. /**
  867. * optional uint32 value = 1;
  868. * @return {number}
  869. */
  870. proto.google.protobuf.UInt32Value.prototype.getValue = function() {
  871. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  872. };
  873. /**
  874. * @param {number} value
  875. * @return {!proto.google.protobuf.UInt32Value} returns this
  876. */
  877. proto.google.protobuf.UInt32Value.prototype.setValue = function(value) {
  878. return jspb.Message.setProto3IntField(this, 1, value);
  879. };
  880. if (jspb.Message.GENERATE_TO_OBJECT) {
  881. /**
  882. * Creates an object representation of this proto.
  883. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  884. * Optional fields that are not set will be set to undefined.
  885. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  886. * For the list of reserved names please see:
  887. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  888. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  889. * JSPB instance for transitional soy proto support:
  890. * http://goto/soy-param-migration
  891. * @return {!Object}
  892. */
  893. proto.google.protobuf.BoolValue.prototype.toObject = function(opt_includeInstance) {
  894. return proto.google.protobuf.BoolValue.toObject(opt_includeInstance, this);
  895. };
  896. /**
  897. * Static version of the {@see toObject} method.
  898. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  899. * the JSPB instance for transitional soy proto support:
  900. * http://goto/soy-param-migration
  901. * @param {!proto.google.protobuf.BoolValue} msg The msg instance to transform.
  902. * @return {!Object}
  903. * @suppress {unusedLocalVariables} f is only used for nested messages
  904. */
  905. proto.google.protobuf.BoolValue.toObject = function(includeInstance, msg) {
  906. var f, obj = {
  907. value: jspb.Message.getBooleanFieldWithDefault(msg, 1, false)
  908. };
  909. if (includeInstance) {
  910. obj.$jspbMessageInstance = msg;
  911. }
  912. return obj;
  913. };
  914. }
  915. /**
  916. * Deserializes binary data (in protobuf wire format).
  917. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  918. * @return {!proto.google.protobuf.BoolValue}
  919. */
  920. proto.google.protobuf.BoolValue.deserializeBinary = function(bytes) {
  921. var reader = new jspb.BinaryReader(bytes);
  922. var msg = new proto.google.protobuf.BoolValue;
  923. return proto.google.protobuf.BoolValue.deserializeBinaryFromReader(msg, reader);
  924. };
  925. /**
  926. * Deserializes binary data (in protobuf wire format) from the
  927. * given reader into the given message object.
  928. * @param {!proto.google.protobuf.BoolValue} msg The message object to deserialize into.
  929. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  930. * @return {!proto.google.protobuf.BoolValue}
  931. */
  932. proto.google.protobuf.BoolValue.deserializeBinaryFromReader = function(msg, reader) {
  933. while (reader.nextField()) {
  934. if (reader.isEndGroup()) {
  935. break;
  936. }
  937. var field = reader.getFieldNumber();
  938. switch (field) {
  939. case 1:
  940. var value = /** @type {boolean} */ (reader.readBool());
  941. msg.setValue(value);
  942. break;
  943. default:
  944. reader.skipField();
  945. break;
  946. }
  947. }
  948. return msg;
  949. };
  950. /**
  951. * Serializes the message to binary data (in protobuf wire format).
  952. * @return {!Uint8Array}
  953. */
  954. proto.google.protobuf.BoolValue.prototype.serializeBinary = function() {
  955. var writer = new jspb.BinaryWriter();
  956. proto.google.protobuf.BoolValue.serializeBinaryToWriter(this, writer);
  957. return writer.getResultBuffer();
  958. };
  959. /**
  960. * Serializes the given message to binary data (in protobuf wire
  961. * format), writing to the given BinaryWriter.
  962. * @param {!proto.google.protobuf.BoolValue} message
  963. * @param {!jspb.BinaryWriter} writer
  964. * @suppress {unusedLocalVariables} f is only used for nested messages
  965. */
  966. proto.google.protobuf.BoolValue.serializeBinaryToWriter = function(message, writer) {
  967. var f = undefined;
  968. f = message.getValue();
  969. if (f) {
  970. writer.writeBool(
  971. 1,
  972. f
  973. );
  974. }
  975. };
  976. /**
  977. * optional bool value = 1;
  978. * @return {boolean}
  979. */
  980. proto.google.protobuf.BoolValue.prototype.getValue = function() {
  981. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
  982. };
  983. /**
  984. * @param {boolean} value
  985. * @return {!proto.google.protobuf.BoolValue} returns this
  986. */
  987. proto.google.protobuf.BoolValue.prototype.setValue = function(value) {
  988. return jspb.Message.setProto3BooleanField(this, 1, value);
  989. };
  990. if (jspb.Message.GENERATE_TO_OBJECT) {
  991. /**
  992. * Creates an object representation of this proto.
  993. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  994. * Optional fields that are not set will be set to undefined.
  995. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  996. * For the list of reserved names please see:
  997. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  998. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  999. * JSPB instance for transitional soy proto support:
  1000. * http://goto/soy-param-migration
  1001. * @return {!Object}
  1002. */
  1003. proto.google.protobuf.StringValue.prototype.toObject = function(opt_includeInstance) {
  1004. return proto.google.protobuf.StringValue.toObject(opt_includeInstance, this);
  1005. };
  1006. /**
  1007. * Static version of the {@see toObject} method.
  1008. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1009. * the JSPB instance for transitional soy proto support:
  1010. * http://goto/soy-param-migration
  1011. * @param {!proto.google.protobuf.StringValue} msg The msg instance to transform.
  1012. * @return {!Object}
  1013. * @suppress {unusedLocalVariables} f is only used for nested messages
  1014. */
  1015. proto.google.protobuf.StringValue.toObject = function(includeInstance, msg) {
  1016. var f, obj = {
  1017. value: jspb.Message.getFieldWithDefault(msg, 1, "")
  1018. };
  1019. if (includeInstance) {
  1020. obj.$jspbMessageInstance = msg;
  1021. }
  1022. return obj;
  1023. };
  1024. }
  1025. /**
  1026. * Deserializes binary data (in protobuf wire format).
  1027. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1028. * @return {!proto.google.protobuf.StringValue}
  1029. */
  1030. proto.google.protobuf.StringValue.deserializeBinary = function(bytes) {
  1031. var reader = new jspb.BinaryReader(bytes);
  1032. var msg = new proto.google.protobuf.StringValue;
  1033. return proto.google.protobuf.StringValue.deserializeBinaryFromReader(msg, reader);
  1034. };
  1035. /**
  1036. * Deserializes binary data (in protobuf wire format) from the
  1037. * given reader into the given message object.
  1038. * @param {!proto.google.protobuf.StringValue} msg The message object to deserialize into.
  1039. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1040. * @return {!proto.google.protobuf.StringValue}
  1041. */
  1042. proto.google.protobuf.StringValue.deserializeBinaryFromReader = function(msg, reader) {
  1043. while (reader.nextField()) {
  1044. if (reader.isEndGroup()) {
  1045. break;
  1046. }
  1047. var field = reader.getFieldNumber();
  1048. switch (field) {
  1049. case 1:
  1050. var value = /** @type {string} */ (reader.readString());
  1051. msg.setValue(value);
  1052. break;
  1053. default:
  1054. reader.skipField();
  1055. break;
  1056. }
  1057. }
  1058. return msg;
  1059. };
  1060. /**
  1061. * Serializes the message to binary data (in protobuf wire format).
  1062. * @return {!Uint8Array}
  1063. */
  1064. proto.google.protobuf.StringValue.prototype.serializeBinary = function() {
  1065. var writer = new jspb.BinaryWriter();
  1066. proto.google.protobuf.StringValue.serializeBinaryToWriter(this, writer);
  1067. return writer.getResultBuffer();
  1068. };
  1069. /**
  1070. * Serializes the given message to binary data (in protobuf wire
  1071. * format), writing to the given BinaryWriter.
  1072. * @param {!proto.google.protobuf.StringValue} message
  1073. * @param {!jspb.BinaryWriter} writer
  1074. * @suppress {unusedLocalVariables} f is only used for nested messages
  1075. */
  1076. proto.google.protobuf.StringValue.serializeBinaryToWriter = function(message, writer) {
  1077. var f = undefined;
  1078. f = message.getValue();
  1079. if (f.length > 0) {
  1080. writer.writeString(
  1081. 1,
  1082. f
  1083. );
  1084. }
  1085. };
  1086. /**
  1087. * optional string value = 1;
  1088. * @return {string}
  1089. */
  1090. proto.google.protobuf.StringValue.prototype.getValue = function() {
  1091. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  1092. };
  1093. /**
  1094. * @param {string} value
  1095. * @return {!proto.google.protobuf.StringValue} returns this
  1096. */
  1097. proto.google.protobuf.StringValue.prototype.setValue = function(value) {
  1098. return jspb.Message.setProto3StringField(this, 1, value);
  1099. };
  1100. if (jspb.Message.GENERATE_TO_OBJECT) {
  1101. /**
  1102. * Creates an object representation of this proto.
  1103. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1104. * Optional fields that are not set will be set to undefined.
  1105. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1106. * For the list of reserved names please see:
  1107. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  1108. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  1109. * JSPB instance for transitional soy proto support:
  1110. * http://goto/soy-param-migration
  1111. * @return {!Object}
  1112. */
  1113. proto.google.protobuf.BytesValue.prototype.toObject = function(opt_includeInstance) {
  1114. return proto.google.protobuf.BytesValue.toObject(opt_includeInstance, this);
  1115. };
  1116. /**
  1117. * Static version of the {@see toObject} method.
  1118. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1119. * the JSPB instance for transitional soy proto support:
  1120. * http://goto/soy-param-migration
  1121. * @param {!proto.google.protobuf.BytesValue} msg The msg instance to transform.
  1122. * @return {!Object}
  1123. * @suppress {unusedLocalVariables} f is only used for nested messages
  1124. */
  1125. proto.google.protobuf.BytesValue.toObject = function(includeInstance, msg) {
  1126. var f, obj = {
  1127. value: msg.getValue_asB64()
  1128. };
  1129. if (includeInstance) {
  1130. obj.$jspbMessageInstance = msg;
  1131. }
  1132. return obj;
  1133. };
  1134. }
  1135. /**
  1136. * Deserializes binary data (in protobuf wire format).
  1137. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1138. * @return {!proto.google.protobuf.BytesValue}
  1139. */
  1140. proto.google.protobuf.BytesValue.deserializeBinary = function(bytes) {
  1141. var reader = new jspb.BinaryReader(bytes);
  1142. var msg = new proto.google.protobuf.BytesValue;
  1143. return proto.google.protobuf.BytesValue.deserializeBinaryFromReader(msg, reader);
  1144. };
  1145. /**
  1146. * Deserializes binary data (in protobuf wire format) from the
  1147. * given reader into the given message object.
  1148. * @param {!proto.google.protobuf.BytesValue} msg The message object to deserialize into.
  1149. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1150. * @return {!proto.google.protobuf.BytesValue}
  1151. */
  1152. proto.google.protobuf.BytesValue.deserializeBinaryFromReader = function(msg, reader) {
  1153. while (reader.nextField()) {
  1154. if (reader.isEndGroup()) {
  1155. break;
  1156. }
  1157. var field = reader.getFieldNumber();
  1158. switch (field) {
  1159. case 1:
  1160. var value = /** @type {!Uint8Array} */ (reader.readBytes());
  1161. msg.setValue(value);
  1162. break;
  1163. default:
  1164. reader.skipField();
  1165. break;
  1166. }
  1167. }
  1168. return msg;
  1169. };
  1170. /**
  1171. * Serializes the message to binary data (in protobuf wire format).
  1172. * @return {!Uint8Array}
  1173. */
  1174. proto.google.protobuf.BytesValue.prototype.serializeBinary = function() {
  1175. var writer = new jspb.BinaryWriter();
  1176. proto.google.protobuf.BytesValue.serializeBinaryToWriter(this, writer);
  1177. return writer.getResultBuffer();
  1178. };
  1179. /**
  1180. * Serializes the given message to binary data (in protobuf wire
  1181. * format), writing to the given BinaryWriter.
  1182. * @param {!proto.google.protobuf.BytesValue} message
  1183. * @param {!jspb.BinaryWriter} writer
  1184. * @suppress {unusedLocalVariables} f is only used for nested messages
  1185. */
  1186. proto.google.protobuf.BytesValue.serializeBinaryToWriter = function(message, writer) {
  1187. var f = undefined;
  1188. f = message.getValue_asU8();
  1189. if (f.length > 0) {
  1190. writer.writeBytes(
  1191. 1,
  1192. f
  1193. );
  1194. }
  1195. };
  1196. /**
  1197. * optional bytes value = 1;
  1198. * @return {!(string|Uint8Array)}
  1199. */
  1200. proto.google.protobuf.BytesValue.prototype.getValue = function() {
  1201. return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  1202. };
  1203. /**
  1204. * optional bytes value = 1;
  1205. * This is a type-conversion wrapper around `getValue()`
  1206. * @return {string}
  1207. */
  1208. proto.google.protobuf.BytesValue.prototype.getValue_asB64 = function() {
  1209. return /** @type {string} */ (jspb.Message.bytesAsB64(
  1210. this.getValue()));
  1211. };
  1212. /**
  1213. * optional bytes value = 1;
  1214. * Note that Uint8Array is not supported on all browsers.
  1215. * @see http://caniuse.com/Uint8Array
  1216. * This is a type-conversion wrapper around `getValue()`
  1217. * @return {!Uint8Array}
  1218. */
  1219. proto.google.protobuf.BytesValue.prototype.getValue_asU8 = function() {
  1220. return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
  1221. this.getValue()));
  1222. };
  1223. /**
  1224. * @param {!(string|Uint8Array)} value
  1225. * @return {!proto.google.protobuf.BytesValue} returns this
  1226. */
  1227. proto.google.protobuf.BytesValue.prototype.setValue = function(value) {
  1228. return jspb.Message.setProto3BytesField(this, 1, value);
  1229. };
  1230. goog.object.extend(exports, proto.google.protobuf);