ezbake.query.intents.Location.java Source code

Java tutorial

Introduction

Here is the source code for ezbake.query.intents.Location.java

Source

/*   Copyright (C) 2013-2014 Computer Sciences Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License. */

/**
 * Autogenerated by Thrift Compiler (0.9.1)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package ezbake.query.intents;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Location implements org.apache.thrift.TBase<Location, Location._Fields>, java.io.Serializable,
        Cloneable, Comparable<Location> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(
            "Location");

    private static final org.apache.thrift.protocol.TField BASE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "base", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
    private static final org.apache.thrift.protocol.TField LATITUDE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "latitude", org.apache.thrift.protocol.TType.DOUBLE, (short) 2);
    private static final org.apache.thrift.protocol.TField LONGITUDE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "longitude", org.apache.thrift.protocol.TType.DOUBLE, (short) 3);
    private static final org.apache.thrift.protocol.TField ALTITUDE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "altitude", org.apache.thrift.protocol.TType.DOUBLE, (short) 4);
    private static final org.apache.thrift.protocol.TField LINE_OF_BEARING_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "lineOfBearing", org.apache.thrift.protocol.TType.DOUBLE, (short) 5);
    private static final org.apache.thrift.protocol.TField LOB_LATITUDE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "lobLatitude", org.apache.thrift.protocol.TType.DOUBLE, (short) 6);
    private static final org.apache.thrift.protocol.TField LOB_LONGITUDE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "lobLongitude", org.apache.thrift.protocol.TType.DOUBLE, (short) 7);
    private static final org.apache.thrift.protocol.TField PLACE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "placeName", org.apache.thrift.protocol.TType.STRING, (short) 8);
    private static final org.apache.thrift.protocol.TField SEMIMAJOR_ERROR_AXIS_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "semimajorErrorAxis", org.apache.thrift.protocol.TType.DOUBLE, (short) 9);
    private static final org.apache.thrift.protocol.TField SEMIMINOR_ERROR_AXIS_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "semiminorErrorAxis", org.apache.thrift.protocol.TType.DOUBLE, (short) 10);
    private static final org.apache.thrift.protocol.TField CIRCULAR_ERROR_PROB_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "circularErrorProb", org.apache.thrift.protocol.TType.DOUBLE, (short) 11);
    private static final org.apache.thrift.protocol.TField ORIENTATION_ANGLE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "orientationAngle", org.apache.thrift.protocol.TType.DOUBLE, (short) 12);
    private static final org.apache.thrift.protocol.TField COURSE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "course", org.apache.thrift.protocol.TType.DOUBLE, (short) 13);
    private static final org.apache.thrift.protocol.TField SPEED_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "speed", org.apache.thrift.protocol.TType.DOUBLE, (short) 14);
    private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "serialNumber", org.apache.thrift.protocol.TType.STRING, (short) 15);
    private static final org.apache.thrift.protocol.TField COLLECTION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "collectionType", org.apache.thrift.protocol.TType.STRING, (short) 16);
    private static final org.apache.thrift.protocol.TField LOCATION_CONFIDENCE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "locationConfidence", org.apache.thrift.protocol.TType.STRING, (short) 17);
    private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "description", org.apache.thrift.protocol.TType.STRING, (short) 18);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
        schemes.put(StandardScheme.class, new LocationStandardSchemeFactory());
        schemes.put(TupleScheme.class, new LocationTupleSchemeFactory());
    }

    public ezbake.query.intents.base.BaseContext base; // required
    public double latitude; // required
    public double longitude; // required
    public double altitude; // optional
    public double lineOfBearing; // optional
    public double lobLatitude; // optional
    public double lobLongitude; // optional
    public String placeName; // optional
    public double semimajorErrorAxis; // optional
    public double semiminorErrorAxis; // optional
    public double circularErrorProb; // optional
    public double orientationAngle; // optional
    public double course; // optional
    public double speed; // optional
    public String serialNumber; // optional
    public String collectionType; // optional
    public String locationConfidence; // optional
    public String description; // optional

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
        BASE((short) 1, "base"), LATITUDE((short) 2, "latitude"), LONGITUDE((short) 3, "longitude"), ALTITUDE(
                (short) 4, "altitude"), LINE_OF_BEARING((short) 5, "lineOfBearing"), LOB_LATITUDE((short) 6,
                        "lobLatitude"), LOB_LONGITUDE((short) 7, "lobLongitude"), PLACE_NAME((short) 8,
                                "placeName"), SEMIMAJOR_ERROR_AXIS((short) 9,
                                        "semimajorErrorAxis"), SEMIMINOR_ERROR_AXIS((short) 10,
                                                "semiminorErrorAxis"), CIRCULAR_ERROR_PROB((short) 11,
                                                        "circularErrorProb"), ORIENTATION_ANGLE((short) 12,
                                                                "orientationAngle"), COURSE((short) 13,
                                                                        "course"), SPEED((short) 14,
                                                                                "speed"), SERIAL_NUMBER((short) 15,
                                                                                        "serialNumber"), COLLECTION_TYPE(
                                                                                                (short) 16,
                                                                                                "collectionType"), LOCATION_CONFIDENCE(
                                                                                                        (short) 17,
                                                                                                        "locationConfidence"), DESCRIPTION(
                                                                                                                (short) 18,
                                                                                                                "description");

        private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

        static {
            for (_Fields field : EnumSet.allOf(_Fields.class)) {
                byName.put(field.getFieldName(), field);
            }
        }

        /**
         * Find the _Fields constant that matches fieldId, or null if its not found.
         */
        public static _Fields findByThriftId(int fieldId) {
            switch (fieldId) {
            case 1: // BASE
                return BASE;
            case 2: // LATITUDE
                return LATITUDE;
            case 3: // LONGITUDE
                return LONGITUDE;
            case 4: // ALTITUDE
                return ALTITUDE;
            case 5: // LINE_OF_BEARING
                return LINE_OF_BEARING;
            case 6: // LOB_LATITUDE
                return LOB_LATITUDE;
            case 7: // LOB_LONGITUDE
                return LOB_LONGITUDE;
            case 8: // PLACE_NAME
                return PLACE_NAME;
            case 9: // SEMIMAJOR_ERROR_AXIS
                return SEMIMAJOR_ERROR_AXIS;
            case 10: // SEMIMINOR_ERROR_AXIS
                return SEMIMINOR_ERROR_AXIS;
            case 11: // CIRCULAR_ERROR_PROB
                return CIRCULAR_ERROR_PROB;
            case 12: // ORIENTATION_ANGLE
                return ORIENTATION_ANGLE;
            case 13: // COURSE
                return COURSE;
            case 14: // SPEED
                return SPEED;
            case 15: // SERIAL_NUMBER
                return SERIAL_NUMBER;
            case 16: // COLLECTION_TYPE
                return COLLECTION_TYPE;
            case 17: // LOCATION_CONFIDENCE
                return LOCATION_CONFIDENCE;
            case 18: // DESCRIPTION
                return DESCRIPTION;
            default:
                return null;
            }
        }

        /**
         * Find the _Fields constant that matches fieldId, throwing an exception
         * if it is not found.
         */
        public static _Fields findByThriftIdOrThrow(int fieldId) {
            _Fields fields = findByThriftId(fieldId);
            if (fields == null)
                throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
            return fields;
        }

        /**
         * Find the _Fields constant that matches name, or null if its not found.
         */
        public static _Fields findByName(String name) {
            return byName.get(name);
        }

        private final short _thriftId;
        private final String _fieldName;

        _Fields(short thriftId, String fieldName) {
            _thriftId = thriftId;
            _fieldName = fieldName;
        }

        public short getThriftFieldId() {
            return _thriftId;
        }

        public String getFieldName() {
            return _fieldName;
        }
    }

    // isset id assignments
    private static final int __LATITUDE_ISSET_ID = 0;
    private static final int __LONGITUDE_ISSET_ID = 1;
    private static final int __ALTITUDE_ISSET_ID = 2;
    private static final int __LINEOFBEARING_ISSET_ID = 3;
    private static final int __LOBLATITUDE_ISSET_ID = 4;
    private static final int __LOBLONGITUDE_ISSET_ID = 5;
    private static final int __SEMIMAJORERRORAXIS_ISSET_ID = 6;
    private static final int __SEMIMINORERRORAXIS_ISSET_ID = 7;
    private static final int __CIRCULARERRORPROB_ISSET_ID = 8;
    private static final int __ORIENTATIONANGLE_ISSET_ID = 9;
    private static final int __COURSE_ISSET_ID = 10;
    private static final int __SPEED_ISSET_ID = 11;
    private short __isset_bitfield = 0;
    private _Fields optionals[] = { _Fields.ALTITUDE, _Fields.LINE_OF_BEARING, _Fields.LOB_LATITUDE,
            _Fields.LOB_LONGITUDE, _Fields.PLACE_NAME, _Fields.SEMIMAJOR_ERROR_AXIS, _Fields.SEMIMINOR_ERROR_AXIS,
            _Fields.CIRCULAR_ERROR_PROB, _Fields.ORIENTATION_ANGLE, _Fields.COURSE, _Fields.SPEED,
            _Fields.SERIAL_NUMBER, _Fields.COLLECTION_TYPE, _Fields.LOCATION_CONFIDENCE, _Fields.DESCRIPTION };
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
        Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(
                _Fields.class);
        tmpMap.put(_Fields.BASE,
                new org.apache.thrift.meta_data.FieldMetaData("base",
                        org.apache.thrift.TFieldRequirementType.REQUIRED,
                        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
                                ezbake.query.intents.base.BaseContext.class)));
        tmpMap.put(_Fields.LATITUDE, new org.apache.thrift.meta_data.FieldMetaData("latitude",
                org.apache.thrift.TFieldRequirementType.REQUIRED,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.LONGITUDE, new org.apache.thrift.meta_data.FieldMetaData("longitude",
                org.apache.thrift.TFieldRequirementType.REQUIRED,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.ALTITUDE, new org.apache.thrift.meta_data.FieldMetaData("altitude",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.LINE_OF_BEARING, new org.apache.thrift.meta_data.FieldMetaData("lineOfBearing",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.LOB_LATITUDE, new org.apache.thrift.meta_data.FieldMetaData("lobLatitude",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.LOB_LONGITUDE, new org.apache.thrift.meta_data.FieldMetaData("lobLongitude",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.PLACE_NAME, new org.apache.thrift.meta_data.FieldMetaData("placeName",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.SEMIMAJOR_ERROR_AXIS, new org.apache.thrift.meta_data.FieldMetaData("semimajorErrorAxis",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.SEMIMINOR_ERROR_AXIS, new org.apache.thrift.meta_data.FieldMetaData("semiminorErrorAxis",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.CIRCULAR_ERROR_PROB, new org.apache.thrift.meta_data.FieldMetaData("circularErrorProb",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.ORIENTATION_ANGLE, new org.apache.thrift.meta_data.FieldMetaData("orientationAngle",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.COURSE, new org.apache.thrift.meta_data.FieldMetaData("course",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.SPEED, new org.apache.thrift.meta_data.FieldMetaData("speed",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
        tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.COLLECTION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("collectionType",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.LOCATION_CONFIDENCE, new org.apache.thrift.meta_data.FieldMetaData("locationConfidence",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        metaDataMap = Collections.unmodifiableMap(tmpMap);
        org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Location.class, metaDataMap);
    }

    public Location() {
    }

    public Location(ezbake.query.intents.base.BaseContext base, double latitude, double longitude) {
        this();
        this.base = base;
        this.latitude = latitude;
        setLatitudeIsSet(true);
        this.longitude = longitude;
        setLongitudeIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public Location(Location other) {
        __isset_bitfield = other.__isset_bitfield;
        if (other.isSetBase()) {
            this.base = new ezbake.query.intents.base.BaseContext(other.base);
        }
        this.latitude = other.latitude;
        this.longitude = other.longitude;
        this.altitude = other.altitude;
        this.lineOfBearing = other.lineOfBearing;
        this.lobLatitude = other.lobLatitude;
        this.lobLongitude = other.lobLongitude;
        if (other.isSetPlaceName()) {
            this.placeName = other.placeName;
        }
        this.semimajorErrorAxis = other.semimajorErrorAxis;
        this.semiminorErrorAxis = other.semiminorErrorAxis;
        this.circularErrorProb = other.circularErrorProb;
        this.orientationAngle = other.orientationAngle;
        this.course = other.course;
        this.speed = other.speed;
        if (other.isSetSerialNumber()) {
            this.serialNumber = other.serialNumber;
        }
        if (other.isSetCollectionType()) {
            this.collectionType = other.collectionType;
        }
        if (other.isSetLocationConfidence()) {
            this.locationConfidence = other.locationConfidence;
        }
        if (other.isSetDescription()) {
            this.description = other.description;
        }
    }

    public Location deepCopy() {
        return new Location(this);
    }

    @Override
    public void clear() {
        this.base = null;
        setLatitudeIsSet(false);
        this.latitude = 0.0;
        setLongitudeIsSet(false);
        this.longitude = 0.0;
        setAltitudeIsSet(false);
        this.altitude = 0.0;
        setLineOfBearingIsSet(false);
        this.lineOfBearing = 0.0;
        setLobLatitudeIsSet(false);
        this.lobLatitude = 0.0;
        setLobLongitudeIsSet(false);
        this.lobLongitude = 0.0;
        this.placeName = null;
        setSemimajorErrorAxisIsSet(false);
        this.semimajorErrorAxis = 0.0;
        setSemiminorErrorAxisIsSet(false);
        this.semiminorErrorAxis = 0.0;
        setCircularErrorProbIsSet(false);
        this.circularErrorProb = 0.0;
        setOrientationAngleIsSet(false);
        this.orientationAngle = 0.0;
        setCourseIsSet(false);
        this.course = 0.0;
        setSpeedIsSet(false);
        this.speed = 0.0;
        this.serialNumber = null;
        this.collectionType = null;
        this.locationConfidence = null;
        this.description = null;
    }

    public ezbake.query.intents.base.BaseContext getBase() {
        return this.base;
    }

    public Location setBase(ezbake.query.intents.base.BaseContext base) {
        this.base = base;
        return this;
    }

    public void unsetBase() {
        this.base = null;
    }

    /** Returns true if field base is set (has been assigned a value) and false otherwise */
    public boolean isSetBase() {
        return this.base != null;
    }

    public void setBaseIsSet(boolean value) {
        if (!value) {
            this.base = null;
        }
    }

    public double getLatitude() {
        return this.latitude;
    }

    public Location setLatitude(double latitude) {
        this.latitude = latitude;
        setLatitudeIsSet(true);
        return this;
    }

    public void unsetLatitude() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LATITUDE_ISSET_ID);
    }

    /** Returns true if field latitude is set (has been assigned a value) and false otherwise */
    public boolean isSetLatitude() {
        return EncodingUtils.testBit(__isset_bitfield, __LATITUDE_ISSET_ID);
    }

    public void setLatitudeIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LATITUDE_ISSET_ID, value);
    }

    public double getLongitude() {
        return this.longitude;
    }

    public Location setLongitude(double longitude) {
        this.longitude = longitude;
        setLongitudeIsSet(true);
        return this;
    }

    public void unsetLongitude() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LONGITUDE_ISSET_ID);
    }

    /** Returns true if field longitude is set (has been assigned a value) and false otherwise */
    public boolean isSetLongitude() {
        return EncodingUtils.testBit(__isset_bitfield, __LONGITUDE_ISSET_ID);
    }

    public void setLongitudeIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LONGITUDE_ISSET_ID, value);
    }

    public double getAltitude() {
        return this.altitude;
    }

    public Location setAltitude(double altitude) {
        this.altitude = altitude;
        setAltitudeIsSet(true);
        return this;
    }

    public void unsetAltitude() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ALTITUDE_ISSET_ID);
    }

    /** Returns true if field altitude is set (has been assigned a value) and false otherwise */
    public boolean isSetAltitude() {
        return EncodingUtils.testBit(__isset_bitfield, __ALTITUDE_ISSET_ID);
    }

    public void setAltitudeIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ALTITUDE_ISSET_ID, value);
    }

    public double getLineOfBearing() {
        return this.lineOfBearing;
    }

    public Location setLineOfBearing(double lineOfBearing) {
        this.lineOfBearing = lineOfBearing;
        setLineOfBearingIsSet(true);
        return this;
    }

    public void unsetLineOfBearing() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LINEOFBEARING_ISSET_ID);
    }

    /** Returns true if field lineOfBearing is set (has been assigned a value) and false otherwise */
    public boolean isSetLineOfBearing() {
        return EncodingUtils.testBit(__isset_bitfield, __LINEOFBEARING_ISSET_ID);
    }

    public void setLineOfBearingIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LINEOFBEARING_ISSET_ID, value);
    }

    public double getLobLatitude() {
        return this.lobLatitude;
    }

    public Location setLobLatitude(double lobLatitude) {
        this.lobLatitude = lobLatitude;
        setLobLatitudeIsSet(true);
        return this;
    }

    public void unsetLobLatitude() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOBLATITUDE_ISSET_ID);
    }

    /** Returns true if field lobLatitude is set (has been assigned a value) and false otherwise */
    public boolean isSetLobLatitude() {
        return EncodingUtils.testBit(__isset_bitfield, __LOBLATITUDE_ISSET_ID);
    }

    public void setLobLatitudeIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOBLATITUDE_ISSET_ID, value);
    }

    public double getLobLongitude() {
        return this.lobLongitude;
    }

    public Location setLobLongitude(double lobLongitude) {
        this.lobLongitude = lobLongitude;
        setLobLongitudeIsSet(true);
        return this;
    }

    public void unsetLobLongitude() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOBLONGITUDE_ISSET_ID);
    }

    /** Returns true if field lobLongitude is set (has been assigned a value) and false otherwise */
    public boolean isSetLobLongitude() {
        return EncodingUtils.testBit(__isset_bitfield, __LOBLONGITUDE_ISSET_ID);
    }

    public void setLobLongitudeIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOBLONGITUDE_ISSET_ID, value);
    }

    public String getPlaceName() {
        return this.placeName;
    }

    public Location setPlaceName(String placeName) {
        this.placeName = placeName;
        return this;
    }

    public void unsetPlaceName() {
        this.placeName = null;
    }

    /** Returns true if field placeName is set (has been assigned a value) and false otherwise */
    public boolean isSetPlaceName() {
        return this.placeName != null;
    }

    public void setPlaceNameIsSet(boolean value) {
        if (!value) {
            this.placeName = null;
        }
    }

    public double getSemimajorErrorAxis() {
        return this.semimajorErrorAxis;
    }

    public Location setSemimajorErrorAxis(double semimajorErrorAxis) {
        this.semimajorErrorAxis = semimajorErrorAxis;
        setSemimajorErrorAxisIsSet(true);
        return this;
    }

    public void unsetSemimajorErrorAxis() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SEMIMAJORERRORAXIS_ISSET_ID);
    }

    /** Returns true if field semimajorErrorAxis is set (has been assigned a value) and false otherwise */
    public boolean isSetSemimajorErrorAxis() {
        return EncodingUtils.testBit(__isset_bitfield, __SEMIMAJORERRORAXIS_ISSET_ID);
    }

    public void setSemimajorErrorAxisIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SEMIMAJORERRORAXIS_ISSET_ID, value);
    }

    public double getSemiminorErrorAxis() {
        return this.semiminorErrorAxis;
    }

    public Location setSemiminorErrorAxis(double semiminorErrorAxis) {
        this.semiminorErrorAxis = semiminorErrorAxis;
        setSemiminorErrorAxisIsSet(true);
        return this;
    }

    public void unsetSemiminorErrorAxis() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SEMIMINORERRORAXIS_ISSET_ID);
    }

    /** Returns true if field semiminorErrorAxis is set (has been assigned a value) and false otherwise */
    public boolean isSetSemiminorErrorAxis() {
        return EncodingUtils.testBit(__isset_bitfield, __SEMIMINORERRORAXIS_ISSET_ID);
    }

    public void setSemiminorErrorAxisIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SEMIMINORERRORAXIS_ISSET_ID, value);
    }

    public double getCircularErrorProb() {
        return this.circularErrorProb;
    }

    public Location setCircularErrorProb(double circularErrorProb) {
        this.circularErrorProb = circularErrorProb;
        setCircularErrorProbIsSet(true);
        return this;
    }

    public void unsetCircularErrorProb() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CIRCULARERRORPROB_ISSET_ID);
    }

    /** Returns true if field circularErrorProb is set (has been assigned a value) and false otherwise */
    public boolean isSetCircularErrorProb() {
        return EncodingUtils.testBit(__isset_bitfield, __CIRCULARERRORPROB_ISSET_ID);
    }

    public void setCircularErrorProbIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CIRCULARERRORPROB_ISSET_ID, value);
    }

    public double getOrientationAngle() {
        return this.orientationAngle;
    }

    public Location setOrientationAngle(double orientationAngle) {
        this.orientationAngle = orientationAngle;
        setOrientationAngleIsSet(true);
        return this;
    }

    public void unsetOrientationAngle() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ORIENTATIONANGLE_ISSET_ID);
    }

    /** Returns true if field orientationAngle is set (has been assigned a value) and false otherwise */
    public boolean isSetOrientationAngle() {
        return EncodingUtils.testBit(__isset_bitfield, __ORIENTATIONANGLE_ISSET_ID);
    }

    public void setOrientationAngleIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORIENTATIONANGLE_ISSET_ID, value);
    }

    public double getCourse() {
        return this.course;
    }

    public Location setCourse(double course) {
        this.course = course;
        setCourseIsSet(true);
        return this;
    }

    public void unsetCourse() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COURSE_ISSET_ID);
    }

    /** Returns true if field course is set (has been assigned a value) and false otherwise */
    public boolean isSetCourse() {
        return EncodingUtils.testBit(__isset_bitfield, __COURSE_ISSET_ID);
    }

    public void setCourseIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COURSE_ISSET_ID, value);
    }

    public double getSpeed() {
        return this.speed;
    }

    public Location setSpeed(double speed) {
        this.speed = speed;
        setSpeedIsSet(true);
        return this;
    }

    public void unsetSpeed() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPEED_ISSET_ID);
    }

    /** Returns true if field speed is set (has been assigned a value) and false otherwise */
    public boolean isSetSpeed() {
        return EncodingUtils.testBit(__isset_bitfield, __SPEED_ISSET_ID);
    }

    public void setSpeedIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPEED_ISSET_ID, value);
    }

    public String getSerialNumber() {
        return this.serialNumber;
    }

    public Location setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
        return this;
    }

    public void unsetSerialNumber() {
        this.serialNumber = null;
    }

    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
    public boolean isSetSerialNumber() {
        return this.serialNumber != null;
    }

    public void setSerialNumberIsSet(boolean value) {
        if (!value) {
            this.serialNumber = null;
        }
    }

    public String getCollectionType() {
        return this.collectionType;
    }

    public Location setCollectionType(String collectionType) {
        this.collectionType = collectionType;
        return this;
    }

    public void unsetCollectionType() {
        this.collectionType = null;
    }

    /** Returns true if field collectionType is set (has been assigned a value) and false otherwise */
    public boolean isSetCollectionType() {
        return this.collectionType != null;
    }

    public void setCollectionTypeIsSet(boolean value) {
        if (!value) {
            this.collectionType = null;
        }
    }

    public String getLocationConfidence() {
        return this.locationConfidence;
    }

    public Location setLocationConfidence(String locationConfidence) {
        this.locationConfidence = locationConfidence;
        return this;
    }

    public void unsetLocationConfidence() {
        this.locationConfidence = null;
    }

    /** Returns true if field locationConfidence is set (has been assigned a value) and false otherwise */
    public boolean isSetLocationConfidence() {
        return this.locationConfidence != null;
    }

    public void setLocationConfidenceIsSet(boolean value) {
        if (!value) {
            this.locationConfidence = null;
        }
    }

    public String getDescription() {
        return this.description;
    }

    public Location setDescription(String description) {
        this.description = description;
        return this;
    }

    public void unsetDescription() {
        this.description = null;
    }

    /** Returns true if field description is set (has been assigned a value) and false otherwise */
    public boolean isSetDescription() {
        return this.description != null;
    }

    public void setDescriptionIsSet(boolean value) {
        if (!value) {
            this.description = null;
        }
    }

    public void setFieldValue(_Fields field, Object value) {
        switch (field) {
        case BASE:
            if (value == null) {
                unsetBase();
            } else {
                setBase((ezbake.query.intents.base.BaseContext) value);
            }
            break;

        case LATITUDE:
            if (value == null) {
                unsetLatitude();
            } else {
                setLatitude((Double) value);
            }
            break;

        case LONGITUDE:
            if (value == null) {
                unsetLongitude();
            } else {
                setLongitude((Double) value);
            }
            break;

        case ALTITUDE:
            if (value == null) {
                unsetAltitude();
            } else {
                setAltitude((Double) value);
            }
            break;

        case LINE_OF_BEARING:
            if (value == null) {
                unsetLineOfBearing();
            } else {
                setLineOfBearing((Double) value);
            }
            break;

        case LOB_LATITUDE:
            if (value == null) {
                unsetLobLatitude();
            } else {
                setLobLatitude((Double) value);
            }
            break;

        case LOB_LONGITUDE:
            if (value == null) {
                unsetLobLongitude();
            } else {
                setLobLongitude((Double) value);
            }
            break;

        case PLACE_NAME:
            if (value == null) {
                unsetPlaceName();
            } else {
                setPlaceName((String) value);
            }
            break;

        case SEMIMAJOR_ERROR_AXIS:
            if (value == null) {
                unsetSemimajorErrorAxis();
            } else {
                setSemimajorErrorAxis((Double) value);
            }
            break;

        case SEMIMINOR_ERROR_AXIS:
            if (value == null) {
                unsetSemiminorErrorAxis();
            } else {
                setSemiminorErrorAxis((Double) value);
            }
            break;

        case CIRCULAR_ERROR_PROB:
            if (value == null) {
                unsetCircularErrorProb();
            } else {
                setCircularErrorProb((Double) value);
            }
            break;

        case ORIENTATION_ANGLE:
            if (value == null) {
                unsetOrientationAngle();
            } else {
                setOrientationAngle((Double) value);
            }
            break;

        case COURSE:
            if (value == null) {
                unsetCourse();
            } else {
                setCourse((Double) value);
            }
            break;

        case SPEED:
            if (value == null) {
                unsetSpeed();
            } else {
                setSpeed((Double) value);
            }
            break;

        case SERIAL_NUMBER:
            if (value == null) {
                unsetSerialNumber();
            } else {
                setSerialNumber((String) value);
            }
            break;

        case COLLECTION_TYPE:
            if (value == null) {
                unsetCollectionType();
            } else {
                setCollectionType((String) value);
            }
            break;

        case LOCATION_CONFIDENCE:
            if (value == null) {
                unsetLocationConfidence();
            } else {
                setLocationConfidence((String) value);
            }
            break;

        case DESCRIPTION:
            if (value == null) {
                unsetDescription();
            } else {
                setDescription((String) value);
            }
            break;

        }
    }

    public Object getFieldValue(_Fields field) {
        switch (field) {
        case BASE:
            return getBase();

        case LATITUDE:
            return Double.valueOf(getLatitude());

        case LONGITUDE:
            return Double.valueOf(getLongitude());

        case ALTITUDE:
            return Double.valueOf(getAltitude());

        case LINE_OF_BEARING:
            return Double.valueOf(getLineOfBearing());

        case LOB_LATITUDE:
            return Double.valueOf(getLobLatitude());

        case LOB_LONGITUDE:
            return Double.valueOf(getLobLongitude());

        case PLACE_NAME:
            return getPlaceName();

        case SEMIMAJOR_ERROR_AXIS:
            return Double.valueOf(getSemimajorErrorAxis());

        case SEMIMINOR_ERROR_AXIS:
            return Double.valueOf(getSemiminorErrorAxis());

        case CIRCULAR_ERROR_PROB:
            return Double.valueOf(getCircularErrorProb());

        case ORIENTATION_ANGLE:
            return Double.valueOf(getOrientationAngle());

        case COURSE:
            return Double.valueOf(getCourse());

        case SPEED:
            return Double.valueOf(getSpeed());

        case SERIAL_NUMBER:
            return getSerialNumber();

        case COLLECTION_TYPE:
            return getCollectionType();

        case LOCATION_CONFIDENCE:
            return getLocationConfidence();

        case DESCRIPTION:
            return getDescription();

        }
        throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
        if (field == null) {
            throw new IllegalArgumentException();
        }

        switch (field) {
        case BASE:
            return isSetBase();
        case LATITUDE:
            return isSetLatitude();
        case LONGITUDE:
            return isSetLongitude();
        case ALTITUDE:
            return isSetAltitude();
        case LINE_OF_BEARING:
            return isSetLineOfBearing();
        case LOB_LATITUDE:
            return isSetLobLatitude();
        case LOB_LONGITUDE:
            return isSetLobLongitude();
        case PLACE_NAME:
            return isSetPlaceName();
        case SEMIMAJOR_ERROR_AXIS:
            return isSetSemimajorErrorAxis();
        case SEMIMINOR_ERROR_AXIS:
            return isSetSemiminorErrorAxis();
        case CIRCULAR_ERROR_PROB:
            return isSetCircularErrorProb();
        case ORIENTATION_ANGLE:
            return isSetOrientationAngle();
        case COURSE:
            return isSetCourse();
        case SPEED:
            return isSetSpeed();
        case SERIAL_NUMBER:
            return isSetSerialNumber();
        case COLLECTION_TYPE:
            return isSetCollectionType();
        case LOCATION_CONFIDENCE:
            return isSetLocationConfidence();
        case DESCRIPTION:
            return isSetDescription();
        }
        throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
        if (that == null)
            return false;
        if (that instanceof Location)
            return this.equals((Location) that);
        return false;
    }

    public boolean equals(Location that) {
        if (that == null)
            return false;

        boolean this_present_base = true && this.isSetBase();
        boolean that_present_base = true && that.isSetBase();
        if (this_present_base || that_present_base) {
            if (!(this_present_base && that_present_base))
                return false;
            if (!this.base.equals(that.base))
                return false;
        }

        boolean this_present_latitude = true;
        boolean that_present_latitude = true;
        if (this_present_latitude || that_present_latitude) {
            if (!(this_present_latitude && that_present_latitude))
                return false;
            if (this.latitude != that.latitude)
                return false;
        }

        boolean this_present_longitude = true;
        boolean that_present_longitude = true;
        if (this_present_longitude || that_present_longitude) {
            if (!(this_present_longitude && that_present_longitude))
                return false;
            if (this.longitude != that.longitude)
                return false;
        }

        boolean this_present_altitude = true && this.isSetAltitude();
        boolean that_present_altitude = true && that.isSetAltitude();
        if (this_present_altitude || that_present_altitude) {
            if (!(this_present_altitude && that_present_altitude))
                return false;
            if (this.altitude != that.altitude)
                return false;
        }

        boolean this_present_lineOfBearing = true && this.isSetLineOfBearing();
        boolean that_present_lineOfBearing = true && that.isSetLineOfBearing();
        if (this_present_lineOfBearing || that_present_lineOfBearing) {
            if (!(this_present_lineOfBearing && that_present_lineOfBearing))
                return false;
            if (this.lineOfBearing != that.lineOfBearing)
                return false;
        }

        boolean this_present_lobLatitude = true && this.isSetLobLatitude();
        boolean that_present_lobLatitude = true && that.isSetLobLatitude();
        if (this_present_lobLatitude || that_present_lobLatitude) {
            if (!(this_present_lobLatitude && that_present_lobLatitude))
                return false;
            if (this.lobLatitude != that.lobLatitude)
                return false;
        }

        boolean this_present_lobLongitude = true && this.isSetLobLongitude();
        boolean that_present_lobLongitude = true && that.isSetLobLongitude();
        if (this_present_lobLongitude || that_present_lobLongitude) {
            if (!(this_present_lobLongitude && that_present_lobLongitude))
                return false;
            if (this.lobLongitude != that.lobLongitude)
                return false;
        }

        boolean this_present_placeName = true && this.isSetPlaceName();
        boolean that_present_placeName = true && that.isSetPlaceName();
        if (this_present_placeName || that_present_placeName) {
            if (!(this_present_placeName && that_present_placeName))
                return false;
            if (!this.placeName.equals(that.placeName))
                return false;
        }

        boolean this_present_semimajorErrorAxis = true && this.isSetSemimajorErrorAxis();
        boolean that_present_semimajorErrorAxis = true && that.isSetSemimajorErrorAxis();
        if (this_present_semimajorErrorAxis || that_present_semimajorErrorAxis) {
            if (!(this_present_semimajorErrorAxis && that_present_semimajorErrorAxis))
                return false;
            if (this.semimajorErrorAxis != that.semimajorErrorAxis)
                return false;
        }

        boolean this_present_semiminorErrorAxis = true && this.isSetSemiminorErrorAxis();
        boolean that_present_semiminorErrorAxis = true && that.isSetSemiminorErrorAxis();
        if (this_present_semiminorErrorAxis || that_present_semiminorErrorAxis) {
            if (!(this_present_semiminorErrorAxis && that_present_semiminorErrorAxis))
                return false;
            if (this.semiminorErrorAxis != that.semiminorErrorAxis)
                return false;
        }

        boolean this_present_circularErrorProb = true && this.isSetCircularErrorProb();
        boolean that_present_circularErrorProb = true && that.isSetCircularErrorProb();
        if (this_present_circularErrorProb || that_present_circularErrorProb) {
            if (!(this_present_circularErrorProb && that_present_circularErrorProb))
                return false;
            if (this.circularErrorProb != that.circularErrorProb)
                return false;
        }

        boolean this_present_orientationAngle = true && this.isSetOrientationAngle();
        boolean that_present_orientationAngle = true && that.isSetOrientationAngle();
        if (this_present_orientationAngle || that_present_orientationAngle) {
            if (!(this_present_orientationAngle && that_present_orientationAngle))
                return false;
            if (this.orientationAngle != that.orientationAngle)
                return false;
        }

        boolean this_present_course = true && this.isSetCourse();
        boolean that_present_course = true && that.isSetCourse();
        if (this_present_course || that_present_course) {
            if (!(this_present_course && that_present_course))
                return false;
            if (this.course != that.course)
                return false;
        }

        boolean this_present_speed = true && this.isSetSpeed();
        boolean that_present_speed = true && that.isSetSpeed();
        if (this_present_speed || that_present_speed) {
            if (!(this_present_speed && that_present_speed))
                return false;
            if (this.speed != that.speed)
                return false;
        }

        boolean this_present_serialNumber = true && this.isSetSerialNumber();
        boolean that_present_serialNumber = true && that.isSetSerialNumber();
        if (this_present_serialNumber || that_present_serialNumber) {
            if (!(this_present_serialNumber && that_present_serialNumber))
                return false;
            if (!this.serialNumber.equals(that.serialNumber))
                return false;
        }

        boolean this_present_collectionType = true && this.isSetCollectionType();
        boolean that_present_collectionType = true && that.isSetCollectionType();
        if (this_present_collectionType || that_present_collectionType) {
            if (!(this_present_collectionType && that_present_collectionType))
                return false;
            if (!this.collectionType.equals(that.collectionType))
                return false;
        }

        boolean this_present_locationConfidence = true && this.isSetLocationConfidence();
        boolean that_present_locationConfidence = true && that.isSetLocationConfidence();
        if (this_present_locationConfidence || that_present_locationConfidence) {
            if (!(this_present_locationConfidence && that_present_locationConfidence))
                return false;
            if (!this.locationConfidence.equals(that.locationConfidence))
                return false;
        }

        boolean this_present_description = true && this.isSetDescription();
        boolean that_present_description = true && that.isSetDescription();
        if (this_present_description || that_present_description) {
            if (!(this_present_description && that_present_description))
                return false;
            if (!this.description.equals(that.description))
                return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        return 0;
    }

    @Override
    public int compareTo(Location other) {
        if (!getClass().equals(other.getClass())) {
            return getClass().getName().compareTo(other.getClass().getName());
        }

        int lastComparison = 0;

        lastComparison = Boolean.valueOf(isSetBase()).compareTo(other.isSetBase());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetBase()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base, other.base);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetLatitude()).compareTo(other.isSetLatitude());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetLatitude()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.latitude, other.latitude);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetLongitude()).compareTo(other.isSetLongitude());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetLongitude()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.longitude, other.longitude);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetAltitude()).compareTo(other.isSetAltitude());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetAltitude()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.altitude, other.altitude);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetLineOfBearing()).compareTo(other.isSetLineOfBearing());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetLineOfBearing()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lineOfBearing, other.lineOfBearing);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetLobLatitude()).compareTo(other.isSetLobLatitude());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetLobLatitude()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lobLatitude, other.lobLatitude);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetLobLongitude()).compareTo(other.isSetLobLongitude());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetLobLongitude()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lobLongitude, other.lobLongitude);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetPlaceName()).compareTo(other.isSetPlaceName());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetPlaceName()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.placeName, other.placeName);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetSemimajorErrorAxis()).compareTo(other.isSetSemimajorErrorAxis());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetSemimajorErrorAxis()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.semimajorErrorAxis,
                    other.semimajorErrorAxis);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetSemiminorErrorAxis()).compareTo(other.isSetSemiminorErrorAxis());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetSemiminorErrorAxis()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.semiminorErrorAxis,
                    other.semiminorErrorAxis);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetCircularErrorProb()).compareTo(other.isSetCircularErrorProb());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetCircularErrorProb()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.circularErrorProb,
                    other.circularErrorProb);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetOrientationAngle()).compareTo(other.isSetOrientationAngle());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetOrientationAngle()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orientationAngle, other.orientationAngle);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetCourse()).compareTo(other.isSetCourse());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetCourse()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.course, other.course);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetSpeed()).compareTo(other.isSetSpeed());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetSpeed()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.speed, other.speed);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(other.isSetSerialNumber());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetSerialNumber()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, other.serialNumber);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetCollectionType()).compareTo(other.isSetCollectionType());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetCollectionType()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.collectionType, other.collectionType);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetLocationConfidence()).compareTo(other.isSetLocationConfidence());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetLocationConfidence()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.locationConfidence,
                    other.locationConfidence);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetDescription()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        return 0;
    }

    public _Fields fieldForId(int fieldId) {
        return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
        schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
        schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("Location(");
        boolean first = true;

        sb.append("base:");
        if (this.base == null) {
            sb.append("null");
        } else {
            sb.append(this.base);
        }
        first = false;
        if (!first)
            sb.append(", ");
        sb.append("latitude:");
        sb.append(this.latitude);
        first = false;
        if (!first)
            sb.append(", ");
        sb.append("longitude:");
        sb.append(this.longitude);
        first = false;
        if (isSetAltitude()) {
            if (!first)
                sb.append(", ");
            sb.append("altitude:");
            sb.append(this.altitude);
            first = false;
        }
        if (isSetLineOfBearing()) {
            if (!first)
                sb.append(", ");
            sb.append("lineOfBearing:");
            sb.append(this.lineOfBearing);
            first = false;
        }
        if (isSetLobLatitude()) {
            if (!first)
                sb.append(", ");
            sb.append("lobLatitude:");
            sb.append(this.lobLatitude);
            first = false;
        }
        if (isSetLobLongitude()) {
            if (!first)
                sb.append(", ");
            sb.append("lobLongitude:");
            sb.append(this.lobLongitude);
            first = false;
        }
        if (isSetPlaceName()) {
            if (!first)
                sb.append(", ");
            sb.append("placeName:");
            if (this.placeName == null) {
                sb.append("null");
            } else {
                sb.append(this.placeName);
            }
            first = false;
        }
        if (isSetSemimajorErrorAxis()) {
            if (!first)
                sb.append(", ");
            sb.append("semimajorErrorAxis:");
            sb.append(this.semimajorErrorAxis);
            first = false;
        }
        if (isSetSemiminorErrorAxis()) {
            if (!first)
                sb.append(", ");
            sb.append("semiminorErrorAxis:");
            sb.append(this.semiminorErrorAxis);
            first = false;
        }
        if (isSetCircularErrorProb()) {
            if (!first)
                sb.append(", ");
            sb.append("circularErrorProb:");
            sb.append(this.circularErrorProb);
            first = false;
        }
        if (isSetOrientationAngle()) {
            if (!first)
                sb.append(", ");
            sb.append("orientationAngle:");
            sb.append(this.orientationAngle);
            first = false;
        }
        if (isSetCourse()) {
            if (!first)
                sb.append(", ");
            sb.append("course:");
            sb.append(this.course);
            first = false;
        }
        if (isSetSpeed()) {
            if (!first)
                sb.append(", ");
            sb.append("speed:");
            sb.append(this.speed);
            first = false;
        }
        if (isSetSerialNumber()) {
            if (!first)
                sb.append(", ");
            sb.append("serialNumber:");
            if (this.serialNumber == null) {
                sb.append("null");
            } else {
                sb.append(this.serialNumber);
            }
            first = false;
        }
        if (isSetCollectionType()) {
            if (!first)
                sb.append(", ");
            sb.append("collectionType:");
            if (this.collectionType == null) {
                sb.append("null");
            } else {
                sb.append(this.collectionType);
            }
            first = false;
        }
        if (isSetLocationConfidence()) {
            if (!first)
                sb.append(", ");
            sb.append("locationConfidence:");
            if (this.locationConfidence == null) {
                sb.append("null");
            } else {
                sb.append(this.locationConfidence);
            }
            first = false;
        }
        if (isSetDescription()) {
            if (!first)
                sb.append(", ");
            sb.append("description:");
            if (this.description == null) {
                sb.append("null");
            } else {
                sb.append(this.description);
            }
            first = false;
        }
        sb.append(")");
        return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
        // check for required fields
        if (base == null) {
            throw new org.apache.thrift.protocol.TProtocolException(
                    "Required field 'base' was not present! Struct: " + toString());
        }
        // alas, we cannot check 'latitude' because it's a primitive and you chose the non-beans generator.
        // alas, we cannot check 'longitude' because it's a primitive and you chose the non-beans generator.
        // check for sub-struct validity
        if (base != null) {
            base.validate();
        }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
        try {
            write(new org.apache.thrift.protocol.TCompactProtocol(
                    new org.apache.thrift.transport.TIOStreamTransport(out)));
        } catch (org.apache.thrift.TException te) {
            throw new java.io.IOException(te);
        }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
        try {
            // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
            __isset_bitfield = 0;
            read(new org.apache.thrift.protocol.TCompactProtocol(
                    new org.apache.thrift.transport.TIOStreamTransport(in)));
        } catch (org.apache.thrift.TException te) {
            throw new java.io.IOException(te);
        }
    }

    private static class LocationStandardSchemeFactory implements SchemeFactory {
        public LocationStandardScheme getScheme() {
            return new LocationStandardScheme();
        }
    }

    private static class LocationStandardScheme extends StandardScheme<Location> {

        public void read(org.apache.thrift.protocol.TProtocol iprot, Location struct)
                throws org.apache.thrift.TException {
            org.apache.thrift.protocol.TField schemeField;
            iprot.readStructBegin();
            while (true) {
                schemeField = iprot.readFieldBegin();
                if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
                    break;
                }
                switch (schemeField.id) {
                case 1: // BASE
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                        struct.base = new ezbake.query.intents.base.BaseContext();
                        struct.base.read(iprot);
                        struct.setBaseIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 2: // LATITUDE
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.latitude = iprot.readDouble();
                        struct.setLatitudeIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 3: // LONGITUDE
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.longitude = iprot.readDouble();
                        struct.setLongitudeIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 4: // ALTITUDE
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.altitude = iprot.readDouble();
                        struct.setAltitudeIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 5: // LINE_OF_BEARING
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.lineOfBearing = iprot.readDouble();
                        struct.setLineOfBearingIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 6: // LOB_LATITUDE
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.lobLatitude = iprot.readDouble();
                        struct.setLobLatitudeIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 7: // LOB_LONGITUDE
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.lobLongitude = iprot.readDouble();
                        struct.setLobLongitudeIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 8: // PLACE_NAME
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.placeName = iprot.readString();
                        struct.setPlaceNameIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 9: // SEMIMAJOR_ERROR_AXIS
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.semimajorErrorAxis = iprot.readDouble();
                        struct.setSemimajorErrorAxisIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 10: // SEMIMINOR_ERROR_AXIS
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.semiminorErrorAxis = iprot.readDouble();
                        struct.setSemiminorErrorAxisIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 11: // CIRCULAR_ERROR_PROB
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.circularErrorProb = iprot.readDouble();
                        struct.setCircularErrorProbIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 12: // ORIENTATION_ANGLE
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.orientationAngle = iprot.readDouble();
                        struct.setOrientationAngleIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 13: // COURSE
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.course = iprot.readDouble();
                        struct.setCourseIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 14: // SPEED
                    if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                        struct.speed = iprot.readDouble();
                        struct.setSpeedIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 15: // SERIAL_NUMBER
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.serialNumber = iprot.readString();
                        struct.setSerialNumberIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 16: // COLLECTION_TYPE
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.collectionType = iprot.readString();
                        struct.setCollectionTypeIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 17: // LOCATION_CONFIDENCE
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.locationConfidence = iprot.readString();
                        struct.setLocationConfidenceIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 18: // DESCRIPTION
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.description = iprot.readString();
                        struct.setDescriptionIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                default:
                    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                iprot.readFieldEnd();
            }
            iprot.readStructEnd();

            // check for required fields of primitive type, which can't be checked in the validate method
            if (!struct.isSetLatitude()) {
                throw new org.apache.thrift.protocol.TProtocolException(
                        "Required field 'latitude' was not found in serialized data! Struct: " + toString());
            }
            if (!struct.isSetLongitude()) {
                throw new org.apache.thrift.protocol.TProtocolException(
                        "Required field 'longitude' was not found in serialized data! Struct: " + toString());
            }
            struct.validate();
        }

        public void write(org.apache.thrift.protocol.TProtocol oprot, Location struct)
                throws org.apache.thrift.TException {
            struct.validate();

            oprot.writeStructBegin(STRUCT_DESC);
            if (struct.base != null) {
                oprot.writeFieldBegin(BASE_FIELD_DESC);
                struct.base.write(oprot);
                oprot.writeFieldEnd();
            }
            oprot.writeFieldBegin(LATITUDE_FIELD_DESC);
            oprot.writeDouble(struct.latitude);
            oprot.writeFieldEnd();
            oprot.writeFieldBegin(LONGITUDE_FIELD_DESC);
            oprot.writeDouble(struct.longitude);
            oprot.writeFieldEnd();
            if (struct.isSetAltitude()) {
                oprot.writeFieldBegin(ALTITUDE_FIELD_DESC);
                oprot.writeDouble(struct.altitude);
                oprot.writeFieldEnd();
            }
            if (struct.isSetLineOfBearing()) {
                oprot.writeFieldBegin(LINE_OF_BEARING_FIELD_DESC);
                oprot.writeDouble(struct.lineOfBearing);
                oprot.writeFieldEnd();
            }
            if (struct.isSetLobLatitude()) {
                oprot.writeFieldBegin(LOB_LATITUDE_FIELD_DESC);
                oprot.writeDouble(struct.lobLatitude);
                oprot.writeFieldEnd();
            }
            if (struct.isSetLobLongitude()) {
                oprot.writeFieldBegin(LOB_LONGITUDE_FIELD_DESC);
                oprot.writeDouble(struct.lobLongitude);
                oprot.writeFieldEnd();
            }
            if (struct.placeName != null) {
                if (struct.isSetPlaceName()) {
                    oprot.writeFieldBegin(PLACE_NAME_FIELD_DESC);
                    oprot.writeString(struct.placeName);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.isSetSemimajorErrorAxis()) {
                oprot.writeFieldBegin(SEMIMAJOR_ERROR_AXIS_FIELD_DESC);
                oprot.writeDouble(struct.semimajorErrorAxis);
                oprot.writeFieldEnd();
            }
            if (struct.isSetSemiminorErrorAxis()) {
                oprot.writeFieldBegin(SEMIMINOR_ERROR_AXIS_FIELD_DESC);
                oprot.writeDouble(struct.semiminorErrorAxis);
                oprot.writeFieldEnd();
            }
            if (struct.isSetCircularErrorProb()) {
                oprot.writeFieldBegin(CIRCULAR_ERROR_PROB_FIELD_DESC);
                oprot.writeDouble(struct.circularErrorProb);
                oprot.writeFieldEnd();
            }
            if (struct.isSetOrientationAngle()) {
                oprot.writeFieldBegin(ORIENTATION_ANGLE_FIELD_DESC);
                oprot.writeDouble(struct.orientationAngle);
                oprot.writeFieldEnd();
            }
            if (struct.isSetCourse()) {
                oprot.writeFieldBegin(COURSE_FIELD_DESC);
                oprot.writeDouble(struct.course);
                oprot.writeFieldEnd();
            }
            if (struct.isSetSpeed()) {
                oprot.writeFieldBegin(SPEED_FIELD_DESC);
                oprot.writeDouble(struct.speed);
                oprot.writeFieldEnd();
            }
            if (struct.serialNumber != null) {
                if (struct.isSetSerialNumber()) {
                    oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
                    oprot.writeString(struct.serialNumber);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.collectionType != null) {
                if (struct.isSetCollectionType()) {
                    oprot.writeFieldBegin(COLLECTION_TYPE_FIELD_DESC);
                    oprot.writeString(struct.collectionType);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.locationConfidence != null) {
                if (struct.isSetLocationConfidence()) {
                    oprot.writeFieldBegin(LOCATION_CONFIDENCE_FIELD_DESC);
                    oprot.writeString(struct.locationConfidence);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.description != null) {
                if (struct.isSetDescription()) {
                    oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
                    oprot.writeString(struct.description);
                    oprot.writeFieldEnd();
                }
            }
            oprot.writeFieldStop();
            oprot.writeStructEnd();
        }

    }

    private static class LocationTupleSchemeFactory implements SchemeFactory {
        public LocationTupleScheme getScheme() {
            return new LocationTupleScheme();
        }
    }

    private static class LocationTupleScheme extends TupleScheme<Location> {

        @Override
        public void write(org.apache.thrift.protocol.TProtocol prot, Location struct)
                throws org.apache.thrift.TException {
            TTupleProtocol oprot = (TTupleProtocol) prot;
            struct.base.write(oprot);
            oprot.writeDouble(struct.latitude);
            oprot.writeDouble(struct.longitude);
            BitSet optionals = new BitSet();
            if (struct.isSetAltitude()) {
                optionals.set(0);
            }
            if (struct.isSetLineOfBearing()) {
                optionals.set(1);
            }
            if (struct.isSetLobLatitude()) {
                optionals.set(2);
            }
            if (struct.isSetLobLongitude()) {
                optionals.set(3);
            }
            if (struct.isSetPlaceName()) {
                optionals.set(4);
            }
            if (struct.isSetSemimajorErrorAxis()) {
                optionals.set(5);
            }
            if (struct.isSetSemiminorErrorAxis()) {
                optionals.set(6);
            }
            if (struct.isSetCircularErrorProb()) {
                optionals.set(7);
            }
            if (struct.isSetOrientationAngle()) {
                optionals.set(8);
            }
            if (struct.isSetCourse()) {
                optionals.set(9);
            }
            if (struct.isSetSpeed()) {
                optionals.set(10);
            }
            if (struct.isSetSerialNumber()) {
                optionals.set(11);
            }
            if (struct.isSetCollectionType()) {
                optionals.set(12);
            }
            if (struct.isSetLocationConfidence()) {
                optionals.set(13);
            }
            if (struct.isSetDescription()) {
                optionals.set(14);
            }
            oprot.writeBitSet(optionals, 15);
            if (struct.isSetAltitude()) {
                oprot.writeDouble(struct.altitude);
            }
            if (struct.isSetLineOfBearing()) {
                oprot.writeDouble(struct.lineOfBearing);
            }
            if (struct.isSetLobLatitude()) {
                oprot.writeDouble(struct.lobLatitude);
            }
            if (struct.isSetLobLongitude()) {
                oprot.writeDouble(struct.lobLongitude);
            }
            if (struct.isSetPlaceName()) {
                oprot.writeString(struct.placeName);
            }
            if (struct.isSetSemimajorErrorAxis()) {
                oprot.writeDouble(struct.semimajorErrorAxis);
            }
            if (struct.isSetSemiminorErrorAxis()) {
                oprot.writeDouble(struct.semiminorErrorAxis);
            }
            if (struct.isSetCircularErrorProb()) {
                oprot.writeDouble(struct.circularErrorProb);
            }
            if (struct.isSetOrientationAngle()) {
                oprot.writeDouble(struct.orientationAngle);
            }
            if (struct.isSetCourse()) {
                oprot.writeDouble(struct.course);
            }
            if (struct.isSetSpeed()) {
                oprot.writeDouble(struct.speed);
            }
            if (struct.isSetSerialNumber()) {
                oprot.writeString(struct.serialNumber);
            }
            if (struct.isSetCollectionType()) {
                oprot.writeString(struct.collectionType);
            }
            if (struct.isSetLocationConfidence()) {
                oprot.writeString(struct.locationConfidence);
            }
            if (struct.isSetDescription()) {
                oprot.writeString(struct.description);
            }
        }

        @Override
        public void read(org.apache.thrift.protocol.TProtocol prot, Location struct)
                throws org.apache.thrift.TException {
            TTupleProtocol iprot = (TTupleProtocol) prot;
            struct.base = new ezbake.query.intents.base.BaseContext();
            struct.base.read(iprot);
            struct.setBaseIsSet(true);
            struct.latitude = iprot.readDouble();
            struct.setLatitudeIsSet(true);
            struct.longitude = iprot.readDouble();
            struct.setLongitudeIsSet(true);
            BitSet incoming = iprot.readBitSet(15);
            if (incoming.get(0)) {
                struct.altitude = iprot.readDouble();
                struct.setAltitudeIsSet(true);
            }
            if (incoming.get(1)) {
                struct.lineOfBearing = iprot.readDouble();
                struct.setLineOfBearingIsSet(true);
            }
            if (incoming.get(2)) {
                struct.lobLatitude = iprot.readDouble();
                struct.setLobLatitudeIsSet(true);
            }
            if (incoming.get(3)) {
                struct.lobLongitude = iprot.readDouble();
                struct.setLobLongitudeIsSet(true);
            }
            if (incoming.get(4)) {
                struct.placeName = iprot.readString();
                struct.setPlaceNameIsSet(true);
            }
            if (incoming.get(5)) {
                struct.semimajorErrorAxis = iprot.readDouble();
                struct.setSemimajorErrorAxisIsSet(true);
            }
            if (incoming.get(6)) {
                struct.semiminorErrorAxis = iprot.readDouble();
                struct.setSemiminorErrorAxisIsSet(true);
            }
            if (incoming.get(7)) {
                struct.circularErrorProb = iprot.readDouble();
                struct.setCircularErrorProbIsSet(true);
            }
            if (incoming.get(8)) {
                struct.orientationAngle = iprot.readDouble();
                struct.setOrientationAngleIsSet(true);
            }
            if (incoming.get(9)) {
                struct.course = iprot.readDouble();
                struct.setCourseIsSet(true);
            }
            if (incoming.get(10)) {
                struct.speed = iprot.readDouble();
                struct.setSpeedIsSet(true);
            }
            if (incoming.get(11)) {
                struct.serialNumber = iprot.readString();
                struct.setSerialNumberIsSet(true);
            }
            if (incoming.get(12)) {
                struct.collectionType = iprot.readString();
                struct.setCollectionTypeIsSet(true);
            }
            if (incoming.get(13)) {
                struct.locationConfidence = iprot.readString();
                struct.setLocationConfidenceIsSet(true);
            }
            if (incoming.get(14)) {
                struct.description = iprot.readString();
                struct.setDescriptionIsSet(true);
            }
        }
    }

}