plugin_pb.js 45 KB

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