com.vmware.bdd.software.mgmt.thrift.ServerData.java Source code

Java tutorial

Introduction

Here is the source code for com.vmware.bdd.software.mgmt.thrift.ServerData.java

Source

/***************************************************************************
 * Copyright (c) 2012-2013 VMware, Inc. All Rights Reserved.
 * 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.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.vmware.bdd.software.mgmt.thrift;

import java.util.BitSet;
import java.util.Collections;
import java.util.EnumMap;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

import org.apache.thrift.EncodingUtils;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;

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

    private static final org.apache.thrift.protocol.TField ACTION_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "action", org.apache.thrift.protocol.TType.STRING, (short) 1);
    private static final org.apache.thrift.protocol.TField BOOTSTRAPPED_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "bootstrapped", org.apache.thrift.protocol.TType.BOOL, (short) 2);
    private static final org.apache.thrift.protocol.TField CREATED_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "created", org.apache.thrift.protocol.TType.BOOL, (short) 3);
    private static final org.apache.thrift.protocol.TField DELETED_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "deleted", org.apache.thrift.protocol.TType.BOOL, (short) 4);
    private static final org.apache.thrift.protocol.TField ERROR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "error_code", org.apache.thrift.protocol.TType.I32, (short) 5);
    private static final org.apache.thrift.protocol.TField ERROR_MSG_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "error_msg", org.apache.thrift.protocol.TType.STRING, (short) 6);
    private static final org.apache.thrift.protocol.TField FINISHED_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "finished", org.apache.thrift.protocol.TType.BOOL, (short) 7);
    private static final org.apache.thrift.protocol.TField HA_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "ha", org.apache.thrift.protocol.TType.BOOL, (short) 8);
    private static final org.apache.thrift.protocol.TField HOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "hostName", org.apache.thrift.protocol.TType.STRING, (short) 9);
    private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "ipAddress", org.apache.thrift.protocol.TType.STRING, (short) 10);
    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "name", org.apache.thrift.protocol.TType.STRING, (short) 11);
    private static final org.apache.thrift.protocol.TField PHYSICAL_HOST_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "physicalHost", org.apache.thrift.protocol.TType.STRING, (short) 12);
    private static final org.apache.thrift.protocol.TField PROGRESS_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "progress", org.apache.thrift.protocol.TType.I32, (short) 13);
    private static final org.apache.thrift.protocol.TField RACK_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "rack", org.apache.thrift.protocol.TType.STRING, (short) 14);
    private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "status", org.apache.thrift.protocol.TType.STRING, (short) 15);
    private static final org.apache.thrift.protocol.TField SUCCEED_FIELD_DESC = new org.apache.thrift.protocol.TField(
            "succeed", org.apache.thrift.protocol.TType.BOOL, (short) 16);

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

    public String action; // optional
    public boolean bootstrapped; // optional
    public boolean created; // optional
    public boolean deleted; // optional
    public int error_code; // optional
    public String error_msg; // optional
    public boolean finished; // optional
    public boolean ha; // optional
    public String hostName; // optional
    public String ipAddress; // optional
    public String name; // optional
    public String physicalHost; // optional
    public int progress; // optional
    public String rack; // optional
    public String status; // optional
    public boolean succeed; // 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 {
        ACTION((short) 1, "action"), BOOTSTRAPPED((short) 2, "bootstrapped"), CREATED((short) 3,
                "created"), DELETED((short) 4, "deleted"), ERROR_CODE((short) 5, "error_code"), ERROR_MSG((short) 6,
                        "error_msg"), FINISHED((short) 7, "finished"), HA((short) 8, "ha"), HOST_NAME((short) 9,
                                "hostName"), IP_ADDRESS((short) 10, "ipAddress"), NAME((short) 11,
                                        "name"), PHYSICAL_HOST((short) 12, "physicalHost"), PROGRESS((short) 13,
                                                "progress"), RACK((short) 14, "rack"), STATUS((short) 15,
                                                        "status"), SUCCEED((short) 16, "succeed");

        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: // ACTION
                return ACTION;
            case 2: // BOOTSTRAPPED
                return BOOTSTRAPPED;
            case 3: // CREATED
                return CREATED;
            case 4: // DELETED
                return DELETED;
            case 5: // ERROR_CODE
                return ERROR_CODE;
            case 6: // ERROR_MSG
                return ERROR_MSG;
            case 7: // FINISHED
                return FINISHED;
            case 8: // HA
                return HA;
            case 9: // HOST_NAME
                return HOST_NAME;
            case 10: // IP_ADDRESS
                return IP_ADDRESS;
            case 11: // NAME
                return NAME;
            case 12: // PHYSICAL_HOST
                return PHYSICAL_HOST;
            case 13: // PROGRESS
                return PROGRESS;
            case 14: // RACK
                return RACK;
            case 15: // STATUS
                return STATUS;
            case 16: // SUCCEED
                return SUCCEED;
            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 __BOOTSTRAPPED_ISSET_ID = 0;
    private static final int __CREATED_ISSET_ID = 1;
    private static final int __DELETED_ISSET_ID = 2;
    private static final int __ERROR_CODE_ISSET_ID = 3;
    private static final int __FINISHED_ISSET_ID = 4;
    private static final int __HA_ISSET_ID = 5;
    private static final int __PROGRESS_ISSET_ID = 6;
    private static final int __SUCCEED_ISSET_ID = 7;
    private byte __isset_bitfield = 0;
    private _Fields optionals[] = { _Fields.ACTION, _Fields.BOOTSTRAPPED, _Fields.CREATED, _Fields.DELETED,
            _Fields.ERROR_CODE, _Fields.ERROR_MSG, _Fields.FINISHED, _Fields.HA, _Fields.HOST_NAME,
            _Fields.IP_ADDRESS, _Fields.NAME, _Fields.PHYSICAL_HOST, _Fields.PROGRESS, _Fields.RACK, _Fields.STATUS,
            _Fields.SUCCEED };
    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.ACTION, new org.apache.thrift.meta_data.FieldMetaData("action",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.BOOTSTRAPPED,
                new org.apache.thrift.meta_data.FieldMetaData("bootstrapped",
                        org.apache.thrift.TFieldRequirementType.OPTIONAL,
                        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
        tmpMap.put(_Fields.CREATED,
                new org.apache.thrift.meta_data.FieldMetaData("created",
                        org.apache.thrift.TFieldRequirementType.OPTIONAL,
                        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
        tmpMap.put(_Fields.DELETED,
                new org.apache.thrift.meta_data.FieldMetaData("deleted",
                        org.apache.thrift.TFieldRequirementType.OPTIONAL,
                        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
        tmpMap.put(_Fields.ERROR_CODE,
                new org.apache.thrift.meta_data.FieldMetaData("error_code",
                        org.apache.thrift.TFieldRequirementType.OPTIONAL,
                        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
        tmpMap.put(_Fields.ERROR_MSG, new org.apache.thrift.meta_data.FieldMetaData("error_msg",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.FINISHED,
                new org.apache.thrift.meta_data.FieldMetaData("finished",
                        org.apache.thrift.TFieldRequirementType.OPTIONAL,
                        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
        tmpMap.put(_Fields.HA,
                new org.apache.thrift.meta_data.FieldMetaData("ha",
                        org.apache.thrift.TFieldRequirementType.OPTIONAL,
                        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
        tmpMap.put(_Fields.HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("hostName",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.PHYSICAL_HOST, new org.apache.thrift.meta_data.FieldMetaData("physicalHost",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.PROGRESS,
                new org.apache.thrift.meta_data.FieldMetaData("progress",
                        org.apache.thrift.TFieldRequirementType.OPTIONAL,
                        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
        tmpMap.put(_Fields.RACK, new org.apache.thrift.meta_data.FieldMetaData("rack",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status",
                org.apache.thrift.TFieldRequirementType.OPTIONAL,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        tmpMap.put(_Fields.SUCCEED,
                new org.apache.thrift.meta_data.FieldMetaData("succeed",
                        org.apache.thrift.TFieldRequirementType.OPTIONAL,
                        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
        metaDataMap = Collections.unmodifiableMap(tmpMap);
        org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ServerData.class, metaDataMap);
    }

    public ServerData() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public ServerData(ServerData other) {
        __isset_bitfield = other.__isset_bitfield;
        if (other.isSetAction()) {
            this.action = other.action;
        }
        this.bootstrapped = other.bootstrapped;
        this.created = other.created;
        this.deleted = other.deleted;
        this.error_code = other.error_code;
        if (other.isSetError_msg()) {
            this.error_msg = other.error_msg;
        }
        this.finished = other.finished;
        this.ha = other.ha;
        if (other.isSetHostName()) {
            this.hostName = other.hostName;
        }
        if (other.isSetIpAddress()) {
            this.ipAddress = other.ipAddress;
        }
        if (other.isSetName()) {
            this.name = other.name;
        }
        if (other.isSetPhysicalHost()) {
            this.physicalHost = other.physicalHost;
        }
        this.progress = other.progress;
        if (other.isSetRack()) {
            this.rack = other.rack;
        }
        if (other.isSetStatus()) {
            this.status = other.status;
        }
        this.succeed = other.succeed;
    }

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

    @Override
    public void clear() {
        this.action = null;
        setBootstrappedIsSet(false);
        this.bootstrapped = false;
        setCreatedIsSet(false);
        this.created = false;
        setDeletedIsSet(false);
        this.deleted = false;
        setError_codeIsSet(false);
        this.error_code = 0;
        this.error_msg = null;
        setFinishedIsSet(false);
        this.finished = false;
        setHaIsSet(false);
        this.ha = false;
        this.hostName = null;
        this.ipAddress = null;
        this.name = null;
        this.physicalHost = null;
        setProgressIsSet(false);
        this.progress = 0;
        this.rack = null;
        this.status = null;
        setSucceedIsSet(false);
        this.succeed = false;
    }

    public String getAction() {
        return this.action;
    }

    public ServerData setAction(String action) {
        this.action = action;
        return this;
    }

    public void unsetAction() {
        this.action = null;
    }

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

    public void setActionIsSet(boolean value) {
        if (!value) {
            this.action = null;
        }
    }

    public boolean isBootstrapped() {
        return this.bootstrapped;
    }

    public ServerData setBootstrapped(boolean bootstrapped) {
        this.bootstrapped = bootstrapped;
        setBootstrappedIsSet(true);
        return this;
    }

    public void unsetBootstrapped() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BOOTSTRAPPED_ISSET_ID);
    }

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

    public void setBootstrappedIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BOOTSTRAPPED_ISSET_ID, value);
    }

    public boolean isCreated() {
        return this.created;
    }

    public ServerData setCreated(boolean created) {
        this.created = created;
        setCreatedIsSet(true);
        return this;
    }

    public void unsetCreated() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATED_ISSET_ID);
    }

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

    public void setCreatedIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATED_ISSET_ID, value);
    }

    public boolean isDeleted() {
        return this.deleted;
    }

    public ServerData setDeleted(boolean deleted) {
        this.deleted = deleted;
        setDeletedIsSet(true);
        return this;
    }

    public void unsetDeleted() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETED_ISSET_ID);
    }

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

    public void setDeletedIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETED_ISSET_ID, value);
    }

    public int getError_code() {
        return this.error_code;
    }

    public ServerData setError_code(int error_code) {
        this.error_code = error_code;
        setError_codeIsSet(true);
        return this;
    }

    public void unsetError_code() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERROR_CODE_ISSET_ID);
    }

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

    public void setError_codeIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERROR_CODE_ISSET_ID, value);
    }

    public String getError_msg() {
        return this.error_msg;
    }

    public ServerData setError_msg(String error_msg) {
        this.error_msg = error_msg;
        return this;
    }

    public void unsetError_msg() {
        this.error_msg = null;
    }

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

    public void setError_msgIsSet(boolean value) {
        if (!value) {
            this.error_msg = null;
        }
    }

    public boolean isFinished() {
        return this.finished;
    }

    public ServerData setFinished(boolean finished) {
        this.finished = finished;
        setFinishedIsSet(true);
        return this;
    }

    public void unsetFinished() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FINISHED_ISSET_ID);
    }

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

    public void setFinishedIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FINISHED_ISSET_ID, value);
    }

    public boolean isHa() {
        return this.ha;
    }

    public ServerData setHa(boolean ha) {
        this.ha = ha;
        setHaIsSet(true);
        return this;
    }

    public void unsetHa() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HA_ISSET_ID);
    }

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

    public void setHaIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HA_ISSET_ID, value);
    }

    public String getHostName() {
        return this.hostName;
    }

    public ServerData setHostName(String hostName) {
        this.hostName = hostName;
        return this;
    }

    public void unsetHostName() {
        this.hostName = null;
    }

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

    public void setHostNameIsSet(boolean value) {
        if (!value) {
            this.hostName = null;
        }
    }

    public String getIpAddress() {
        return this.ipAddress;
    }

    public ServerData setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
        return this;
    }

    public void unsetIpAddress() {
        this.ipAddress = null;
    }

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

    public void setIpAddressIsSet(boolean value) {
        if (!value) {
            this.ipAddress = null;
        }
    }

    public String getName() {
        return this.name;
    }

    public ServerData setName(String name) {
        this.name = name;
        return this;
    }

    public void unsetName() {
        this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
        if (!value) {
            this.name = null;
        }
    }

    public String getPhysicalHost() {
        return this.physicalHost;
    }

    public ServerData setPhysicalHost(String physicalHost) {
        this.physicalHost = physicalHost;
        return this;
    }

    public void unsetPhysicalHost() {
        this.physicalHost = null;
    }

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

    public void setPhysicalHostIsSet(boolean value) {
        if (!value) {
            this.physicalHost = null;
        }
    }

    public int getProgress() {
        return this.progress;
    }

    public ServerData setProgress(int progress) {
        this.progress = progress;
        setProgressIsSet(true);
        return this;
    }

    public void unsetProgress() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PROGRESS_ISSET_ID);
    }

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

    public void setProgressIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PROGRESS_ISSET_ID, value);
    }

    public String getRack() {
        return this.rack;
    }

    public ServerData setRack(String rack) {
        this.rack = rack;
        return this;
    }

    public void unsetRack() {
        this.rack = null;
    }

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

    public void setRackIsSet(boolean value) {
        if (!value) {
            this.rack = null;
        }
    }

    public String getStatus() {
        return this.status;
    }

    public ServerData setStatus(String status) {
        this.status = status;
        return this;
    }

    public void unsetStatus() {
        this.status = null;
    }

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

    public void setStatusIsSet(boolean value) {
        if (!value) {
            this.status = null;
        }
    }

    public boolean isSucceed() {
        return this.succeed;
    }

    public ServerData setSucceed(boolean succeed) {
        this.succeed = succeed;
        setSucceedIsSet(true);
        return this;
    }

    public void unsetSucceed() {
        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCEED_ISSET_ID);
    }

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

    public void setSucceedIsSet(boolean value) {
        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCEED_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
        switch (field) {
        case ACTION:
            if (value == null) {
                unsetAction();
            } else {
                setAction((String) value);
            }
            break;

        case BOOTSTRAPPED:
            if (value == null) {
                unsetBootstrapped();
            } else {
                setBootstrapped((Boolean) value);
            }
            break;

        case CREATED:
            if (value == null) {
                unsetCreated();
            } else {
                setCreated((Boolean) value);
            }
            break;

        case DELETED:
            if (value == null) {
                unsetDeleted();
            } else {
                setDeleted((Boolean) value);
            }
            break;

        case ERROR_CODE:
            if (value == null) {
                unsetError_code();
            } else {
                setError_code((Integer) value);
            }
            break;

        case ERROR_MSG:
            if (value == null) {
                unsetError_msg();
            } else {
                setError_msg((String) value);
            }
            break;

        case FINISHED:
            if (value == null) {
                unsetFinished();
            } else {
                setFinished((Boolean) value);
            }
            break;

        case HA:
            if (value == null) {
                unsetHa();
            } else {
                setHa((Boolean) value);
            }
            break;

        case HOST_NAME:
            if (value == null) {
                unsetHostName();
            } else {
                setHostName((String) value);
            }
            break;

        case IP_ADDRESS:
            if (value == null) {
                unsetIpAddress();
            } else {
                setIpAddress((String) value);
            }
            break;

        case NAME:
            if (value == null) {
                unsetName();
            } else {
                setName((String) value);
            }
            break;

        case PHYSICAL_HOST:
            if (value == null) {
                unsetPhysicalHost();
            } else {
                setPhysicalHost((String) value);
            }
            break;

        case PROGRESS:
            if (value == null) {
                unsetProgress();
            } else {
                setProgress((Integer) value);
            }
            break;

        case RACK:
            if (value == null) {
                unsetRack();
            } else {
                setRack((String) value);
            }
            break;

        case STATUS:
            if (value == null) {
                unsetStatus();
            } else {
                setStatus((String) value);
            }
            break;

        case SUCCEED:
            if (value == null) {
                unsetSucceed();
            } else {
                setSucceed((Boolean) value);
            }
            break;

        }
    }

    public Object getFieldValue(_Fields field) {
        switch (field) {
        case ACTION:
            return getAction();

        case BOOTSTRAPPED:
            return Boolean.valueOf(isBootstrapped());

        case CREATED:
            return Boolean.valueOf(isCreated());

        case DELETED:
            return Boolean.valueOf(isDeleted());

        case ERROR_CODE:
            return Integer.valueOf(getError_code());

        case ERROR_MSG:
            return getError_msg();

        case FINISHED:
            return Boolean.valueOf(isFinished());

        case HA:
            return Boolean.valueOf(isHa());

        case HOST_NAME:
            return getHostName();

        case IP_ADDRESS:
            return getIpAddress();

        case NAME:
            return getName();

        case PHYSICAL_HOST:
            return getPhysicalHost();

        case PROGRESS:
            return Integer.valueOf(getProgress());

        case RACK:
            return getRack();

        case STATUS:
            return getStatus();

        case SUCCEED:
            return Boolean.valueOf(isSucceed());

        }
        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 ACTION:
            return isSetAction();
        case BOOTSTRAPPED:
            return isSetBootstrapped();
        case CREATED:
            return isSetCreated();
        case DELETED:
            return isSetDeleted();
        case ERROR_CODE:
            return isSetError_code();
        case ERROR_MSG:
            return isSetError_msg();
        case FINISHED:
            return isSetFinished();
        case HA:
            return isSetHa();
        case HOST_NAME:
            return isSetHostName();
        case IP_ADDRESS:
            return isSetIpAddress();
        case NAME:
            return isSetName();
        case PHYSICAL_HOST:
            return isSetPhysicalHost();
        case PROGRESS:
            return isSetProgress();
        case RACK:
            return isSetRack();
        case STATUS:
            return isSetStatus();
        case SUCCEED:
            return isSetSucceed();
        }
        throw new IllegalStateException();
    }

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

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

        boolean this_present_action = true && this.isSetAction();
        boolean that_present_action = true && that.isSetAction();
        if (this_present_action || that_present_action) {
            if (!(this_present_action && that_present_action))
                return false;
            if (!this.action.equals(that.action))
                return false;
        }

        boolean this_present_bootstrapped = true && this.isSetBootstrapped();
        boolean that_present_bootstrapped = true && that.isSetBootstrapped();
        if (this_present_bootstrapped || that_present_bootstrapped) {
            if (!(this_present_bootstrapped && that_present_bootstrapped))
                return false;
            if (this.bootstrapped != that.bootstrapped)
                return false;
        }

        boolean this_present_created = true && this.isSetCreated();
        boolean that_present_created = true && that.isSetCreated();
        if (this_present_created || that_present_created) {
            if (!(this_present_created && that_present_created))
                return false;
            if (this.created != that.created)
                return false;
        }

        boolean this_present_deleted = true && this.isSetDeleted();
        boolean that_present_deleted = true && that.isSetDeleted();
        if (this_present_deleted || that_present_deleted) {
            if (!(this_present_deleted && that_present_deleted))
                return false;
            if (this.deleted != that.deleted)
                return false;
        }

        boolean this_present_error_code = true && this.isSetError_code();
        boolean that_present_error_code = true && that.isSetError_code();
        if (this_present_error_code || that_present_error_code) {
            if (!(this_present_error_code && that_present_error_code))
                return false;
            if (this.error_code != that.error_code)
                return false;
        }

        boolean this_present_error_msg = true && this.isSetError_msg();
        boolean that_present_error_msg = true && that.isSetError_msg();
        if (this_present_error_msg || that_present_error_msg) {
            if (!(this_present_error_msg && that_present_error_msg))
                return false;
            if (!this.error_msg.equals(that.error_msg))
                return false;
        }

        boolean this_present_finished = true && this.isSetFinished();
        boolean that_present_finished = true && that.isSetFinished();
        if (this_present_finished || that_present_finished) {
            if (!(this_present_finished && that_present_finished))
                return false;
            if (this.finished != that.finished)
                return false;
        }

        boolean this_present_ha = true && this.isSetHa();
        boolean that_present_ha = true && that.isSetHa();
        if (this_present_ha || that_present_ha) {
            if (!(this_present_ha && that_present_ha))
                return false;
            if (this.ha != that.ha)
                return false;
        }

        boolean this_present_hostName = true && this.isSetHostName();
        boolean that_present_hostName = true && that.isSetHostName();
        if (this_present_hostName || that_present_hostName) {
            if (!(this_present_hostName && that_present_hostName))
                return false;
            if (!this.hostName.equals(that.hostName))
                return false;
        }

        boolean this_present_ipAddress = true && this.isSetIpAddress();
        boolean that_present_ipAddress = true && that.isSetIpAddress();
        if (this_present_ipAddress || that_present_ipAddress) {
            if (!(this_present_ipAddress && that_present_ipAddress))
                return false;
            if (!this.ipAddress.equals(that.ipAddress))
                return false;
        }

        boolean this_present_name = true && this.isSetName();
        boolean that_present_name = true && that.isSetName();
        if (this_present_name || that_present_name) {
            if (!(this_present_name && that_present_name))
                return false;
            if (!this.name.equals(that.name))
                return false;
        }

        boolean this_present_physicalHost = true && this.isSetPhysicalHost();
        boolean that_present_physicalHost = true && that.isSetPhysicalHost();
        if (this_present_physicalHost || that_present_physicalHost) {
            if (!(this_present_physicalHost && that_present_physicalHost))
                return false;
            if (!this.physicalHost.equals(that.physicalHost))
                return false;
        }

        boolean this_present_progress = true && this.isSetProgress();
        boolean that_present_progress = true && that.isSetProgress();
        if (this_present_progress || that_present_progress) {
            if (!(this_present_progress && that_present_progress))
                return false;
            if (this.progress != that.progress)
                return false;
        }

        boolean this_present_rack = true && this.isSetRack();
        boolean that_present_rack = true && that.isSetRack();
        if (this_present_rack || that_present_rack) {
            if (!(this_present_rack && that_present_rack))
                return false;
            if (!this.rack.equals(that.rack))
                return false;
        }

        boolean this_present_status = true && this.isSetStatus();
        boolean that_present_status = true && that.isSetStatus();
        if (this_present_status || that_present_status) {
            if (!(this_present_status && that_present_status))
                return false;
            if (!this.status.equals(that.status))
                return false;
        }

        boolean this_present_succeed = true && this.isSetSucceed();
        boolean that_present_succeed = true && that.isSetSucceed();
        if (this_present_succeed || that_present_succeed) {
            if (!(this_present_succeed && that_present_succeed))
                return false;
            if (this.succeed != that.succeed)
                return false;
        }

        return true;
    }

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

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

        int lastComparison = 0;
        ServerData typedOther = (ServerData) other;

        lastComparison = Boolean.valueOf(isSetAction()).compareTo(typedOther.isSetAction());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetAction()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.action, typedOther.action);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetBootstrapped()).compareTo(typedOther.isSetBootstrapped());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetBootstrapped()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bootstrapped, typedOther.bootstrapped);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetCreated()).compareTo(typedOther.isSetCreated());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetCreated()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.created, typedOther.created);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetDeleted()).compareTo(typedOther.isSetDeleted());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetDeleted()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleted, typedOther.deleted);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetError_code()).compareTo(typedOther.isSetError_code());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetError_code()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error_code, typedOther.error_code);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetError_msg()).compareTo(typedOther.isSetError_msg());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetError_msg()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error_msg, typedOther.error_msg);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetFinished()).compareTo(typedOther.isSetFinished());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetFinished()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.finished, typedOther.finished);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetHa()).compareTo(typedOther.isSetHa());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetHa()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ha, typedOther.ha);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetHostName()).compareTo(typedOther.isSetHostName());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetHostName()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostName, typedOther.hostName);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(typedOther.isSetIpAddress());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetIpAddress()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, typedOther.ipAddress);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetName()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetPhysicalHost()).compareTo(typedOther.isSetPhysicalHost());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetPhysicalHost()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.physicalHost, typedOther.physicalHost);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetProgress()).compareTo(typedOther.isSetProgress());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetProgress()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.progress, typedOther.progress);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetRack()).compareTo(typedOther.isSetRack());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetRack()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rack, typedOther.rack);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetStatus()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
            if (lastComparison != 0) {
                return lastComparison;
            }
        }
        lastComparison = Boolean.valueOf(isSetSucceed()).compareTo(typedOther.isSetSucceed());
        if (lastComparison != 0) {
            return lastComparison;
        }
        if (isSetSucceed()) {
            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.succeed, typedOther.succeed);
            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("ServerData(");
        boolean first = true;

        if (isSetAction()) {
            sb.append("action:");
            if (this.action == null) {
                sb.append("null");
            } else {
                sb.append(this.action);
            }
            first = false;
        }
        if (isSetBootstrapped()) {
            if (!first)
                sb.append(", ");
            sb.append("bootstrapped:");
            sb.append(this.bootstrapped);
            first = false;
        }
        if (isSetCreated()) {
            if (!first)
                sb.append(", ");
            sb.append("created:");
            sb.append(this.created);
            first = false;
        }
        if (isSetDeleted()) {
            if (!first)
                sb.append(", ");
            sb.append("deleted:");
            sb.append(this.deleted);
            first = false;
        }
        if (isSetError_code()) {
            if (!first)
                sb.append(", ");
            sb.append("error_code:");
            sb.append(this.error_code);
            first = false;
        }
        if (isSetError_msg()) {
            if (!first)
                sb.append(", ");
            sb.append("error_msg:");
            if (this.error_msg == null) {
                sb.append("null");
            } else {
                sb.append(this.error_msg);
            }
            first = false;
        }
        if (isSetFinished()) {
            if (!first)
                sb.append(", ");
            sb.append("finished:");
            sb.append(this.finished);
            first = false;
        }
        if (isSetHa()) {
            if (!first)
                sb.append(", ");
            sb.append("ha:");
            sb.append(this.ha);
            first = false;
        }
        if (isSetHostName()) {
            if (!first)
                sb.append(", ");
            sb.append("hostName:");
            if (this.hostName == null) {
                sb.append("null");
            } else {
                sb.append(this.hostName);
            }
            first = false;
        }
        if (isSetIpAddress()) {
            if (!first)
                sb.append(", ");
            sb.append("ipAddress:");
            if (this.ipAddress == null) {
                sb.append("null");
            } else {
                sb.append(this.ipAddress);
            }
            first = false;
        }
        if (isSetName()) {
            if (!first)
                sb.append(", ");
            sb.append("name:");
            if (this.name == null) {
                sb.append("null");
            } else {
                sb.append(this.name);
            }
            first = false;
        }
        if (isSetPhysicalHost()) {
            if (!first)
                sb.append(", ");
            sb.append("physicalHost:");
            if (this.physicalHost == null) {
                sb.append("null");
            } else {
                sb.append(this.physicalHost);
            }
            first = false;
        }
        if (isSetProgress()) {
            if (!first)
                sb.append(", ");
            sb.append("progress:");
            sb.append(this.progress);
            first = false;
        }
        if (isSetRack()) {
            if (!first)
                sb.append(", ");
            sb.append("rack:");
            if (this.rack == null) {
                sb.append("null");
            } else {
                sb.append(this.rack);
            }
            first = false;
        }
        if (isSetStatus()) {
            if (!first)
                sb.append(", ");
            sb.append("status:");
            if (this.status == null) {
                sb.append("null");
            } else {
                sb.append(this.status);
            }
            first = false;
        }
        if (isSetSucceed()) {
            if (!first)
                sb.append(", ");
            sb.append("succeed:");
            sb.append(this.succeed);
            first = false;
        }
        sb.append(")");
        return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
        // check for required fields
        // check for sub-struct validity
    }

    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 ServerDataStandardSchemeFactory implements SchemeFactory {
        public ServerDataStandardScheme getScheme() {
            return new ServerDataStandardScheme();
        }
    }

    private static class ServerDataStandardScheme extends StandardScheme<ServerData> {

        public void read(org.apache.thrift.protocol.TProtocol iprot, ServerData 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: // ACTION
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.action = iprot.readString();
                        struct.setActionIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 2: // BOOTSTRAPPED
                    if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                        struct.bootstrapped = iprot.readBool();
                        struct.setBootstrappedIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 3: // CREATED
                    if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                        struct.created = iprot.readBool();
                        struct.setCreatedIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 4: // DELETED
                    if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                        struct.deleted = iprot.readBool();
                        struct.setDeletedIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 5: // ERROR_CODE
                    if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                        struct.error_code = iprot.readI32();
                        struct.setError_codeIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 6: // ERROR_MSG
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.error_msg = iprot.readString();
                        struct.setError_msgIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 7: // FINISHED
                    if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                        struct.finished = iprot.readBool();
                        struct.setFinishedIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 8: // HA
                    if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                        struct.ha = iprot.readBool();
                        struct.setHaIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 9: // HOST_NAME
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.hostName = iprot.readString();
                        struct.setHostNameIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 10: // IP_ADDRESS
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.ipAddress = iprot.readString();
                        struct.setIpAddressIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 11: // NAME
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.name = iprot.readString();
                        struct.setNameIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 12: // PHYSICAL_HOST
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.physicalHost = iprot.readString();
                        struct.setPhysicalHostIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 13: // PROGRESS
                    if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                        struct.progress = iprot.readI32();
                        struct.setProgressIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 14: // RACK
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.rack = iprot.readString();
                        struct.setRackIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 15: // STATUS
                    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                        struct.status = iprot.readString();
                        struct.setStatusIsSet(true);
                    } else {
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                    }
                    break;
                case 16: // SUCCEED
                    if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                        struct.succeed = iprot.readBool();
                        struct.setSucceedIsSet(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
            struct.validate();
        }

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

            oprot.writeStructBegin(STRUCT_DESC);
            if (struct.action != null) {
                if (struct.isSetAction()) {
                    oprot.writeFieldBegin(ACTION_FIELD_DESC);
                    oprot.writeString(struct.action);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.isSetBootstrapped()) {
                oprot.writeFieldBegin(BOOTSTRAPPED_FIELD_DESC);
                oprot.writeBool(struct.bootstrapped);
                oprot.writeFieldEnd();
            }
            if (struct.isSetCreated()) {
                oprot.writeFieldBegin(CREATED_FIELD_DESC);
                oprot.writeBool(struct.created);
                oprot.writeFieldEnd();
            }
            if (struct.isSetDeleted()) {
                oprot.writeFieldBegin(DELETED_FIELD_DESC);
                oprot.writeBool(struct.deleted);
                oprot.writeFieldEnd();
            }
            if (struct.isSetError_code()) {
                oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
                oprot.writeI32(struct.error_code);
                oprot.writeFieldEnd();
            }
            if (struct.error_msg != null) {
                if (struct.isSetError_msg()) {
                    oprot.writeFieldBegin(ERROR_MSG_FIELD_DESC);
                    oprot.writeString(struct.error_msg);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.isSetFinished()) {
                oprot.writeFieldBegin(FINISHED_FIELD_DESC);
                oprot.writeBool(struct.finished);
                oprot.writeFieldEnd();
            }
            if (struct.isSetHa()) {
                oprot.writeFieldBegin(HA_FIELD_DESC);
                oprot.writeBool(struct.ha);
                oprot.writeFieldEnd();
            }
            if (struct.hostName != null) {
                if (struct.isSetHostName()) {
                    oprot.writeFieldBegin(HOST_NAME_FIELD_DESC);
                    oprot.writeString(struct.hostName);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.ipAddress != null) {
                if (struct.isSetIpAddress()) {
                    oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC);
                    oprot.writeString(struct.ipAddress);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.name != null) {
                if (struct.isSetName()) {
                    oprot.writeFieldBegin(NAME_FIELD_DESC);
                    oprot.writeString(struct.name);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.physicalHost != null) {
                if (struct.isSetPhysicalHost()) {
                    oprot.writeFieldBegin(PHYSICAL_HOST_FIELD_DESC);
                    oprot.writeString(struct.physicalHost);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.isSetProgress()) {
                oprot.writeFieldBegin(PROGRESS_FIELD_DESC);
                oprot.writeI32(struct.progress);
                oprot.writeFieldEnd();
            }
            if (struct.rack != null) {
                if (struct.isSetRack()) {
                    oprot.writeFieldBegin(RACK_FIELD_DESC);
                    oprot.writeString(struct.rack);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.status != null) {
                if (struct.isSetStatus()) {
                    oprot.writeFieldBegin(STATUS_FIELD_DESC);
                    oprot.writeString(struct.status);
                    oprot.writeFieldEnd();
                }
            }
            if (struct.isSetSucceed()) {
                oprot.writeFieldBegin(SUCCEED_FIELD_DESC);
                oprot.writeBool(struct.succeed);
                oprot.writeFieldEnd();
            }
            oprot.writeFieldStop();
            oprot.writeStructEnd();
        }

    }

    private static class ServerDataTupleSchemeFactory implements SchemeFactory {
        public ServerDataTupleScheme getScheme() {
            return new ServerDataTupleScheme();
        }
    }

    private static class ServerDataTupleScheme extends TupleScheme<ServerData> {

        @Override
        public void write(org.apache.thrift.protocol.TProtocol prot, ServerData struct)
                throws org.apache.thrift.TException {
            TTupleProtocol oprot = (TTupleProtocol) prot;
            BitSet optionals = new BitSet();
            if (struct.isSetAction()) {
                optionals.set(0);
            }
            if (struct.isSetBootstrapped()) {
                optionals.set(1);
            }
            if (struct.isSetCreated()) {
                optionals.set(2);
            }
            if (struct.isSetDeleted()) {
                optionals.set(3);
            }
            if (struct.isSetError_code()) {
                optionals.set(4);
            }
            if (struct.isSetError_msg()) {
                optionals.set(5);
            }
            if (struct.isSetFinished()) {
                optionals.set(6);
            }
            if (struct.isSetHa()) {
                optionals.set(7);
            }
            if (struct.isSetHostName()) {
                optionals.set(8);
            }
            if (struct.isSetIpAddress()) {
                optionals.set(9);
            }
            if (struct.isSetName()) {
                optionals.set(10);
            }
            if (struct.isSetPhysicalHost()) {
                optionals.set(11);
            }
            if (struct.isSetProgress()) {
                optionals.set(12);
            }
            if (struct.isSetRack()) {
                optionals.set(13);
            }
            if (struct.isSetStatus()) {
                optionals.set(14);
            }
            if (struct.isSetSucceed()) {
                optionals.set(15);
            }
            oprot.writeBitSet(optionals, 16);
            if (struct.isSetAction()) {
                oprot.writeString(struct.action);
            }
            if (struct.isSetBootstrapped()) {
                oprot.writeBool(struct.bootstrapped);
            }
            if (struct.isSetCreated()) {
                oprot.writeBool(struct.created);
            }
            if (struct.isSetDeleted()) {
                oprot.writeBool(struct.deleted);
            }
            if (struct.isSetError_code()) {
                oprot.writeI32(struct.error_code);
            }
            if (struct.isSetError_msg()) {
                oprot.writeString(struct.error_msg);
            }
            if (struct.isSetFinished()) {
                oprot.writeBool(struct.finished);
            }
            if (struct.isSetHa()) {
                oprot.writeBool(struct.ha);
            }
            if (struct.isSetHostName()) {
                oprot.writeString(struct.hostName);
            }
            if (struct.isSetIpAddress()) {
                oprot.writeString(struct.ipAddress);
            }
            if (struct.isSetName()) {
                oprot.writeString(struct.name);
            }
            if (struct.isSetPhysicalHost()) {
                oprot.writeString(struct.physicalHost);
            }
            if (struct.isSetProgress()) {
                oprot.writeI32(struct.progress);
            }
            if (struct.isSetRack()) {
                oprot.writeString(struct.rack);
            }
            if (struct.isSetStatus()) {
                oprot.writeString(struct.status);
            }
            if (struct.isSetSucceed()) {
                oprot.writeBool(struct.succeed);
            }
        }

        @Override
        public void read(org.apache.thrift.protocol.TProtocol prot, ServerData struct)
                throws org.apache.thrift.TException {
            TTupleProtocol iprot = (TTupleProtocol) prot;
            BitSet incoming = iprot.readBitSet(16);
            if (incoming.get(0)) {
                struct.action = iprot.readString();
                struct.setActionIsSet(true);
            }
            if (incoming.get(1)) {
                struct.bootstrapped = iprot.readBool();
                struct.setBootstrappedIsSet(true);
            }
            if (incoming.get(2)) {
                struct.created = iprot.readBool();
                struct.setCreatedIsSet(true);
            }
            if (incoming.get(3)) {
                struct.deleted = iprot.readBool();
                struct.setDeletedIsSet(true);
            }
            if (incoming.get(4)) {
                struct.error_code = iprot.readI32();
                struct.setError_codeIsSet(true);
            }
            if (incoming.get(5)) {
                struct.error_msg = iprot.readString();
                struct.setError_msgIsSet(true);
            }
            if (incoming.get(6)) {
                struct.finished = iprot.readBool();
                struct.setFinishedIsSet(true);
            }
            if (incoming.get(7)) {
                struct.ha = iprot.readBool();
                struct.setHaIsSet(true);
            }
            if (incoming.get(8)) {
                struct.hostName = iprot.readString();
                struct.setHostNameIsSet(true);
            }
            if (incoming.get(9)) {
                struct.ipAddress = iprot.readString();
                struct.setIpAddressIsSet(true);
            }
            if (incoming.get(10)) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
            }
            if (incoming.get(11)) {
                struct.physicalHost = iprot.readString();
                struct.setPhysicalHostIsSet(true);
            }
            if (incoming.get(12)) {
                struct.progress = iprot.readI32();
                struct.setProgressIsSet(true);
            }
            if (incoming.get(13)) {
                struct.rack = iprot.readString();
                struct.setRackIsSet(true);
            }
            if (incoming.get(14)) {
                struct.status = iprot.readString();
                struct.setStatusIsSet(true);
            }
            if (incoming.get(15)) {
                struct.succeed = iprot.readBool();
                struct.setSucceedIsSet(true);
            }
        }
    }

}