Source: proto/google/protobuf/compiler/plugin_pb.js

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