@Override
 public void write(org.apache.thrift.protocol.TProtocol prot, ODSRateOfChangeKeyInfo struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetKey()) {
     optionals.set(0);
   }
   if (struct.isSetUnixTime()) {
     optionals.set(1);
   }
   if (struct.isSetAllowable_time_diff()) {
     optionals.set(2);
   }
   if (struct.isSetValue()) {
     optionals.set(3);
   }
   if (struct.isSetMin_rate()) {
     optionals.set(4);
   }
   if (struct.isSetMax_rate()) {
     optionals.set(5);
   }
   oprot.writeBitSet(optionals, 6);
   if (struct.isSetKey()) {
     oprot.writeString(struct.key);
   }
   if (struct.isSetUnixTime()) {
     oprot.writeI64(struct.unixTime);
   }
   if (struct.isSetAllowable_time_diff()) {
     oprot.writeI64(struct.allowable_time_diff);
   }
   if (struct.isSetValue()) {
     oprot.writeI64(struct.value);
   }
   if (struct.isSetMin_rate()) {
     oprot.writeI64(struct.min_rate);
   }
   if (struct.isSetMax_rate()) {
     oprot.writeI64(struct.max_rate);
   }
 }
 /** Performs a deep copy on <i>other</i>. */
 public ODSRateOfChangeKeyInfo(ODSRateOfChangeKeyInfo other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetKey()) {
     this.key = other.key;
   }
   this.unixTime = other.unixTime;
   this.allowable_time_diff = other.allowable_time_diff;
   this.value = other.value;
   this.min_rate = other.min_rate;
   this.max_rate = other.max_rate;
 }
  public boolean equals(ODSRateOfChangeKeyInfo that) {
    if (that == null) return false;

    boolean this_present_key = true && this.isSetKey();
    boolean that_present_key = true && that.isSetKey();
    if (this_present_key || that_present_key) {
      if (!(this_present_key && that_present_key)) return false;
      if (!this.key.equals(that.key)) return false;
    }

    boolean this_present_unixTime = true;
    boolean that_present_unixTime = true;
    if (this_present_unixTime || that_present_unixTime) {
      if (!(this_present_unixTime && that_present_unixTime)) return false;
      if (this.unixTime != that.unixTime) return false;
    }

    boolean this_present_allowable_time_diff = true;
    boolean that_present_allowable_time_diff = true;
    if (this_present_allowable_time_diff || that_present_allowable_time_diff) {
      if (!(this_present_allowable_time_diff && that_present_allowable_time_diff)) return false;
      if (this.allowable_time_diff != that.allowable_time_diff) return false;
    }

    boolean this_present_value = true;
    boolean that_present_value = true;
    if (this_present_value || that_present_value) {
      if (!(this_present_value && that_present_value)) return false;
      if (this.value != that.value) return false;
    }

    boolean this_present_min_rate = true;
    boolean that_present_min_rate = true;
    if (this_present_min_rate || that_present_min_rate) {
      if (!(this_present_min_rate && that_present_min_rate)) return false;
      if (this.min_rate != that.min_rate) return false;
    }

    boolean this_present_max_rate = true;
    boolean that_present_max_rate = true;
    if (this_present_max_rate || that_present_max_rate) {
      if (!(this_present_max_rate && that_present_max_rate)) return false;
      if (this.max_rate != that.max_rate) return false;
    }

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

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKey()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUnixTime()).compareTo(other.isSetUnixTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnixTime()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unixTime, other.unixTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetAllowable_time_diff()).compareTo(other.isSetAllowable_time_diff());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAllowable_time_diff()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.allowable_time_diff, other.allowable_time_diff);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetValue()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMin_rate()).compareTo(other.isSetMin_rate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMin_rate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.min_rate, other.min_rate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMax_rate()).compareTo(other.isSetMax_rate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMax_rate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_rate, other.max_rate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }