/** * @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')(); goog.exportSymbol('proto.oddscrawler.NavigateReply', null, global); goog.exportSymbol('proto.oddscrawler.NavigateRequest', null, global); goog.exportSymbol('proto.oddscrawler.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.oddscrawler.NavigateRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.oddscrawler.NavigateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.oddscrawler.NavigateRequest.displayName = 'proto.oddscrawler.NavigateRequest'; } 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.oddscrawler.NavigateRequest.prototype.toObject = function(opt_includeInstance) { return proto.oddscrawler.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.oddscrawler.NavigateRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oddscrawler.NavigateRequest.toObject = function(includeInstance, msg) { var f, obj = { url: jspb.Message.getFieldWithDefault(msg, 1, ""), referrer: jspb.Message.getFieldWithDefault(msg, 2, ""), transitiontype: jspb.Message.getFieldWithDefault(msg, 3, 0), frameid: 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.oddscrawler.NavigateRequest} */ proto.oddscrawler.NavigateRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.oddscrawler.NavigateRequest; return proto.oddscrawler.NavigateRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.oddscrawler.NavigateRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.oddscrawler.NavigateRequest} */ proto.oddscrawler.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.setUrl(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setReferrer(value); break; case 3: var value = /** @type {!proto.oddscrawler.TransitionType} */ (reader.readEnum()); msg.setTransitiontype(value); break; case 4: 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.oddscrawler.NavigateRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.oddscrawler.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.oddscrawler.NavigateRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oddscrawler.NavigateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUrl(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getReferrer(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getTransitiontype(); if (f !== 0.0) { writer.writeEnum( 3, f ); } f = message.getFrameid(); if (f.length > 0) { writer.writeString( 4, f ); } }; /** * optional string url = 1; * @return {string} */ proto.oddscrawler.NavigateRequest.prototype.getUrl = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.oddscrawler.NavigateRequest.prototype.setUrl = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string referrer = 2; * @return {string} */ proto.oddscrawler.NavigateRequest.prototype.getReferrer = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.oddscrawler.NavigateRequest.prototype.setReferrer = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional TransitionType transitionType = 3; * @return {!proto.oddscrawler.TransitionType} */ proto.oddscrawler.NavigateRequest.prototype.getTransitiontype = function() { return /** @type {!proto.oddscrawler.TransitionType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {!proto.oddscrawler.TransitionType} value */ proto.oddscrawler.NavigateRequest.prototype.setTransitiontype = function(value) { jspb.Message.setProto3EnumField(this, 3, value); }; /** * optional string frameId = 4; * @return {string} */ proto.oddscrawler.NavigateRequest.prototype.getFrameid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** @param {string} value */ proto.oddscrawler.NavigateRequest.prototype.setFrameid = function(value) { jspb.Message.setProto3StringField(this, 4, value); }; /** * 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.oddscrawler.NavigateReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.oddscrawler.NavigateReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.oddscrawler.NavigateReply.displayName = 'proto.oddscrawler.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.oddscrawler.NavigateReply.prototype.toObject = function(opt_includeInstance) { return proto.oddscrawler.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.oddscrawler.NavigateReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oddscrawler.NavigateReply.toObject = function(includeInstance, msg) { var f, obj = { frameid: jspb.Message.getFieldWithDefault(msg, 1, ""), loaderid: jspb.Message.getFieldWithDefault(msg, 2, ""), errortext: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.oddscrawler.NavigateReply} */ proto.oddscrawler.NavigateReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.oddscrawler.NavigateReply; return proto.oddscrawler.NavigateReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.oddscrawler.NavigateReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.oddscrawler.NavigateReply} */ proto.oddscrawler.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.setFrameid(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setLoaderid(value); break; case 3: 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.oddscrawler.NavigateReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.oddscrawler.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.oddscrawler.NavigateReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oddscrawler.NavigateReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFrameid(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getLoaderid(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getErrortext(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional string frameId = 1; * @return {string} */ proto.oddscrawler.NavigateReply.prototype.getFrameid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.oddscrawler.NavigateReply.prototype.setFrameid = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string loaderId = 2; * @return {string} */ proto.oddscrawler.NavigateReply.prototype.getLoaderid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.oddscrawler.NavigateReply.prototype.setLoaderid = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string errorText = 3; * @return {string} */ proto.oddscrawler.NavigateReply.prototype.getErrortext = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ proto.oddscrawler.NavigateReply.prototype.setErrortext = function(value) { jspb.Message.setProto3StringField(this, 3, value); }; /** * @enum {number} */ proto.oddscrawler.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.oddscrawler);