/** * @fileoverview * @enhanceable * @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! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.v1.NavigateReply', null, global); goog.exportSymbol('proto.v1.NavigateRequest', null, global); goog.exportSymbol('proto.v1.TransitionType', 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.v1.NavigateRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.v1.NavigateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.v1.NavigateRequest.displayName = 'proto.v1.NavigateRequest'; } /** * 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.v1.NavigateReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.v1.NavigateReply, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.v1.NavigateReply.displayName = 'proto.v1.NavigateReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.v1.NavigateRequest.prototype.toObject = function(opt_includeInstance) { return proto.v1.NavigateRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.v1.NavigateRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.v1.NavigateRequest.toObject = function(includeInstance, msg) { var f, obj = { api: jspb.Message.getFieldWithDefault(msg, 1, ""), url: jspb.Message.getFieldWithDefault(msg, 2, ""), referrer: jspb.Message.getFieldWithDefault(msg, 3, ""), transitiontype: jspb.Message.getFieldWithDefault(msg, 4, 0), frameid: jspb.Message.getFieldWithDefault(msg, 5, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.v1.NavigateRequest} */ proto.v1.NavigateRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.v1.NavigateRequest; return proto.v1.NavigateRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.v1.NavigateRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.v1.NavigateRequest} */ proto.v1.NavigateRequest.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.setApi(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setUrl(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setReferrer(value); break; case 4: var value = /** @type {!proto.v1.TransitionType} */ (reader.readEnum()); msg.setTransitiontype(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setFrameid(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.v1.NavigateRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.v1.NavigateRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.v1.NavigateRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.v1.NavigateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getApi(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getUrl(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getReferrer(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getTransitiontype(); if (f !== 0.0) { writer.writeEnum( 4, f ); } f = message.getFrameid(); if (f.length > 0) { writer.writeString( 5, f ); } }; /** * optional string api = 1; * @return {string} */ proto.v1.NavigateRequest.prototype.getApi = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.v1.NavigateRequest.prototype.setApi = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string url = 2; * @return {string} */ proto.v1.NavigateRequest.prototype.getUrl = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.v1.NavigateRequest.prototype.setUrl = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string referrer = 3; * @return {string} */ proto.v1.NavigateRequest.prototype.getReferrer = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ proto.v1.NavigateRequest.prototype.setReferrer = function(value) { jspb.Message.setProto3StringField(this, 3, value); }; /** * optional TransitionType transitionType = 4; * @return {!proto.v1.TransitionType} */ proto.v1.NavigateRequest.prototype.getTransitiontype = function() { return /** @type {!proto.v1.TransitionType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {!proto.v1.TransitionType} value */ proto.v1.NavigateRequest.prototype.setTransitiontype = function(value) { jspb.Message.setProto3EnumField(this, 4, value); }; /** * optional string frameId = 5; * @return {string} */ proto.v1.NavigateRequest.prototype.getFrameid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** @param {string} value */ proto.v1.NavigateRequest.prototype.setFrameid = function(value) { jspb.Message.setProto3StringField(this, 5, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.v1.NavigateReply.prototype.toObject = function(opt_includeInstance) { return proto.v1.NavigateReply.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.v1.NavigateReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.v1.NavigateReply.toObject = function(includeInstance, msg) { var f, obj = { api: jspb.Message.getFieldWithDefault(msg, 1, ""), frameid: jspb.Message.getFieldWithDefault(msg, 2, ""), loaderid: jspb.Message.getFieldWithDefault(msg, 3, ""), errortext: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.v1.NavigateReply} */ proto.v1.NavigateReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.v1.NavigateReply; return proto.v1.NavigateReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.v1.NavigateReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.v1.NavigateReply} */ proto.v1.NavigateReply.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.setApi(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setFrameid(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setLoaderid(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setErrortext(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.v1.NavigateReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.v1.NavigateReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.v1.NavigateReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.v1.NavigateReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getApi(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getFrameid(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getLoaderid(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getErrortext(); if (f.length > 0) { writer.writeString( 4, f ); } }; /** * optional string api = 1; * @return {string} */ proto.v1.NavigateReply.prototype.getApi = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.v1.NavigateReply.prototype.setApi = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string frameId = 2; * @return {string} */ proto.v1.NavigateReply.prototype.getFrameid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.v1.NavigateReply.prototype.setFrameid = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string loaderId = 3; * @return {string} */ proto.v1.NavigateReply.prototype.getLoaderid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ proto.v1.NavigateReply.prototype.setLoaderid = function(value) { jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string errorText = 4; * @return {string} */ proto.v1.NavigateReply.prototype.getErrortext = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** @param {string} value */ proto.v1.NavigateReply.prototype.setErrortext = function(value) { jspb.Message.setProto3StringField(this, 4, value); }; /** * @enum {number} */ proto.v1.TransitionType = { LINK: 0, TYPED: 1, ADDRESS_BAR: 2, AUTO_BOOKMARK: 3, AUTO_SUBFRAME: 4, MANUAL_SUBFRAME: 5, GENERATED: 6, AUTO_TOPLEVEL: 7, FORM_SUBMIT: 8, RELOAD: 9, KEYWORD: 10, KEYWORD_GENERATED: 11, OTHER: 12 }; goog.object.extend(exports, proto.v1);