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