@Override
 public void read(org.apache.thrift.protocol.TProtocol prot, ODSRateOfChangeKeyInfo struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(6);
   if (incoming.get(0)) {
     struct.key = iprot.readString();
     struct.setKeyIsSet(true);
   }
   if (incoming.get(1)) {
     struct.unixTime = iprot.readI64();
     struct.setUnixTimeIsSet(true);
   }
   if (incoming.get(2)) {
     struct.allowable_time_diff = iprot.readI64();
     struct.setAllowable_time_diffIsSet(true);
   }
   if (incoming.get(3)) {
     struct.value = iprot.readI64();
     struct.setValueIsSet(true);
   }
   if (incoming.get(4)) {
     struct.min_rate = iprot.readI64();
     struct.setMin_rateIsSet(true);
   }
   if (incoming.get(5)) {
     struct.max_rate = iprot.readI64();
     struct.setMax_rateIsSet(true);
   }
 }
 @Override
 public void clear() {
   this.key = null;
   setUnixTimeIsSet(false);
   this.unixTime = 0;
   setAllowable_time_diffIsSet(false);
   this.allowable_time_diff = 0;
   setValueIsSet(false);
   this.value = 0;
   setMin_rateIsSet(false);
   this.min_rate = 0;
   setMax_rateIsSet(false);
   this.max_rate = 0;
 }
 public ODSRateOfChangeKeyInfo(
     String key,
     long unixTime,
     long allowable_time_diff,
     long value,
     long min_rate,
     long max_rate) {
   this();
   this.key = key;
   this.unixTime = unixTime;
   setUnixTimeIsSet(true);
   this.allowable_time_diff = allowable_time_diff;
   setAllowable_time_diffIsSet(true);
   this.value = value;
   setValueIsSet(true);
   this.min_rate = min_rate;
   setMin_rateIsSet(true);
   this.max_rate = max_rate;
   setMax_rateIsSet(true);
 }
    public void read(org.apache.thrift.protocol.TProtocol iprot, ODSRateOfChangeKeyInfo 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: // KEY
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.key = iprot.readString();
              struct.setKeyIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // UNIX_TIME
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.unixTime = iprot.readI64();
              struct.setUnixTimeIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // ALLOWABLE_TIME_DIFF
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.allowable_time_diff = iprot.readI64();
              struct.setAllowable_time_diffIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // VALUE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.value = iprot.readI64();
              struct.setValueIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // MIN_RATE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.min_rate = iprot.readI64();
              struct.setMin_rateIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // MAX_RATE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.max_rate = iprot.readI64();
              struct.setMax_rateIsSet(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 ODSRateOfChangeKeyInfo setAllowable_time_diff(long allowable_time_diff) {
   this.allowable_time_diff = allowable_time_diff;
   setAllowable_time_diffIsSet(true);
   return this;
 }