wrappers.js 42 KB

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