| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033 | /** * @fileoverview * @enhanceable * @public */// GENERATED CODE -- DO NOT EDIT!var jspb = require('google-protobuf');var goog = jspb;var global = Function('return this')();goog.exportSymbol('proto.routeguide.Feature', null, global);goog.exportSymbol('proto.routeguide.Point', null, global);goog.exportSymbol('proto.routeguide.Rectangle', null, global);goog.exportSymbol('proto.routeguide.RouteNote', null, global);goog.exportSymbol('proto.routeguide.RouteSummary', 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.routeguide.Point = function(opt_data) {  jspb.Message.initialize(this, opt_data, 0, -1, null, null);};goog.inherits(proto.routeguide.Point, jspb.Message);if (goog.DEBUG && !COMPILED) {  proto.routeguide.Point.displayName = 'proto.routeguide.Point';}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_<name>, 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.routeguide.Point.prototype.toObject = function(opt_includeInstance) {  return proto.routeguide.Point.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.routeguide.Point} msg The msg instance to transform. * @return {!Object} */proto.routeguide.Point.toObject = function(includeInstance, msg) {  var f, obj = {    latitude: msg.getLatitude(),    longitude: msg.getLongitude()  };  if (includeInstance) {    obj.$jspbMessageInstance = msg;  }  return obj;};}/** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.routeguide.Point} */proto.routeguide.Point.deserializeBinary = function(bytes) {  var reader = new jspb.BinaryReader(bytes);  var msg = new proto.routeguide.Point;  return proto.routeguide.Point.deserializeBinaryFromReader(msg, reader);};/** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routeguide.Point} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routeguide.Point} */proto.routeguide.Point.deserializeBinaryFromReader = function(msg, reader) {  while (reader.nextField()) {    if (reader.isEndGroup()) {      break;    }    var field = reader.getFieldNumber();    switch (field) {    case 1:      var value = /** @type {number} */ (reader.readInt32());      msg.setLatitude(value);      break;    case 2:      var value = /** @type {number} */ (reader.readInt32());      msg.setLongitude(value);      break;    default:      reader.skipField();      break;    }  }  return msg;};/** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.routeguide.Point} message * @param {!jspb.BinaryWriter} writer */proto.routeguide.Point.serializeBinaryToWriter = function(message, writer) {  message.serializeBinaryToWriter(writer);};/** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */proto.routeguide.Point.prototype.serializeBinary = function() {  var writer = new jspb.BinaryWriter();  this.serializeBinaryToWriter(writer);  return writer.getResultBuffer();};/** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */proto.routeguide.Point.prototype.serializeBinaryToWriter = function (writer) {  var f = undefined;  f = this.getLatitude();  if (f !== 0) {    writer.writeInt32(      1,      f    );  }  f = this.getLongitude();  if (f !== 0) {    writer.writeInt32(      2,      f    );  }};/** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.routeguide.Point} The clone. */proto.routeguide.Point.prototype.cloneMessage = function() {  return /** @type {!proto.routeguide.Point} */ (jspb.Message.cloneMessage(this));};/** * optional int32 latitude = 1; * @return {number} */proto.routeguide.Point.prototype.getLatitude = function() {  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));};/** @param {number} value  */proto.routeguide.Point.prototype.setLatitude = function(value) {  jspb.Message.setField(this, 1, value);};/** * optional int32 longitude = 2; * @return {number} */proto.routeguide.Point.prototype.getLongitude = function() {  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));};/** @param {number} value  */proto.routeguide.Point.prototype.setLongitude = function(value) {  jspb.Message.setField(this, 2, 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.routeguide.Rectangle = function(opt_data) {  jspb.Message.initialize(this, opt_data, 0, -1, null, null);};goog.inherits(proto.routeguide.Rectangle, jspb.Message);if (goog.DEBUG && !COMPILED) {  proto.routeguide.Rectangle.displayName = 'proto.routeguide.Rectangle';}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_<name>, 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.routeguide.Rectangle.prototype.toObject = function(opt_includeInstance) {  return proto.routeguide.Rectangle.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.routeguide.Rectangle} msg The msg instance to transform. * @return {!Object} */proto.routeguide.Rectangle.toObject = function(includeInstance, msg) {  var f, obj = {    lo: (f = msg.getLo()) && proto.routeguide.Point.toObject(includeInstance, f),    hi: (f = msg.getHi()) && proto.routeguide.Point.toObject(includeInstance, f)  };  if (includeInstance) {    obj.$jspbMessageInstance = msg;  }  return obj;};}/** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.routeguide.Rectangle} */proto.routeguide.Rectangle.deserializeBinary = function(bytes) {  var reader = new jspb.BinaryReader(bytes);  var msg = new proto.routeguide.Rectangle;  return proto.routeguide.Rectangle.deserializeBinaryFromReader(msg, reader);};/** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routeguide.Rectangle} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routeguide.Rectangle} */proto.routeguide.Rectangle.deserializeBinaryFromReader = function(msg, reader) {  while (reader.nextField()) {    if (reader.isEndGroup()) {      break;    }    var field = reader.getFieldNumber();    switch (field) {    case 1:      var value = new proto.routeguide.Point;      reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader);      msg.setLo(value);      break;    case 2:      var value = new proto.routeguide.Point;      reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader);      msg.setHi(value);      break;    default:      reader.skipField();      break;    }  }  return msg;};/** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.routeguide.Rectangle} message * @param {!jspb.BinaryWriter} writer */proto.routeguide.Rectangle.serializeBinaryToWriter = function(message, writer) {  message.serializeBinaryToWriter(writer);};/** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */proto.routeguide.Rectangle.prototype.serializeBinary = function() {  var writer = new jspb.BinaryWriter();  this.serializeBinaryToWriter(writer);  return writer.getResultBuffer();};/** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */proto.routeguide.Rectangle.prototype.serializeBinaryToWriter = function (writer) {  var f = undefined;  f = this.getLo();  if (f != null) {    writer.writeMessage(      1,      f,      proto.routeguide.Point.serializeBinaryToWriter    );  }  f = this.getHi();  if (f != null) {    writer.writeMessage(      2,      f,      proto.routeguide.Point.serializeBinaryToWriter    );  }};/** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.routeguide.Rectangle} The clone. */proto.routeguide.Rectangle.prototype.cloneMessage = function() {  return /** @type {!proto.routeguide.Rectangle} */ (jspb.Message.cloneMessage(this));};/** * optional Point lo = 1; * @return {proto.routeguide.Point} */proto.routeguide.Rectangle.prototype.getLo = function() {  return /** @type{proto.routeguide.Point} */ (    jspb.Message.getWrapperField(this, proto.routeguide.Point, 1));};/** @param {proto.routeguide.Point|undefined} value  */proto.routeguide.Rectangle.prototype.setLo = function(value) {  jspb.Message.setWrapperField(this, 1, value);};proto.routeguide.Rectangle.prototype.clearLo = function() {  this.setLo(undefined);};/** * optional Point hi = 2; * @return {proto.routeguide.Point} */proto.routeguide.Rectangle.prototype.getHi = function() {  return /** @type{proto.routeguide.Point} */ (    jspb.Message.getWrapperField(this, proto.routeguide.Point, 2));};/** @param {proto.routeguide.Point|undefined} value  */proto.routeguide.Rectangle.prototype.setHi = function(value) {  jspb.Message.setWrapperField(this, 2, value);};proto.routeguide.Rectangle.prototype.clearHi = function() {  this.setHi(undefined);};/** * 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.routeguide.Feature = function(opt_data) {  jspb.Message.initialize(this, opt_data, 0, -1, null, null);};goog.inherits(proto.routeguide.Feature, jspb.Message);if (goog.DEBUG && !COMPILED) {  proto.routeguide.Feature.displayName = 'proto.routeguide.Feature';}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_<name>, 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.routeguide.Feature.prototype.toObject = function(opt_includeInstance) {  return proto.routeguide.Feature.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.routeguide.Feature} msg The msg instance to transform. * @return {!Object} */proto.routeguide.Feature.toObject = function(includeInstance, msg) {  var f, obj = {    name: msg.getName(),    location: (f = msg.getLocation()) && proto.routeguide.Point.toObject(includeInstance, f)  };  if (includeInstance) {    obj.$jspbMessageInstance = msg;  }  return obj;};}/** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.routeguide.Feature} */proto.routeguide.Feature.deserializeBinary = function(bytes) {  var reader = new jspb.BinaryReader(bytes);  var msg = new proto.routeguide.Feature;  return proto.routeguide.Feature.deserializeBinaryFromReader(msg, reader);};/** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routeguide.Feature} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routeguide.Feature} */proto.routeguide.Feature.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.routeguide.Point;      reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader);      msg.setLocation(value);      break;    default:      reader.skipField();      break;    }  }  return msg;};/** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.routeguide.Feature} message * @param {!jspb.BinaryWriter} writer */proto.routeguide.Feature.serializeBinaryToWriter = function(message, writer) {  message.serializeBinaryToWriter(writer);};/** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */proto.routeguide.Feature.prototype.serializeBinary = function() {  var writer = new jspb.BinaryWriter();  this.serializeBinaryToWriter(writer);  return writer.getResultBuffer();};/** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */proto.routeguide.Feature.prototype.serializeBinaryToWriter = function (writer) {  var f = undefined;  f = this.getName();  if (f.length > 0) {    writer.writeString(      1,      f    );  }  f = this.getLocation();  if (f != null) {    writer.writeMessage(      2,      f,      proto.routeguide.Point.serializeBinaryToWriter    );  }};/** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.routeguide.Feature} The clone. */proto.routeguide.Feature.prototype.cloneMessage = function() {  return /** @type {!proto.routeguide.Feature} */ (jspb.Message.cloneMessage(this));};/** * optional string name = 1; * @return {string} */proto.routeguide.Feature.prototype.getName = function() {  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));};/** @param {string} value  */proto.routeguide.Feature.prototype.setName = function(value) {  jspb.Message.setField(this, 1, value);};/** * optional Point location = 2; * @return {proto.routeguide.Point} */proto.routeguide.Feature.prototype.getLocation = function() {  return /** @type{proto.routeguide.Point} */ (    jspb.Message.getWrapperField(this, proto.routeguide.Point, 2));};/** @param {proto.routeguide.Point|undefined} value  */proto.routeguide.Feature.prototype.setLocation = function(value) {  jspb.Message.setWrapperField(this, 2, value);};proto.routeguide.Feature.prototype.clearLocation = function() {  this.setLocation(undefined);};/** * 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.routeguide.RouteNote = function(opt_data) {  jspb.Message.initialize(this, opt_data, 0, -1, null, null);};goog.inherits(proto.routeguide.RouteNote, jspb.Message);if (goog.DEBUG && !COMPILED) {  proto.routeguide.RouteNote.displayName = 'proto.routeguide.RouteNote';}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_<name>, 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.routeguide.RouteNote.prototype.toObject = function(opt_includeInstance) {  return proto.routeguide.RouteNote.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.routeguide.RouteNote} msg The msg instance to transform. * @return {!Object} */proto.routeguide.RouteNote.toObject = function(includeInstance, msg) {  var f, obj = {    location: (f = msg.getLocation()) && proto.routeguide.Point.toObject(includeInstance, f),    message: msg.getMessage()  };  if (includeInstance) {    obj.$jspbMessageInstance = msg;  }  return obj;};}/** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.routeguide.RouteNote} */proto.routeguide.RouteNote.deserializeBinary = function(bytes) {  var reader = new jspb.BinaryReader(bytes);  var msg = new proto.routeguide.RouteNote;  return proto.routeguide.RouteNote.deserializeBinaryFromReader(msg, reader);};/** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routeguide.RouteNote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routeguide.RouteNote} */proto.routeguide.RouteNote.deserializeBinaryFromReader = function(msg, reader) {  while (reader.nextField()) {    if (reader.isEndGroup()) {      break;    }    var field = reader.getFieldNumber();    switch (field) {    case 1:      var value = new proto.routeguide.Point;      reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader);      msg.setLocation(value);      break;    case 2:      var value = /** @type {string} */ (reader.readString());      msg.setMessage(value);      break;    default:      reader.skipField();      break;    }  }  return msg;};/** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.routeguide.RouteNote} message * @param {!jspb.BinaryWriter} writer */proto.routeguide.RouteNote.serializeBinaryToWriter = function(message, writer) {  message.serializeBinaryToWriter(writer);};/** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */proto.routeguide.RouteNote.prototype.serializeBinary = function() {  var writer = new jspb.BinaryWriter();  this.serializeBinaryToWriter(writer);  return writer.getResultBuffer();};/** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */proto.routeguide.RouteNote.prototype.serializeBinaryToWriter = function (writer) {  var f = undefined;  f = this.getLocation();  if (f != null) {    writer.writeMessage(      1,      f,      proto.routeguide.Point.serializeBinaryToWriter    );  }  f = this.getMessage();  if (f.length > 0) {    writer.writeString(      2,      f    );  }};/** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.routeguide.RouteNote} The clone. */proto.routeguide.RouteNote.prototype.cloneMessage = function() {  return /** @type {!proto.routeguide.RouteNote} */ (jspb.Message.cloneMessage(this));};/** * optional Point location = 1; * @return {proto.routeguide.Point} */proto.routeguide.RouteNote.prototype.getLocation = function() {  return /** @type{proto.routeguide.Point} */ (    jspb.Message.getWrapperField(this, proto.routeguide.Point, 1));};/** @param {proto.routeguide.Point|undefined} value  */proto.routeguide.RouteNote.prototype.setLocation = function(value) {  jspb.Message.setWrapperField(this, 1, value);};proto.routeguide.RouteNote.prototype.clearLocation = function() {  this.setLocation(undefined);};/** * optional string message = 2; * @return {string} */proto.routeguide.RouteNote.prototype.getMessage = function() {  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));};/** @param {string} value  */proto.routeguide.RouteNote.prototype.setMessage = function(value) {  jspb.Message.setField(this, 2, 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.routeguide.RouteSummary = function(opt_data) {  jspb.Message.initialize(this, opt_data, 0, -1, null, null);};goog.inherits(proto.routeguide.RouteSummary, jspb.Message);if (goog.DEBUG && !COMPILED) {  proto.routeguide.RouteSummary.displayName = 'proto.routeguide.RouteSummary';}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_<name>, 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.routeguide.RouteSummary.prototype.toObject = function(opt_includeInstance) {  return proto.routeguide.RouteSummary.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.routeguide.RouteSummary} msg The msg instance to transform. * @return {!Object} */proto.routeguide.RouteSummary.toObject = function(includeInstance, msg) {  var f, obj = {    pointCount: msg.getPointCount(),    featureCount: msg.getFeatureCount(),    distance: msg.getDistance(),    elapsedTime: msg.getElapsedTime()  };  if (includeInstance) {    obj.$jspbMessageInstance = msg;  }  return obj;};}/** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.routeguide.RouteSummary} */proto.routeguide.RouteSummary.deserializeBinary = function(bytes) {  var reader = new jspb.BinaryReader(bytes);  var msg = new proto.routeguide.RouteSummary;  return proto.routeguide.RouteSummary.deserializeBinaryFromReader(msg, reader);};/** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routeguide.RouteSummary} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routeguide.RouteSummary} */proto.routeguide.RouteSummary.deserializeBinaryFromReader = function(msg, reader) {  while (reader.nextField()) {    if (reader.isEndGroup()) {      break;    }    var field = reader.getFieldNumber();    switch (field) {    case 1:      var value = /** @type {number} */ (reader.readInt32());      msg.setPointCount(value);      break;    case 2:      var value = /** @type {number} */ (reader.readInt32());      msg.setFeatureCount(value);      break;    case 3:      var value = /** @type {number} */ (reader.readInt32());      msg.setDistance(value);      break;    case 4:      var value = /** @type {number} */ (reader.readInt32());      msg.setElapsedTime(value);      break;    default:      reader.skipField();      break;    }  }  return msg;};/** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.routeguide.RouteSummary} message * @param {!jspb.BinaryWriter} writer */proto.routeguide.RouteSummary.serializeBinaryToWriter = function(message, writer) {  message.serializeBinaryToWriter(writer);};/** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */proto.routeguide.RouteSummary.prototype.serializeBinary = function() {  var writer = new jspb.BinaryWriter();  this.serializeBinaryToWriter(writer);  return writer.getResultBuffer();};/** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */proto.routeguide.RouteSummary.prototype.serializeBinaryToWriter = function (writer) {  var f = undefined;  f = this.getPointCount();  if (f !== 0) {    writer.writeInt32(      1,      f    );  }  f = this.getFeatureCount();  if (f !== 0) {    writer.writeInt32(      2,      f    );  }  f = this.getDistance();  if (f !== 0) {    writer.writeInt32(      3,      f    );  }  f = this.getElapsedTime();  if (f !== 0) {    writer.writeInt32(      4,      f    );  }};/** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.routeguide.RouteSummary} The clone. */proto.routeguide.RouteSummary.prototype.cloneMessage = function() {  return /** @type {!proto.routeguide.RouteSummary} */ (jspb.Message.cloneMessage(this));};/** * optional int32 point_count = 1; * @return {number} */proto.routeguide.RouteSummary.prototype.getPointCount = function() {  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));};/** @param {number} value  */proto.routeguide.RouteSummary.prototype.setPointCount = function(value) {  jspb.Message.setField(this, 1, value);};/** * optional int32 feature_count = 2; * @return {number} */proto.routeguide.RouteSummary.prototype.getFeatureCount = function() {  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));};/** @param {number} value  */proto.routeguide.RouteSummary.prototype.setFeatureCount = function(value) {  jspb.Message.setField(this, 2, value);};/** * optional int32 distance = 3; * @return {number} */proto.routeguide.RouteSummary.prototype.getDistance = function() {  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));};/** @param {number} value  */proto.routeguide.RouteSummary.prototype.setDistance = function(value) {  jspb.Message.setField(this, 3, value);};/** * optional int32 elapsed_time = 4; * @return {number} */proto.routeguide.RouteSummary.prototype.getElapsedTime = function() {  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0));};/** @param {number} value  */proto.routeguide.RouteSummary.prototype.setElapsedTime = function(value) {  jspb.Message.setField(this, 4, value);};goog.object.extend(exports, proto.routeguide);
 |