12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001 |
- // source: google/protobuf/api.proto
- /**
- * @fileoverview
- * @enhanceable
- * @suppress {missingRequire} reports error on implicit type usages.
- * @suppress {messageConventions} JS Compiler reports an error if a variable or
- * field starts with 'MSG_' and isn't a translatable message.
- * @public
- */
- // GENERATED CODE -- DO NOT EDIT!
- /* eslint-disable */
- // @ts-nocheck
- var jspb = require('google-protobuf');
- var goog = jspb;
- var global =
- (typeof globalThis !== 'undefined' && globalThis) ||
- (typeof window !== 'undefined' && window) ||
- (typeof global !== 'undefined' && global) ||
- (typeof self !== 'undefined' && self) ||
- (function () { return this; }).call(null) ||
- Function('return this')();
- var google_protobuf_source_context_pb = require('google-protobuf/google/protobuf/source_context_pb.js');
- goog.object.extend(proto, google_protobuf_source_context_pb);
- var google_protobuf_type_pb = require('google-protobuf/google/protobuf/type_pb.js');
- goog.object.extend(proto, google_protobuf_type_pb);
- goog.exportSymbol('proto.google.protobuf.Api', null, global);
- goog.exportSymbol('proto.google.protobuf.Method', null, global);
- goog.exportSymbol('proto.google.protobuf.Mixin', null, global);
- /**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
- proto.google.protobuf.Api = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.Api.repeatedFields_, null);
- };
- goog.inherits(proto.google.protobuf.Api, jspb.Message);
- if (goog.DEBUG && !COMPILED) {
- /**
- * @public
- * @override
- */
- proto.google.protobuf.Api.displayName = 'proto.google.protobuf.Api';
- }
- /**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
- proto.google.protobuf.Method = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.Method.repeatedFields_, null);
- };
- goog.inherits(proto.google.protobuf.Method, jspb.Message);
- if (goog.DEBUG && !COMPILED) {
- /**
- * @public
- * @override
- */
- proto.google.protobuf.Method.displayName = 'proto.google.protobuf.Method';
- }
- /**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
- proto.google.protobuf.Mixin = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
- };
- goog.inherits(proto.google.protobuf.Mixin, jspb.Message);
- if (goog.DEBUG && !COMPILED) {
- /**
- * @public
- * @override
- */
- proto.google.protobuf.Mixin.displayName = 'proto.google.protobuf.Mixin';
- }
- /**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
- proto.google.protobuf.Api.repeatedFields_ = [2,3,6];
- if (jspb.Message.GENERATE_TO_OBJECT) {
- /**
- * Creates an object representation of this proto.
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
- * Optional fields that are not set will be set to undefined.
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
- * For the list of reserved names please see:
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
- * JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @return {!Object}
- */
- proto.google.protobuf.Api.prototype.toObject = function(opt_includeInstance) {
- return proto.google.protobuf.Api.toObject(opt_includeInstance, this);
- };
- /**
- * Static version of the {@see toObject} method.
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
- * the JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @param {!proto.google.protobuf.Api} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.google.protobuf.Api.toObject = function(includeInstance, msg) {
- var f, obj = {
- name: jspb.Message.getFieldWithDefault(msg, 1, ""),
- methodsList: jspb.Message.toObjectList(msg.getMethodsList(),
- proto.google.protobuf.Method.toObject, includeInstance),
- optionsList: jspb.Message.toObjectList(msg.getOptionsList(),
- google_protobuf_type_pb.Option.toObject, includeInstance),
- version: jspb.Message.getFieldWithDefault(msg, 4, ""),
- sourceContext: (f = msg.getSourceContext()) && google_protobuf_source_context_pb.SourceContext.toObject(includeInstance, f),
- mixinsList: jspb.Message.toObjectList(msg.getMixinsList(),
- proto.google.protobuf.Mixin.toObject, includeInstance),
- syntax: jspb.Message.getFieldWithDefault(msg, 7, 0)
- };
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
- };
- }
- /**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.google.protobuf.Api}
- */
- proto.google.protobuf.Api.deserializeBinary = function(bytes) {
- var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.google.protobuf.Api;
- return proto.google.protobuf.Api.deserializeBinaryFromReader(msg, reader);
- };
- /**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.google.protobuf.Api} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.google.protobuf.Api}
- */
- proto.google.protobuf.Api.deserializeBinaryFromReader = function(msg, reader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- var field = reader.getFieldNumber();
- switch (field) {
- case 1:
- var value = /** @type {string} */ (reader.readString());
- msg.setName(value);
- break;
- case 2:
- var value = new proto.google.protobuf.Method;
- reader.readMessage(value,proto.google.protobuf.Method.deserializeBinaryFromReader);
- msg.addMethods(value);
- break;
- case 3:
- var value = new google_protobuf_type_pb.Option;
- reader.readMessage(value,google_protobuf_type_pb.Option.deserializeBinaryFromReader);
- msg.addOptions(value);
- break;
- case 4:
- var value = /** @type {string} */ (reader.readString());
- msg.setVersion(value);
- break;
- case 5:
- var value = new google_protobuf_source_context_pb.SourceContext;
- reader.readMessage(value,google_protobuf_source_context_pb.SourceContext.deserializeBinaryFromReader);
- msg.setSourceContext(value);
- break;
- case 6:
- var value = new proto.google.protobuf.Mixin;
- reader.readMessage(value,proto.google.protobuf.Mixin.deserializeBinaryFromReader);
- msg.addMixins(value);
- break;
- case 7:
- var value = /** @type {!proto.google.protobuf.Syntax} */ (reader.readEnum());
- msg.setSyntax(value);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
- };
- /**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
- proto.google.protobuf.Api.prototype.serializeBinary = function() {
- var writer = new jspb.BinaryWriter();
- proto.google.protobuf.Api.serializeBinaryToWriter(this, writer);
- return writer.getResultBuffer();
- };
- /**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.google.protobuf.Api} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.google.protobuf.Api.serializeBinaryToWriter = function(message, writer) {
- var f = undefined;
- f = message.getName();
- if (f.length > 0) {
- writer.writeString(
- 1,
- f
- );
- }
- f = message.getMethodsList();
- if (f.length > 0) {
- writer.writeRepeatedMessage(
- 2,
- f,
- proto.google.protobuf.Method.serializeBinaryToWriter
- );
- }
- f = message.getOptionsList();
- if (f.length > 0) {
- writer.writeRepeatedMessage(
- 3,
- f,
- google_protobuf_type_pb.Option.serializeBinaryToWriter
- );
- }
- f = message.getVersion();
- if (f.length > 0) {
- writer.writeString(
- 4,
- f
- );
- }
- f = message.getSourceContext();
- if (f != null) {
- writer.writeMessage(
- 5,
- f,
- google_protobuf_source_context_pb.SourceContext.serializeBinaryToWriter
- );
- }
- f = message.getMixinsList();
- if (f.length > 0) {
- writer.writeRepeatedMessage(
- 6,
- f,
- proto.google.protobuf.Mixin.serializeBinaryToWriter
- );
- }
- f = message.getSyntax();
- if (f !== 0.0) {
- writer.writeEnum(
- 7,
- f
- );
- }
- };
- /**
- * optional string name = 1;
- * @return {string}
- */
- proto.google.protobuf.Api.prototype.getName = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.setName = function(value) {
- return jspb.Message.setProto3StringField(this, 1, value);
- };
- /**
- * repeated Method methods = 2;
- * @return {!Array<!proto.google.protobuf.Method>}
- */
- proto.google.protobuf.Api.prototype.getMethodsList = function() {
- return /** @type{!Array<!proto.google.protobuf.Method>} */ (
- jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.Method, 2));
- };
- /**
- * @param {!Array<!proto.google.protobuf.Method>} value
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.setMethodsList = function(value) {
- return jspb.Message.setRepeatedWrapperField(this, 2, value);
- };
- /**
- * @param {!proto.google.protobuf.Method=} opt_value
- * @param {number=} opt_index
- * @return {!proto.google.protobuf.Method}
- */
- proto.google.protobuf.Api.prototype.addMethods = function(opt_value, opt_index) {
- return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.Method, opt_index);
- };
- /**
- * Clears the list making it empty but non-null.
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.clearMethodsList = function() {
- return this.setMethodsList([]);
- };
- /**
- * repeated Option options = 3;
- * @return {!Array<!proto.google.protobuf.Option>}
- */
- proto.google.protobuf.Api.prototype.getOptionsList = function() {
- return /** @type{!Array<!proto.google.protobuf.Option>} */ (
- jspb.Message.getRepeatedWrapperField(this, google_protobuf_type_pb.Option, 3));
- };
- /**
- * @param {!Array<!proto.google.protobuf.Option>} value
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.setOptionsList = function(value) {
- return jspb.Message.setRepeatedWrapperField(this, 3, value);
- };
- /**
- * @param {!proto.google.protobuf.Option=} opt_value
- * @param {number=} opt_index
- * @return {!proto.google.protobuf.Option}
- */
- proto.google.protobuf.Api.prototype.addOptions = function(opt_value, opt_index) {
- return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Option, opt_index);
- };
- /**
- * Clears the list making it empty but non-null.
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.clearOptionsList = function() {
- return this.setOptionsList([]);
- };
- /**
- * optional string version = 4;
- * @return {string}
- */
- proto.google.protobuf.Api.prototype.getVersion = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.setVersion = function(value) {
- return jspb.Message.setProto3StringField(this, 4, value);
- };
- /**
- * optional SourceContext source_context = 5;
- * @return {?proto.google.protobuf.SourceContext}
- */
- proto.google.protobuf.Api.prototype.getSourceContext = function() {
- return /** @type{?proto.google.protobuf.SourceContext} */ (
- jspb.Message.getWrapperField(this, google_protobuf_source_context_pb.SourceContext, 5));
- };
- /**
- * @param {?proto.google.protobuf.SourceContext|undefined} value
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.setSourceContext = function(value) {
- return jspb.Message.setWrapperField(this, 5, value);
- };
- /**
- * Clears the message field making it undefined.
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.clearSourceContext = function() {
- return this.setSourceContext(undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.google.protobuf.Api.prototype.hasSourceContext = function() {
- return jspb.Message.getField(this, 5) != null;
- };
- /**
- * repeated Mixin mixins = 6;
- * @return {!Array<!proto.google.protobuf.Mixin>}
- */
- proto.google.protobuf.Api.prototype.getMixinsList = function() {
- return /** @type{!Array<!proto.google.protobuf.Mixin>} */ (
- jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.Mixin, 6));
- };
- /**
- * @param {!Array<!proto.google.protobuf.Mixin>} value
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.setMixinsList = function(value) {
- return jspb.Message.setRepeatedWrapperField(this, 6, value);
- };
- /**
- * @param {!proto.google.protobuf.Mixin=} opt_value
- * @param {number=} opt_index
- * @return {!proto.google.protobuf.Mixin}
- */
- proto.google.protobuf.Api.prototype.addMixins = function(opt_value, opt_index) {
- return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.Mixin, opt_index);
- };
- /**
- * Clears the list making it empty but non-null.
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.clearMixinsList = function() {
- return this.setMixinsList([]);
- };
- /**
- * optional Syntax syntax = 7;
- * @return {!proto.google.protobuf.Syntax}
- */
- proto.google.protobuf.Api.prototype.getSyntax = function() {
- return /** @type {!proto.google.protobuf.Syntax} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
- };
- /**
- * @param {!proto.google.protobuf.Syntax} value
- * @return {!proto.google.protobuf.Api} returns this
- */
- proto.google.protobuf.Api.prototype.setSyntax = function(value) {
- return jspb.Message.setProto3EnumField(this, 7, value);
- };
- /**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
- proto.google.protobuf.Method.repeatedFields_ = [6];
- if (jspb.Message.GENERATE_TO_OBJECT) {
- /**
- * Creates an object representation of this proto.
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
- * Optional fields that are not set will be set to undefined.
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
- * For the list of reserved names please see:
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
- * JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @return {!Object}
- */
- proto.google.protobuf.Method.prototype.toObject = function(opt_includeInstance) {
- return proto.google.protobuf.Method.toObject(opt_includeInstance, this);
- };
- /**
- * Static version of the {@see toObject} method.
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
- * the JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @param {!proto.google.protobuf.Method} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.google.protobuf.Method.toObject = function(includeInstance, msg) {
- var f, obj = {
- name: jspb.Message.getFieldWithDefault(msg, 1, ""),
- requestTypeUrl: jspb.Message.getFieldWithDefault(msg, 2, ""),
- requestStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
- responseTypeUrl: jspb.Message.getFieldWithDefault(msg, 4, ""),
- responseStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
- optionsList: jspb.Message.toObjectList(msg.getOptionsList(),
- google_protobuf_type_pb.Option.toObject, includeInstance),
- syntax: jspb.Message.getFieldWithDefault(msg, 7, 0)
- };
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
- };
- }
- /**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.google.protobuf.Method}
- */
- proto.google.protobuf.Method.deserializeBinary = function(bytes) {
- var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.google.protobuf.Method;
- return proto.google.protobuf.Method.deserializeBinaryFromReader(msg, reader);
- };
- /**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.google.protobuf.Method} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.google.protobuf.Method}
- */
- proto.google.protobuf.Method.deserializeBinaryFromReader = function(msg, reader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- var field = reader.getFieldNumber();
- switch (field) {
- case 1:
- var value = /** @type {string} */ (reader.readString());
- msg.setName(value);
- break;
- case 2:
- var value = /** @type {string} */ (reader.readString());
- msg.setRequestTypeUrl(value);
- break;
- case 3:
- var value = /** @type {boolean} */ (reader.readBool());
- msg.setRequestStreaming(value);
- break;
- case 4:
- var value = /** @type {string} */ (reader.readString());
- msg.setResponseTypeUrl(value);
- break;
- case 5:
- var value = /** @type {boolean} */ (reader.readBool());
- msg.setResponseStreaming(value);
- break;
- case 6:
- var value = new google_protobuf_type_pb.Option;
- reader.readMessage(value,google_protobuf_type_pb.Option.deserializeBinaryFromReader);
- msg.addOptions(value);
- break;
- case 7:
- var value = /** @type {!proto.google.protobuf.Syntax} */ (reader.readEnum());
- msg.setSyntax(value);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
- };
- /**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
- proto.google.protobuf.Method.prototype.serializeBinary = function() {
- var writer = new jspb.BinaryWriter();
- proto.google.protobuf.Method.serializeBinaryToWriter(this, writer);
- return writer.getResultBuffer();
- };
- /**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.google.protobuf.Method} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.google.protobuf.Method.serializeBinaryToWriter = function(message, writer) {
- var f = undefined;
- f = message.getName();
- if (f.length > 0) {
- writer.writeString(
- 1,
- f
- );
- }
- f = message.getRequestTypeUrl();
- if (f.length > 0) {
- writer.writeString(
- 2,
- f
- );
- }
- f = message.getRequestStreaming();
- if (f) {
- writer.writeBool(
- 3,
- f
- );
- }
- f = message.getResponseTypeUrl();
- if (f.length > 0) {
- writer.writeString(
- 4,
- f
- );
- }
- f = message.getResponseStreaming();
- if (f) {
- writer.writeBool(
- 5,
- f
- );
- }
- f = message.getOptionsList();
- if (f.length > 0) {
- writer.writeRepeatedMessage(
- 6,
- f,
- google_protobuf_type_pb.Option.serializeBinaryToWriter
- );
- }
- f = message.getSyntax();
- if (f !== 0.0) {
- writer.writeEnum(
- 7,
- f
- );
- }
- };
- /**
- * optional string name = 1;
- * @return {string}
- */
- proto.google.protobuf.Method.prototype.getName = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.google.protobuf.Method} returns this
- */
- proto.google.protobuf.Method.prototype.setName = function(value) {
- return jspb.Message.setProto3StringField(this, 1, value);
- };
- /**
- * optional string request_type_url = 2;
- * @return {string}
- */
- proto.google.protobuf.Method.prototype.getRequestTypeUrl = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.google.protobuf.Method} returns this
- */
- proto.google.protobuf.Method.prototype.setRequestTypeUrl = function(value) {
- return jspb.Message.setProto3StringField(this, 2, value);
- };
- /**
- * optional bool request_streaming = 3;
- * @return {boolean}
- */
- proto.google.protobuf.Method.prototype.getRequestStreaming = function() {
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
- };
- /**
- * @param {boolean} value
- * @return {!proto.google.protobuf.Method} returns this
- */
- proto.google.protobuf.Method.prototype.setRequestStreaming = function(value) {
- return jspb.Message.setProto3BooleanField(this, 3, value);
- };
- /**
- * optional string response_type_url = 4;
- * @return {string}
- */
- proto.google.protobuf.Method.prototype.getResponseTypeUrl = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.google.protobuf.Method} returns this
- */
- proto.google.protobuf.Method.prototype.setResponseTypeUrl = function(value) {
- return jspb.Message.setProto3StringField(this, 4, value);
- };
- /**
- * optional bool response_streaming = 5;
- * @return {boolean}
- */
- proto.google.protobuf.Method.prototype.getResponseStreaming = function() {
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
- };
- /**
- * @param {boolean} value
- * @return {!proto.google.protobuf.Method} returns this
- */
- proto.google.protobuf.Method.prototype.setResponseStreaming = function(value) {
- return jspb.Message.setProto3BooleanField(this, 5, value);
- };
- /**
- * repeated Option options = 6;
- * @return {!Array<!proto.google.protobuf.Option>}
- */
- proto.google.protobuf.Method.prototype.getOptionsList = function() {
- return /** @type{!Array<!proto.google.protobuf.Option>} */ (
- jspb.Message.getRepeatedWrapperField(this, google_protobuf_type_pb.Option, 6));
- };
- /**
- * @param {!Array<!proto.google.protobuf.Option>} value
- * @return {!proto.google.protobuf.Method} returns this
- */
- proto.google.protobuf.Method.prototype.setOptionsList = function(value) {
- return jspb.Message.setRepeatedWrapperField(this, 6, value);
- };
- /**
- * @param {!proto.google.protobuf.Option=} opt_value
- * @param {number=} opt_index
- * @return {!proto.google.protobuf.Option}
- */
- proto.google.protobuf.Method.prototype.addOptions = function(opt_value, opt_index) {
- return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.Option, opt_index);
- };
- /**
- * Clears the list making it empty but non-null.
- * @return {!proto.google.protobuf.Method} returns this
- */
- proto.google.protobuf.Method.prototype.clearOptionsList = function() {
- return this.setOptionsList([]);
- };
- /**
- * optional Syntax syntax = 7;
- * @return {!proto.google.protobuf.Syntax}
- */
- proto.google.protobuf.Method.prototype.getSyntax = function() {
- return /** @type {!proto.google.protobuf.Syntax} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
- };
- /**
- * @param {!proto.google.protobuf.Syntax} value
- * @return {!proto.google.protobuf.Method} returns this
- */
- proto.google.protobuf.Method.prototype.setSyntax = function(value) {
- return jspb.Message.setProto3EnumField(this, 7, value);
- };
- if (jspb.Message.GENERATE_TO_OBJECT) {
- /**
- * Creates an object representation of this proto.
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
- * Optional fields that are not set will be set to undefined.
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
- * For the list of reserved names please see:
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
- * JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @return {!Object}
- */
- proto.google.protobuf.Mixin.prototype.toObject = function(opt_includeInstance) {
- return proto.google.protobuf.Mixin.toObject(opt_includeInstance, this);
- };
- /**
- * Static version of the {@see toObject} method.
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
- * the JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @param {!proto.google.protobuf.Mixin} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.google.protobuf.Mixin.toObject = function(includeInstance, msg) {
- var f, obj = {
- name: jspb.Message.getFieldWithDefault(msg, 1, ""),
- root: jspb.Message.getFieldWithDefault(msg, 2, "")
- };
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
- };
- }
- /**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.google.protobuf.Mixin}
- */
- proto.google.protobuf.Mixin.deserializeBinary = function(bytes) {
- var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.google.protobuf.Mixin;
- return proto.google.protobuf.Mixin.deserializeBinaryFromReader(msg, reader);
- };
- /**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.google.protobuf.Mixin} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.google.protobuf.Mixin}
- */
- proto.google.protobuf.Mixin.deserializeBinaryFromReader = function(msg, reader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- var field = reader.getFieldNumber();
- switch (field) {
- case 1:
- var value = /** @type {string} */ (reader.readString());
- msg.setName(value);
- break;
- case 2:
- var value = /** @type {string} */ (reader.readString());
- msg.setRoot(value);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
- };
- /**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
- proto.google.protobuf.Mixin.prototype.serializeBinary = function() {
- var writer = new jspb.BinaryWriter();
- proto.google.protobuf.Mixin.serializeBinaryToWriter(this, writer);
- return writer.getResultBuffer();
- };
- /**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.google.protobuf.Mixin} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.google.protobuf.Mixin.serializeBinaryToWriter = function(message, writer) {
- var f = undefined;
- f = message.getName();
- if (f.length > 0) {
- writer.writeString(
- 1,
- f
- );
- }
- f = message.getRoot();
- if (f.length > 0) {
- writer.writeString(
- 2,
- f
- );
- }
- };
- /**
- * optional string name = 1;
- * @return {string}
- */
- proto.google.protobuf.Mixin.prototype.getName = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.google.protobuf.Mixin} returns this
- */
- proto.google.protobuf.Mixin.prototype.setName = function(value) {
- return jspb.Message.setProto3StringField(this, 1, value);
- };
- /**
- * optional string root = 2;
- * @return {string}
- */
- proto.google.protobuf.Mixin.prototype.getRoot = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.google.protobuf.Mixin} returns this
- */
- proto.google.protobuf.Mixin.prototype.setRoot = function(value) {
- return jspb.Message.setProto3StringField(this, 2, value);
- };
- goog.object.extend(exports, proto.google.protobuf);
|