/** Performs a deep copy on <i>other</i>. */
 public NimbusSummary(NimbusSummary other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.is_set_host()) {
     this.host = other.host;
   }
   this.port = other.port;
   this.uptime_secs = other.uptime_secs;
   this.isLeader = other.isLeader;
   if (other.is_set_version()) {
     this.version = other.version;
   }
 }
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, NimbusSummary struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   struct.host = iprot.readString();
   struct.set_host_isSet(true);
   struct.port = iprot.readI32();
   struct.set_port_isSet(true);
   struct.uptime_secs = iprot.readI32();
   struct.set_uptime_secs_isSet(true);
   struct.isLeader = iprot.readBool();
   struct.set_isLeader_isSet(true);
   struct.version = iprot.readString();
   struct.set_version_isSet(true);
 }
    public void write(org.apache.thrift.protocol.TProtocol oprot, NimbusSummary struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.host != null) {
        oprot.writeFieldBegin(HOST_FIELD_DESC);
        oprot.writeString(struct.host);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(PORT_FIELD_DESC);
      oprot.writeI32(struct.port);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC);
      oprot.writeI32(struct.uptime_secs);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_LEADER_FIELD_DESC);
      oprot.writeBool(struct.isLeader);
      oprot.writeFieldEnd();
      if (struct.version != null) {
        oprot.writeFieldBegin(VERSION_FIELD_DESC);
        oprot.writeString(struct.version);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
  @Override
  public int compareTo(NimbusSummary other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_host()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, other.host);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_port()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_uptime_secs()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime_secs, other.uptime_secs);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_isLeader()).compareTo(other.is_set_isLeader());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_isLeader()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isLeader, other.isLeader);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_version()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
  public boolean equals(NimbusSummary that) {
    if (that == null) return false;

    boolean this_present_host = true && this.is_set_host();
    boolean that_present_host = true && that.is_set_host();
    if (this_present_host || that_present_host) {
      if (!(this_present_host && that_present_host)) return false;
      if (!this.host.equals(that.host)) return false;
    }

    boolean this_present_port = true;
    boolean that_present_port = true;
    if (this_present_port || that_present_port) {
      if (!(this_present_port && that_present_port)) return false;
      if (this.port != that.port) return false;
    }

    boolean this_present_uptime_secs = true;
    boolean that_present_uptime_secs = true;
    if (this_present_uptime_secs || that_present_uptime_secs) {
      if (!(this_present_uptime_secs && that_present_uptime_secs)) return false;
      if (this.uptime_secs != that.uptime_secs) return false;
    }

    boolean this_present_isLeader = true;
    boolean that_present_isLeader = true;
    if (this_present_isLeader || that_present_isLeader) {
      if (!(this_present_isLeader && that_present_isLeader)) return false;
      if (this.isLeader != that.isLeader) return false;
    }

    boolean this_present_version = true && this.is_set_version();
    boolean that_present_version = true && that.is_set_version();
    if (this_present_version || that_present_version) {
      if (!(this_present_version && that_present_version)) return false;
      if (!this.version.equals(that.version)) return false;
    }

    return true;
  }
 public void read(org.apache.thrift.protocol.TProtocol iprot, NimbusSummary 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: // HOST
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.host = iprot.readString();
           struct.set_host_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // PORT
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.port = iprot.readI32();
           struct.set_port_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3: // UPTIME_SECS
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.uptime_secs = iprot.readI32();
           struct.set_uptime_secs_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 4: // IS_LEADER
         if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
           struct.isLeader = iprot.readBool();
           struct.set_isLeader_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 5: // VERSION
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.version = iprot.readString();
           struct.set_version_isSet(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();
   struct.validate();
 }