api_pb.js 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001
  1. // source: google/protobuf/api.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. var google_protobuf_source_context_pb = require('google-protobuf/google/protobuf/source_context_pb.js');
  23. goog.object.extend(proto, google_protobuf_source_context_pb);
  24. var google_protobuf_type_pb = require('google-protobuf/google/protobuf/type_pb.js');
  25. goog.object.extend(proto, google_protobuf_type_pb);
  26. goog.exportSymbol('proto.google.protobuf.Api', null, global);
  27. goog.exportSymbol('proto.google.protobuf.Method', null, global);
  28. goog.exportSymbol('proto.google.protobuf.Mixin', null, global);
  29. /**
  30. * Generated by JsPbCodeGenerator.
  31. * @param {Array=} opt_data Optional initial data array, typically from a
  32. * server response, or constructed directly in Javascript. The array is used
  33. * in place and becomes part of the constructed object. It is not cloned.
  34. * If no data is provided, the constructed object will be empty, but still
  35. * valid.
  36. * @extends {jspb.Message}
  37. * @constructor
  38. */
  39. proto.google.protobuf.Api = function(opt_data) {
  40. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.Api.repeatedFields_, null);
  41. };
  42. goog.inherits(proto.google.protobuf.Api, jspb.Message);
  43. if (goog.DEBUG && !COMPILED) {
  44. /**
  45. * @public
  46. * @override
  47. */
  48. proto.google.protobuf.Api.displayName = 'proto.google.protobuf.Api';
  49. }
  50. /**
  51. * Generated by JsPbCodeGenerator.
  52. * @param {Array=} opt_data Optional initial data array, typically from a
  53. * server response, or constructed directly in Javascript. The array is used
  54. * in place and becomes part of the constructed object. It is not cloned.
  55. * If no data is provided, the constructed object will be empty, but still
  56. * valid.
  57. * @extends {jspb.Message}
  58. * @constructor
  59. */
  60. proto.google.protobuf.Method = function(opt_data) {
  61. jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.Method.repeatedFields_, null);
  62. };
  63. goog.inherits(proto.google.protobuf.Method, jspb.Message);
  64. if (goog.DEBUG && !COMPILED) {
  65. /**
  66. * @public
  67. * @override
  68. */
  69. proto.google.protobuf.Method.displayName = 'proto.google.protobuf.Method';
  70. }
  71. /**
  72. * Generated by JsPbCodeGenerator.
  73. * @param {Array=} opt_data Optional initial data array, typically from a
  74. * server response, or constructed directly in Javascript. The array is used
  75. * in place and becomes part of the constructed object. It is not cloned.
  76. * If no data is provided, the constructed object will be empty, but still
  77. * valid.
  78. * @extends {jspb.Message}
  79. * @constructor
  80. */
  81. proto.google.protobuf.Mixin = function(opt_data) {
  82. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  83. };
  84. goog.inherits(proto.google.protobuf.Mixin, jspb.Message);
  85. if (goog.DEBUG && !COMPILED) {
  86. /**
  87. * @public
  88. * @override
  89. */
  90. proto.google.protobuf.Mixin.displayName = 'proto.google.protobuf.Mixin';
  91. }
  92. /**
  93. * List of repeated fields within this message type.
  94. * @private {!Array<number>}
  95. * @const
  96. */
  97. proto.google.protobuf.Api.repeatedFields_ = [2,3,6];
  98. if (jspb.Message.GENERATE_TO_OBJECT) {
  99. /**
  100. * Creates an object representation of this proto.
  101. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  102. * Optional fields that are not set will be set to undefined.
  103. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  104. * For the list of reserved names please see:
  105. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  106. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  107. * JSPB instance for transitional soy proto support:
  108. * http://goto/soy-param-migration
  109. * @return {!Object}
  110. */
  111. proto.google.protobuf.Api.prototype.toObject = function(opt_includeInstance) {
  112. return proto.google.protobuf.Api.toObject(opt_includeInstance, this);
  113. };
  114. /**
  115. * Static version of the {@see toObject} method.
  116. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  117. * the JSPB instance for transitional soy proto support:
  118. * http://goto/soy-param-migration
  119. * @param {!proto.google.protobuf.Api} msg The msg instance to transform.
  120. * @return {!Object}
  121. * @suppress {unusedLocalVariables} f is only used for nested messages
  122. */
  123. proto.google.protobuf.Api.toObject = function(includeInstance, msg) {
  124. var f, obj = {
  125. name: jspb.Message.getFieldWithDefault(msg, 1, ""),
  126. methodsList: jspb.Message.toObjectList(msg.getMethodsList(),
  127. proto.google.protobuf.Method.toObject, includeInstance),
  128. optionsList: jspb.Message.toObjectList(msg.getOptionsList(),
  129. google_protobuf_type_pb.Option.toObject, includeInstance),
  130. version: jspb.Message.getFieldWithDefault(msg, 4, ""),
  131. sourceContext: (f = msg.getSourceContext()) && google_protobuf_source_context_pb.SourceContext.toObject(includeInstance, f),
  132. mixinsList: jspb.Message.toObjectList(msg.getMixinsList(),
  133. proto.google.protobuf.Mixin.toObject, includeInstance),
  134. syntax: jspb.Message.getFieldWithDefault(msg, 7, 0)
  135. };
  136. if (includeInstance) {
  137. obj.$jspbMessageInstance = msg;
  138. }
  139. return obj;
  140. };
  141. }
  142. /**
  143. * Deserializes binary data (in protobuf wire format).
  144. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  145. * @return {!proto.google.protobuf.Api}
  146. */
  147. proto.google.protobuf.Api.deserializeBinary = function(bytes) {
  148. var reader = new jspb.BinaryReader(bytes);
  149. var msg = new proto.google.protobuf.Api;
  150. return proto.google.protobuf.Api.deserializeBinaryFromReader(msg, reader);
  151. };
  152. /**
  153. * Deserializes binary data (in protobuf wire format) from the
  154. * given reader into the given message object.
  155. * @param {!proto.google.protobuf.Api} msg The message object to deserialize into.
  156. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  157. * @return {!proto.google.protobuf.Api}
  158. */
  159. proto.google.protobuf.Api.deserializeBinaryFromReader = function(msg, reader) {
  160. while (reader.nextField()) {
  161. if (reader.isEndGroup()) {
  162. break;
  163. }
  164. var field = reader.getFieldNumber();
  165. switch (field) {
  166. case 1:
  167. var value = /** @type {string} */ (reader.readString());
  168. msg.setName(value);
  169. break;
  170. case 2:
  171. var value = new proto.google.protobuf.Method;
  172. reader.readMessage(value,proto.google.protobuf.Method.deserializeBinaryFromReader);
  173. msg.addMethods(value);
  174. break;
  175. case 3:
  176. var value = new google_protobuf_type_pb.Option;
  177. reader.readMessage(value,google_protobuf_type_pb.Option.deserializeBinaryFromReader);
  178. msg.addOptions(value);
  179. break;
  180. case 4:
  181. var value = /** @type {string} */ (reader.readString());
  182. msg.setVersion(value);
  183. break;
  184. case 5:
  185. var value = new google_protobuf_source_context_pb.SourceContext;
  186. reader.readMessage(value,google_protobuf_source_context_pb.SourceContext.deserializeBinaryFromReader);
  187. msg.setSourceContext(value);
  188. break;
  189. case 6:
  190. var value = new proto.google.protobuf.Mixin;
  191. reader.readMessage(value,proto.google.protobuf.Mixin.deserializeBinaryFromReader);
  192. msg.addMixins(value);
  193. break;
  194. case 7:
  195. var value = /** @type {!proto.google.protobuf.Syntax} */ (reader.readEnum());
  196. msg.setSyntax(value);
  197. break;
  198. default:
  199. reader.skipField();
  200. break;
  201. }
  202. }
  203. return msg;
  204. };
  205. /**
  206. * Serializes the message to binary data (in protobuf wire format).
  207. * @return {!Uint8Array}
  208. */
  209. proto.google.protobuf.Api.prototype.serializeBinary = function() {
  210. var writer = new jspb.BinaryWriter();
  211. proto.google.protobuf.Api.serializeBinaryToWriter(this, writer);
  212. return writer.getResultBuffer();
  213. };
  214. /**
  215. * Serializes the given message to binary data (in protobuf wire
  216. * format), writing to the given BinaryWriter.
  217. * @param {!proto.google.protobuf.Api} message
  218. * @param {!jspb.BinaryWriter} writer
  219. * @suppress {unusedLocalVariables} f is only used for nested messages
  220. */
  221. proto.google.protobuf.Api.serializeBinaryToWriter = function(message, writer) {
  222. var f = undefined;
  223. f = message.getName();
  224. if (f.length > 0) {
  225. writer.writeString(
  226. 1,
  227. f
  228. );
  229. }
  230. f = message.getMethodsList();
  231. if (f.length > 0) {
  232. writer.writeRepeatedMessage(
  233. 2,
  234. f,
  235. proto.google.protobuf.Method.serializeBinaryToWriter
  236. );
  237. }
  238. f = message.getOptionsList();
  239. if (f.length > 0) {
  240. writer.writeRepeatedMessage(
  241. 3,
  242. f,
  243. google_protobuf_type_pb.Option.serializeBinaryToWriter
  244. );
  245. }
  246. f = message.getVersion();
  247. if (f.length > 0) {
  248. writer.writeString(
  249. 4,
  250. f
  251. );
  252. }
  253. f = message.getSourceContext();
  254. if (f != null) {
  255. writer.writeMessage(
  256. 5,
  257. f,
  258. google_protobuf_source_context_pb.SourceContext.serializeBinaryToWriter
  259. );
  260. }
  261. f = message.getMixinsList();
  262. if (f.length > 0) {
  263. writer.writeRepeatedMessage(
  264. 6,
  265. f,
  266. proto.google.protobuf.Mixin.serializeBinaryToWriter
  267. );
  268. }
  269. f = message.getSyntax();
  270. if (f !== 0.0) {
  271. writer.writeEnum(
  272. 7,
  273. f
  274. );
  275. }
  276. };
  277. /**
  278. * optional string name = 1;
  279. * @return {string}
  280. */
  281. proto.google.protobuf.Api.prototype.getName = function() {
  282. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  283. };
  284. /**
  285. * @param {string} value
  286. * @return {!proto.google.protobuf.Api} returns this
  287. */
  288. proto.google.protobuf.Api.prototype.setName = function(value) {
  289. return jspb.Message.setProto3StringField(this, 1, value);
  290. };
  291. /**
  292. * repeated Method methods = 2;
  293. * @return {!Array<!proto.google.protobuf.Method>}
  294. */
  295. proto.google.protobuf.Api.prototype.getMethodsList = function() {
  296. return /** @type{!Array<!proto.google.protobuf.Method>} */ (
  297. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.Method, 2));
  298. };
  299. /**
  300. * @param {!Array<!proto.google.protobuf.Method>} value
  301. * @return {!proto.google.protobuf.Api} returns this
  302. */
  303. proto.google.protobuf.Api.prototype.setMethodsList = function(value) {
  304. return jspb.Message.setRepeatedWrapperField(this, 2, value);
  305. };
  306. /**
  307. * @param {!proto.google.protobuf.Method=} opt_value
  308. * @param {number=} opt_index
  309. * @return {!proto.google.protobuf.Method}
  310. */
  311. proto.google.protobuf.Api.prototype.addMethods = function(opt_value, opt_index) {
  312. return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.Method, opt_index);
  313. };
  314. /**
  315. * Clears the list making it empty but non-null.
  316. * @return {!proto.google.protobuf.Api} returns this
  317. */
  318. proto.google.protobuf.Api.prototype.clearMethodsList = function() {
  319. return this.setMethodsList([]);
  320. };
  321. /**
  322. * repeated Option options = 3;
  323. * @return {!Array<!proto.google.protobuf.Option>}
  324. */
  325. proto.google.protobuf.Api.prototype.getOptionsList = function() {
  326. return /** @type{!Array<!proto.google.protobuf.Option>} */ (
  327. jspb.Message.getRepeatedWrapperField(this, google_protobuf_type_pb.Option, 3));
  328. };
  329. /**
  330. * @param {!Array<!proto.google.protobuf.Option>} value
  331. * @return {!proto.google.protobuf.Api} returns this
  332. */
  333. proto.google.protobuf.Api.prototype.setOptionsList = function(value) {
  334. return jspb.Message.setRepeatedWrapperField(this, 3, value);
  335. };
  336. /**
  337. * @param {!proto.google.protobuf.Option=} opt_value
  338. * @param {number=} opt_index
  339. * @return {!proto.google.protobuf.Option}
  340. */
  341. proto.google.protobuf.Api.prototype.addOptions = function(opt_value, opt_index) {
  342. return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Option, opt_index);
  343. };
  344. /**
  345. * Clears the list making it empty but non-null.
  346. * @return {!proto.google.protobuf.Api} returns this
  347. */
  348. proto.google.protobuf.Api.prototype.clearOptionsList = function() {
  349. return this.setOptionsList([]);
  350. };
  351. /**
  352. * optional string version = 4;
  353. * @return {string}
  354. */
  355. proto.google.protobuf.Api.prototype.getVersion = function() {
  356. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
  357. };
  358. /**
  359. * @param {string} value
  360. * @return {!proto.google.protobuf.Api} returns this
  361. */
  362. proto.google.protobuf.Api.prototype.setVersion = function(value) {
  363. return jspb.Message.setProto3StringField(this, 4, value);
  364. };
  365. /**
  366. * optional SourceContext source_context = 5;
  367. * @return {?proto.google.protobuf.SourceContext}
  368. */
  369. proto.google.protobuf.Api.prototype.getSourceContext = function() {
  370. return /** @type{?proto.google.protobuf.SourceContext} */ (
  371. jspb.Message.getWrapperField(this, google_protobuf_source_context_pb.SourceContext, 5));
  372. };
  373. /**
  374. * @param {?proto.google.protobuf.SourceContext|undefined} value
  375. * @return {!proto.google.protobuf.Api} returns this
  376. */
  377. proto.google.protobuf.Api.prototype.setSourceContext = function(value) {
  378. return jspb.Message.setWrapperField(this, 5, value);
  379. };
  380. /**
  381. * Clears the message field making it undefined.
  382. * @return {!proto.google.protobuf.Api} returns this
  383. */
  384. proto.google.protobuf.Api.prototype.clearSourceContext = function() {
  385. return this.setSourceContext(undefined);
  386. };
  387. /**
  388. * Returns whether this field is set.
  389. * @return {boolean}
  390. */
  391. proto.google.protobuf.Api.prototype.hasSourceContext = function() {
  392. return jspb.Message.getField(this, 5) != null;
  393. };
  394. /**
  395. * repeated Mixin mixins = 6;
  396. * @return {!Array<!proto.google.protobuf.Mixin>}
  397. */
  398. proto.google.protobuf.Api.prototype.getMixinsList = function() {
  399. return /** @type{!Array<!proto.google.protobuf.Mixin>} */ (
  400. jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.Mixin, 6));
  401. };
  402. /**
  403. * @param {!Array<!proto.google.protobuf.Mixin>} value
  404. * @return {!proto.google.protobuf.Api} returns this
  405. */
  406. proto.google.protobuf.Api.prototype.setMixinsList = function(value) {
  407. return jspb.Message.setRepeatedWrapperField(this, 6, value);
  408. };
  409. /**
  410. * @param {!proto.google.protobuf.Mixin=} opt_value
  411. * @param {number=} opt_index
  412. * @return {!proto.google.protobuf.Mixin}
  413. */
  414. proto.google.protobuf.Api.prototype.addMixins = function(opt_value, opt_index) {
  415. return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.Mixin, opt_index);
  416. };
  417. /**
  418. * Clears the list making it empty but non-null.
  419. * @return {!proto.google.protobuf.Api} returns this
  420. */
  421. proto.google.protobuf.Api.prototype.clearMixinsList = function() {
  422. return this.setMixinsList([]);
  423. };
  424. /**
  425. * optional Syntax syntax = 7;
  426. * @return {!proto.google.protobuf.Syntax}
  427. */
  428. proto.google.protobuf.Api.prototype.getSyntax = function() {
  429. return /** @type {!proto.google.protobuf.Syntax} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
  430. };
  431. /**
  432. * @param {!proto.google.protobuf.Syntax} value
  433. * @return {!proto.google.protobuf.Api} returns this
  434. */
  435. proto.google.protobuf.Api.prototype.setSyntax = function(value) {
  436. return jspb.Message.setProto3EnumField(this, 7, value);
  437. };
  438. /**
  439. * List of repeated fields within this message type.
  440. * @private {!Array<number>}
  441. * @const
  442. */
  443. proto.google.protobuf.Method.repeatedFields_ = [6];
  444. if (jspb.Message.GENERATE_TO_OBJECT) {
  445. /**
  446. * Creates an object representation of this proto.
  447. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  448. * Optional fields that are not set will be set to undefined.
  449. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  450. * For the list of reserved names please see:
  451. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  452. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  453. * JSPB instance for transitional soy proto support:
  454. * http://goto/soy-param-migration
  455. * @return {!Object}
  456. */
  457. proto.google.protobuf.Method.prototype.toObject = function(opt_includeInstance) {
  458. return proto.google.protobuf.Method.toObject(opt_includeInstance, this);
  459. };
  460. /**
  461. * Static version of the {@see toObject} method.
  462. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  463. * the JSPB instance for transitional soy proto support:
  464. * http://goto/soy-param-migration
  465. * @param {!proto.google.protobuf.Method} msg The msg instance to transform.
  466. * @return {!Object}
  467. * @suppress {unusedLocalVariables} f is only used for nested messages
  468. */
  469. proto.google.protobuf.Method.toObject = function(includeInstance, msg) {
  470. var f, obj = {
  471. name: jspb.Message.getFieldWithDefault(msg, 1, ""),
  472. requestTypeUrl: jspb.Message.getFieldWithDefault(msg, 2, ""),
  473. requestStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
  474. responseTypeUrl: jspb.Message.getFieldWithDefault(msg, 4, ""),
  475. responseStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
  476. optionsList: jspb.Message.toObjectList(msg.getOptionsList(),
  477. google_protobuf_type_pb.Option.toObject, includeInstance),
  478. syntax: jspb.Message.getFieldWithDefault(msg, 7, 0)
  479. };
  480. if (includeInstance) {
  481. obj.$jspbMessageInstance = msg;
  482. }
  483. return obj;
  484. };
  485. }
  486. /**
  487. * Deserializes binary data (in protobuf wire format).
  488. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  489. * @return {!proto.google.protobuf.Method}
  490. */
  491. proto.google.protobuf.Method.deserializeBinary = function(bytes) {
  492. var reader = new jspb.BinaryReader(bytes);
  493. var msg = new proto.google.protobuf.Method;
  494. return proto.google.protobuf.Method.deserializeBinaryFromReader(msg, reader);
  495. };
  496. /**
  497. * Deserializes binary data (in protobuf wire format) from the
  498. * given reader into the given message object.
  499. * @param {!proto.google.protobuf.Method} msg The message object to deserialize into.
  500. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  501. * @return {!proto.google.protobuf.Method}
  502. */
  503. proto.google.protobuf.Method.deserializeBinaryFromReader = function(msg, reader) {
  504. while (reader.nextField()) {
  505. if (reader.isEndGroup()) {
  506. break;
  507. }
  508. var field = reader.getFieldNumber();
  509. switch (field) {
  510. case 1:
  511. var value = /** @type {string} */ (reader.readString());
  512. msg.setName(value);
  513. break;
  514. case 2:
  515. var value = /** @type {string} */ (reader.readString());
  516. msg.setRequestTypeUrl(value);
  517. break;
  518. case 3:
  519. var value = /** @type {boolean} */ (reader.readBool());
  520. msg.setRequestStreaming(value);
  521. break;
  522. case 4:
  523. var value = /** @type {string} */ (reader.readString());
  524. msg.setResponseTypeUrl(value);
  525. break;
  526. case 5:
  527. var value = /** @type {boolean} */ (reader.readBool());
  528. msg.setResponseStreaming(value);
  529. break;
  530. case 6:
  531. var value = new google_protobuf_type_pb.Option;
  532. reader.readMessage(value,google_protobuf_type_pb.Option.deserializeBinaryFromReader);
  533. msg.addOptions(value);
  534. break;
  535. case 7:
  536. var value = /** @type {!proto.google.protobuf.Syntax} */ (reader.readEnum());
  537. msg.setSyntax(value);
  538. break;
  539. default:
  540. reader.skipField();
  541. break;
  542. }
  543. }
  544. return msg;
  545. };
  546. /**
  547. * Serializes the message to binary data (in protobuf wire format).
  548. * @return {!Uint8Array}
  549. */
  550. proto.google.protobuf.Method.prototype.serializeBinary = function() {
  551. var writer = new jspb.BinaryWriter();
  552. proto.google.protobuf.Method.serializeBinaryToWriter(this, writer);
  553. return writer.getResultBuffer();
  554. };
  555. /**
  556. * Serializes the given message to binary data (in protobuf wire
  557. * format), writing to the given BinaryWriter.
  558. * @param {!proto.google.protobuf.Method} message
  559. * @param {!jspb.BinaryWriter} writer
  560. * @suppress {unusedLocalVariables} f is only used for nested messages
  561. */
  562. proto.google.protobuf.Method.serializeBinaryToWriter = function(message, writer) {
  563. var f = undefined;
  564. f = message.getName();
  565. if (f.length > 0) {
  566. writer.writeString(
  567. 1,
  568. f
  569. );
  570. }
  571. f = message.getRequestTypeUrl();
  572. if (f.length > 0) {
  573. writer.writeString(
  574. 2,
  575. f
  576. );
  577. }
  578. f = message.getRequestStreaming();
  579. if (f) {
  580. writer.writeBool(
  581. 3,
  582. f
  583. );
  584. }
  585. f = message.getResponseTypeUrl();
  586. if (f.length > 0) {
  587. writer.writeString(
  588. 4,
  589. f
  590. );
  591. }
  592. f = message.getResponseStreaming();
  593. if (f) {
  594. writer.writeBool(
  595. 5,
  596. f
  597. );
  598. }
  599. f = message.getOptionsList();
  600. if (f.length > 0) {
  601. writer.writeRepeatedMessage(
  602. 6,
  603. f,
  604. google_protobuf_type_pb.Option.serializeBinaryToWriter
  605. );
  606. }
  607. f = message.getSyntax();
  608. if (f !== 0.0) {
  609. writer.writeEnum(
  610. 7,
  611. f
  612. );
  613. }
  614. };
  615. /**
  616. * optional string name = 1;
  617. * @return {string}
  618. */
  619. proto.google.protobuf.Method.prototype.getName = function() {
  620. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  621. };
  622. /**
  623. * @param {string} value
  624. * @return {!proto.google.protobuf.Method} returns this
  625. */
  626. proto.google.protobuf.Method.prototype.setName = function(value) {
  627. return jspb.Message.setProto3StringField(this, 1, value);
  628. };
  629. /**
  630. * optional string request_type_url = 2;
  631. * @return {string}
  632. */
  633. proto.google.protobuf.Method.prototype.getRequestTypeUrl = function() {
  634. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  635. };
  636. /**
  637. * @param {string} value
  638. * @return {!proto.google.protobuf.Method} returns this
  639. */
  640. proto.google.protobuf.Method.prototype.setRequestTypeUrl = function(value) {
  641. return jspb.Message.setProto3StringField(this, 2, value);
  642. };
  643. /**
  644. * optional bool request_streaming = 3;
  645. * @return {boolean}
  646. */
  647. proto.google.protobuf.Method.prototype.getRequestStreaming = function() {
  648. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
  649. };
  650. /**
  651. * @param {boolean} value
  652. * @return {!proto.google.protobuf.Method} returns this
  653. */
  654. proto.google.protobuf.Method.prototype.setRequestStreaming = function(value) {
  655. return jspb.Message.setProto3BooleanField(this, 3, value);
  656. };
  657. /**
  658. * optional string response_type_url = 4;
  659. * @return {string}
  660. */
  661. proto.google.protobuf.Method.prototype.getResponseTypeUrl = function() {
  662. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
  663. };
  664. /**
  665. * @param {string} value
  666. * @return {!proto.google.protobuf.Method} returns this
  667. */
  668. proto.google.protobuf.Method.prototype.setResponseTypeUrl = function(value) {
  669. return jspb.Message.setProto3StringField(this, 4, value);
  670. };
  671. /**
  672. * optional bool response_streaming = 5;
  673. * @return {boolean}
  674. */
  675. proto.google.protobuf.Method.prototype.getResponseStreaming = function() {
  676. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
  677. };
  678. /**
  679. * @param {boolean} value
  680. * @return {!proto.google.protobuf.Method} returns this
  681. */
  682. proto.google.protobuf.Method.prototype.setResponseStreaming = function(value) {
  683. return jspb.Message.setProto3BooleanField(this, 5, value);
  684. };
  685. /**
  686. * repeated Option options = 6;
  687. * @return {!Array<!proto.google.protobuf.Option>}
  688. */
  689. proto.google.protobuf.Method.prototype.getOptionsList = function() {
  690. return /** @type{!Array<!proto.google.protobuf.Option>} */ (
  691. jspb.Message.getRepeatedWrapperField(this, google_protobuf_type_pb.Option, 6));
  692. };
  693. /**
  694. * @param {!Array<!proto.google.protobuf.Option>} value
  695. * @return {!proto.google.protobuf.Method} returns this
  696. */
  697. proto.google.protobuf.Method.prototype.setOptionsList = function(value) {
  698. return jspb.Message.setRepeatedWrapperField(this, 6, value);
  699. };
  700. /**
  701. * @param {!proto.google.protobuf.Option=} opt_value
  702. * @param {number=} opt_index
  703. * @return {!proto.google.protobuf.Option}
  704. */
  705. proto.google.protobuf.Method.prototype.addOptions = function(opt_value, opt_index) {
  706. return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.Option, opt_index);
  707. };
  708. /**
  709. * Clears the list making it empty but non-null.
  710. * @return {!proto.google.protobuf.Method} returns this
  711. */
  712. proto.google.protobuf.Method.prototype.clearOptionsList = function() {
  713. return this.setOptionsList([]);
  714. };
  715. /**
  716. * optional Syntax syntax = 7;
  717. * @return {!proto.google.protobuf.Syntax}
  718. */
  719. proto.google.protobuf.Method.prototype.getSyntax = function() {
  720. return /** @type {!proto.google.protobuf.Syntax} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
  721. };
  722. /**
  723. * @param {!proto.google.protobuf.Syntax} value
  724. * @return {!proto.google.protobuf.Method} returns this
  725. */
  726. proto.google.protobuf.Method.prototype.setSyntax = function(value) {
  727. return jspb.Message.setProto3EnumField(this, 7, value);
  728. };
  729. if (jspb.Message.GENERATE_TO_OBJECT) {
  730. /**
  731. * Creates an object representation of this proto.
  732. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  733. * Optional fields that are not set will be set to undefined.
  734. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  735. * For the list of reserved names please see:
  736. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  737. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  738. * JSPB instance for transitional soy proto support:
  739. * http://goto/soy-param-migration
  740. * @return {!Object}
  741. */
  742. proto.google.protobuf.Mixin.prototype.toObject = function(opt_includeInstance) {
  743. return proto.google.protobuf.Mixin.toObject(opt_includeInstance, this);
  744. };
  745. /**
  746. * Static version of the {@see toObject} method.
  747. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  748. * the JSPB instance for transitional soy proto support:
  749. * http://goto/soy-param-migration
  750. * @param {!proto.google.protobuf.Mixin} msg The msg instance to transform.
  751. * @return {!Object}
  752. * @suppress {unusedLocalVariables} f is only used for nested messages
  753. */
  754. proto.google.protobuf.Mixin.toObject = function(includeInstance, msg) {
  755. var f, obj = {
  756. name: jspb.Message.getFieldWithDefault(msg, 1, ""),
  757. root: jspb.Message.getFieldWithDefault(msg, 2, "")
  758. };
  759. if (includeInstance) {
  760. obj.$jspbMessageInstance = msg;
  761. }
  762. return obj;
  763. };
  764. }
  765. /**
  766. * Deserializes binary data (in protobuf wire format).
  767. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  768. * @return {!proto.google.protobuf.Mixin}
  769. */
  770. proto.google.protobuf.Mixin.deserializeBinary = function(bytes) {
  771. var reader = new jspb.BinaryReader(bytes);
  772. var msg = new proto.google.protobuf.Mixin;
  773. return proto.google.protobuf.Mixin.deserializeBinaryFromReader(msg, reader);
  774. };
  775. /**
  776. * Deserializes binary data (in protobuf wire format) from the
  777. * given reader into the given message object.
  778. * @param {!proto.google.protobuf.Mixin} msg The message object to deserialize into.
  779. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  780. * @return {!proto.google.protobuf.Mixin}
  781. */
  782. proto.google.protobuf.Mixin.deserializeBinaryFromReader = function(msg, reader) {
  783. while (reader.nextField()) {
  784. if (reader.isEndGroup()) {
  785. break;
  786. }
  787. var field = reader.getFieldNumber();
  788. switch (field) {
  789. case 1:
  790. var value = /** @type {string} */ (reader.readString());
  791. msg.setName(value);
  792. break;
  793. case 2:
  794. var value = /** @type {string} */ (reader.readString());
  795. msg.setRoot(value);
  796. break;
  797. default:
  798. reader.skipField();
  799. break;
  800. }
  801. }
  802. return msg;
  803. };
  804. /**
  805. * Serializes the message to binary data (in protobuf wire format).
  806. * @return {!Uint8Array}
  807. */
  808. proto.google.protobuf.Mixin.prototype.serializeBinary = function() {
  809. var writer = new jspb.BinaryWriter();
  810. proto.google.protobuf.Mixin.serializeBinaryToWriter(this, writer);
  811. return writer.getResultBuffer();
  812. };
  813. /**
  814. * Serializes the given message to binary data (in protobuf wire
  815. * format), writing to the given BinaryWriter.
  816. * @param {!proto.google.protobuf.Mixin} message
  817. * @param {!jspb.BinaryWriter} writer
  818. * @suppress {unusedLocalVariables} f is only used for nested messages
  819. */
  820. proto.google.protobuf.Mixin.serializeBinaryToWriter = function(message, writer) {
  821. var f = undefined;
  822. f = message.getName();
  823. if (f.length > 0) {
  824. writer.writeString(
  825. 1,
  826. f
  827. );
  828. }
  829. f = message.getRoot();
  830. if (f.length > 0) {
  831. writer.writeString(
  832. 2,
  833. f
  834. );
  835. }
  836. };
  837. /**
  838. * optional string name = 1;
  839. * @return {string}
  840. */
  841. proto.google.protobuf.Mixin.prototype.getName = function() {
  842. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  843. };
  844. /**
  845. * @param {string} value
  846. * @return {!proto.google.protobuf.Mixin} returns this
  847. */
  848. proto.google.protobuf.Mixin.prototype.setName = function(value) {
  849. return jspb.Message.setProto3StringField(this, 1, value);
  850. };
  851. /**
  852. * optional string root = 2;
  853. * @return {string}
  854. */
  855. proto.google.protobuf.Mixin.prototype.getRoot = function() {
  856. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  857. };
  858. /**
  859. * @param {string} value
  860. * @return {!proto.google.protobuf.Mixin} returns this
  861. */
  862. proto.google.protobuf.Mixin.prototype.setRoot = function(value) {
  863. return jspb.Message.setProto3StringField(this, 2, value);
  864. };
  865. goog.object.extend(exports, proto.google.protobuf);