All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rbkmoney.damsel.fraudbusters.HistoricalData Maven / Gradle / Ivy

Go to download

Generates jar artifact containing compiled thrift classes based on generated thrift IDL files

There is a newer version: 1.99-2a8f6ca
Show newest version
/**
 * Autogenerated by Thrift Compiler (1.0.0-dev)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.rbkmoney.damsel.fraudbusters;

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.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 javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class HistoricalData extends org.apache.thrift.TUnion {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HistoricalData");
  private static final org.apache.thrift.protocol.TField PAYMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("payments", org.apache.thrift.protocol.TType.LIST, (short)1);
  private static final org.apache.thrift.protocol.TField REFUNDS_FIELD_DESC = new org.apache.thrift.protocol.TField("refunds", org.apache.thrift.protocol.TType.LIST, (short)2);
  private static final org.apache.thrift.protocol.TField CHARGEBACKS_FIELD_DESC = new org.apache.thrift.protocol.TField("chargebacks", org.apache.thrift.protocol.TType.LIST, (short)3);
  private static final org.apache.thrift.protocol.TField FRAUD_RESULTS_FIELD_DESC = new org.apache.thrift.protocol.TField("fraud_results", org.apache.thrift.protocol.TType.LIST, (short)4);
  private static final org.apache.thrift.protocol.TField FRAUD_PAYMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("fraud_payments", org.apache.thrift.protocol.TType.LIST, (short)5);

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    PAYMENTS((short)1, "payments"),
    REFUNDS((short)2, "refunds"),
    CHARGEBACKS((short)3, "chargebacks"),
    FRAUD_RESULTS((short)4, "fraud_results"),
    FRAUD_PAYMENTS((short)5, "fraud_payments");

    private static final Map byName = new HashMap();

    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: // PAYMENTS
          return PAYMENTS;
        case 2: // REFUNDS
          return REFUNDS;
        case 3: // CHARGEBACKS
          return CHARGEBACKS;
        case 4: // FRAUD_RESULTS
          return FRAUD_RESULTS;
        case 5: // FRAUD_PAYMENTS
          return FRAUD_PAYMENTS;
        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;
    }
  }

  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.PAYMENTS, new org.apache.thrift.meta_data.FieldMetaData("payments", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
    tmpMap.put(_Fields.REFUNDS, new org.apache.thrift.meta_data.FieldMetaData("refunds", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Refund.class))));
    tmpMap.put(_Fields.CHARGEBACKS, new org.apache.thrift.meta_data.FieldMetaData("chargebacks", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Chargeback.class))));
    tmpMap.put(_Fields.FRAUD_RESULTS, new org.apache.thrift.meta_data.FieldMetaData("fraud_results", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HistoricalTransactionCheck.class))));
    tmpMap.put(_Fields.FRAUD_PAYMENTS, new org.apache.thrift.meta_data.FieldMetaData("fraud_payments", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FraudPaymentInfo.class))));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HistoricalData.class, metaDataMap);
  }

  public HistoricalData() {
    super();
  }

  public HistoricalData(_Fields setField, Object value) {
    super(setField, value);
  }

  public HistoricalData(HistoricalData other) {
    super(other);
  }
  public HistoricalData deepCopy() {
    return new HistoricalData(this);
  }

  public static HistoricalData payments(List value) {
    HistoricalData x = new HistoricalData();
    x.setPayments(value);
    return x;
  }

  public static HistoricalData refunds(List value) {
    HistoricalData x = new HistoricalData();
    x.setRefunds(value);
    return x;
  }

  public static HistoricalData chargebacks(List value) {
    HistoricalData x = new HistoricalData();
    x.setChargebacks(value);
    return x;
  }

  public static HistoricalData fraud_results(List value) {
    HistoricalData x = new HistoricalData();
    x.setFraudResults(value);
    return x;
  }

  public static HistoricalData fraud_payments(List value) {
    HistoricalData x = new HistoricalData();
    x.setFraudPayments(value);
    return x;
  }


  @Override
  protected void checkType(_Fields setField, Object value) throws ClassCastException {
    switch (setField) {
      case PAYMENTS:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'payments', but got " + value.getClass().getSimpleName());
      case REFUNDS:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'refunds', but got " + value.getClass().getSimpleName());
      case CHARGEBACKS:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'chargebacks', but got " + value.getClass().getSimpleName());
      case FRAUD_RESULTS:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'fraud_results', but got " + value.getClass().getSimpleName());
      case FRAUD_PAYMENTS:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'fraud_payments', but got " + value.getClass().getSimpleName());
      default:
        throw new IllegalArgumentException("Unknown field id " + setField);
    }
  }

  @Override
  protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
    _Fields setField = _Fields.findByThriftId(field.id);
    if (setField != null) {
      switch (setField) {
        case PAYMENTS:
          if (field.type == PAYMENTS_FIELD_DESC.type) {
            List payments;
            {
              org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
              payments = new ArrayList(_list48.size);
              Payment _elem49;
              for (int _i50 = 0; _i50 < _list48.size; ++_i50)
              {
                _elem49 = new Payment();
                _elem49.read(iprot);
                payments.add(_elem49);
              }
              iprot.readListEnd();
            }
            return payments;
          } else {
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case REFUNDS:
          if (field.type == REFUNDS_FIELD_DESC.type) {
            List refunds;
            {
              org.apache.thrift.protocol.TList _list51 = iprot.readListBegin();
              refunds = new ArrayList(_list51.size);
              Refund _elem52;
              for (int _i53 = 0; _i53 < _list51.size; ++_i53)
              {
                _elem52 = new Refund();
                _elem52.read(iprot);
                refunds.add(_elem52);
              }
              iprot.readListEnd();
            }
            return refunds;
          } else {
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case CHARGEBACKS:
          if (field.type == CHARGEBACKS_FIELD_DESC.type) {
            List chargebacks;
            {
              org.apache.thrift.protocol.TList _list54 = iprot.readListBegin();
              chargebacks = new ArrayList(_list54.size);
              Chargeback _elem55;
              for (int _i56 = 0; _i56 < _list54.size; ++_i56)
              {
                _elem55 = new Chargeback();
                _elem55.read(iprot);
                chargebacks.add(_elem55);
              }
              iprot.readListEnd();
            }
            return chargebacks;
          } else {
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case FRAUD_RESULTS:
          if (field.type == FRAUD_RESULTS_FIELD_DESC.type) {
            List fraud_results;
            {
              org.apache.thrift.protocol.TList _list57 = iprot.readListBegin();
              fraud_results = new ArrayList(_list57.size);
              HistoricalTransactionCheck _elem58;
              for (int _i59 = 0; _i59 < _list57.size; ++_i59)
              {
                _elem58 = new HistoricalTransactionCheck();
                _elem58.read(iprot);
                fraud_results.add(_elem58);
              }
              iprot.readListEnd();
            }
            return fraud_results;
          } else {
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case FRAUD_PAYMENTS:
          if (field.type == FRAUD_PAYMENTS_FIELD_DESC.type) {
            List fraud_payments;
            {
              org.apache.thrift.protocol.TList _list60 = iprot.readListBegin();
              fraud_payments = new ArrayList(_list60.size);
              FraudPaymentInfo _elem61;
              for (int _i62 = 0; _i62 < _list60.size; ++_i62)
              {
                _elem61 = new FraudPaymentInfo();
                _elem61.read(iprot);
                fraud_payments.add(_elem61);
              }
              iprot.readListEnd();
            }
            return fraud_payments;
          } else {
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        default:
          throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
      }
    } else {
      org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
      return null;
    }
  }

  @Override
  protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    switch (setField_) {
      case PAYMENTS:
        List payments = (List)value_;
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, payments.size()));
          for (Payment _iter63 : payments)
          {
            _iter63.write(oprot);
          }
          oprot.writeListEnd();
        }
        return;
      case REFUNDS:
        List refunds = (List)value_;
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, refunds.size()));
          for (Refund _iter64 : refunds)
          {
            _iter64.write(oprot);
          }
          oprot.writeListEnd();
        }
        return;
      case CHARGEBACKS:
        List chargebacks = (List)value_;
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, chargebacks.size()));
          for (Chargeback _iter65 : chargebacks)
          {
            _iter65.write(oprot);
          }
          oprot.writeListEnd();
        }
        return;
      case FRAUD_RESULTS:
        List fraud_results = (List)value_;
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, fraud_results.size()));
          for (HistoricalTransactionCheck _iter66 : fraud_results)
          {
            _iter66.write(oprot);
          }
          oprot.writeListEnd();
        }
        return;
      case FRAUD_PAYMENTS:
        List fraud_payments = (List)value_;
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, fraud_payments.size()));
          for (FraudPaymentInfo _iter67 : fraud_payments)
          {
            _iter67.write(oprot);
          }
          oprot.writeListEnd();
        }
        return;
      default:
        throw new IllegalStateException("Cannot write union with unknown field " + setField_);
    }
  }

  @Override
  protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
    _Fields setField = _Fields.findByThriftId(fieldID);
    if (setField != null) {
      switch (setField) {
        case PAYMENTS:
          List payments;
          {
            org.apache.thrift.protocol.TList _list68 = iprot.readListBegin();
            payments = new ArrayList(_list68.size);
            Payment _elem69;
            for (int _i70 = 0; _i70 < _list68.size; ++_i70)
            {
              _elem69 = new Payment();
              _elem69.read(iprot);
              payments.add(_elem69);
            }
            iprot.readListEnd();
          }
          return payments;
        case REFUNDS:
          List refunds;
          {
            org.apache.thrift.protocol.TList _list71 = iprot.readListBegin();
            refunds = new ArrayList(_list71.size);
            Refund _elem72;
            for (int _i73 = 0; _i73 < _list71.size; ++_i73)
            {
              _elem72 = new Refund();
              _elem72.read(iprot);
              refunds.add(_elem72);
            }
            iprot.readListEnd();
          }
          return refunds;
        case CHARGEBACKS:
          List chargebacks;
          {
            org.apache.thrift.protocol.TList _list74 = iprot.readListBegin();
            chargebacks = new ArrayList(_list74.size);
            Chargeback _elem75;
            for (int _i76 = 0; _i76 < _list74.size; ++_i76)
            {
              _elem75 = new Chargeback();
              _elem75.read(iprot);
              chargebacks.add(_elem75);
            }
            iprot.readListEnd();
          }
          return chargebacks;
        case FRAUD_RESULTS:
          List fraud_results;
          {
            org.apache.thrift.protocol.TList _list77 = iprot.readListBegin();
            fraud_results = new ArrayList(_list77.size);
            HistoricalTransactionCheck _elem78;
            for (int _i79 = 0; _i79 < _list77.size; ++_i79)
            {
              _elem78 = new HistoricalTransactionCheck();
              _elem78.read(iprot);
              fraud_results.add(_elem78);
            }
            iprot.readListEnd();
          }
          return fraud_results;
        case FRAUD_PAYMENTS:
          List fraud_payments;
          {
            org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
            fraud_payments = new ArrayList(_list80.size);
            FraudPaymentInfo _elem81;
            for (int _i82 = 0; _i82 < _list80.size; ++_i82)
            {
              _elem81 = new FraudPaymentInfo();
              _elem81.read(iprot);
              fraud_payments.add(_elem81);
            }
            iprot.readListEnd();
          }
          return fraud_payments;
        default:
          throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
      }
    } else {
      throw new TProtocolException("Couldn't find a field with field id " + fieldID);
    }
  }

  @Override
  protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    switch (setField_) {
      case PAYMENTS:
        List payments = (List)value_;
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, payments.size()));
          for (Payment _iter83 : payments)
          {
            _iter83.write(oprot);
          }
          oprot.writeListEnd();
        }
        return;
      case REFUNDS:
        List refunds = (List)value_;
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, refunds.size()));
          for (Refund _iter84 : refunds)
          {
            _iter84.write(oprot);
          }
          oprot.writeListEnd();
        }
        return;
      case CHARGEBACKS:
        List chargebacks = (List)value_;
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, chargebacks.size()));
          for (Chargeback _iter85 : chargebacks)
          {
            _iter85.write(oprot);
          }
          oprot.writeListEnd();
        }
        return;
      case FRAUD_RESULTS:
        List fraud_results = (List)value_;
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, fraud_results.size()));
          for (HistoricalTransactionCheck _iter86 : fraud_results)
          {
            _iter86.write(oprot);
          }
          oprot.writeListEnd();
        }
        return;
      case FRAUD_PAYMENTS:
        List fraud_payments = (List)value_;
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, fraud_payments.size()));
          for (FraudPaymentInfo _iter87 : fraud_payments)
          {
            _iter87.write(oprot);
          }
          oprot.writeListEnd();
        }
        return;
      default:
        throw new IllegalStateException("Cannot write union with unknown field " + setField_);
    }
  }

  @Override
  protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) {
    switch (setField) {
      case PAYMENTS:
        return PAYMENTS_FIELD_DESC;
      case REFUNDS:
        return REFUNDS_FIELD_DESC;
      case CHARGEBACKS:
        return CHARGEBACKS_FIELD_DESC;
      case FRAUD_RESULTS:
        return FRAUD_RESULTS_FIELD_DESC;
      case FRAUD_PAYMENTS:
        return FRAUD_PAYMENTS_FIELD_DESC;
      default:
        throw new IllegalArgumentException("Unknown field id " + setField);
    }
  }

  @Override
  protected org.apache.thrift.protocol.TStruct getStructDesc() {
    return STRUCT_DESC;
  }

  @Override
  protected _Fields enumForId(short id) {
    return _Fields.findByThriftIdOrThrow(id);
  }

  public _Fields[] getFields() {
    return _Fields.values();
  }

  public Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> getFieldMetaData() {
    return metaDataMap;
  }

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


  public List getPayments() {
    if (getSetField() == _Fields.PAYMENTS) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'payments' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setPayments(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.PAYMENTS;
    value_ = value;
  }

  public List getRefunds() {
    if (getSetField() == _Fields.REFUNDS) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'refunds' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setRefunds(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.REFUNDS;
    value_ = value;
  }

  public List getChargebacks() {
    if (getSetField() == _Fields.CHARGEBACKS) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'chargebacks' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setChargebacks(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.CHARGEBACKS;
    value_ = value;
  }

  public List getFraudResults() {
    if (getSetField() == _Fields.FRAUD_RESULTS) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'fraud_results' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setFraudResults(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.FRAUD_RESULTS;
    value_ = value;
  }

  public List getFraudPayments() {
    if (getSetField() == _Fields.FRAUD_PAYMENTS) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'fraud_payments' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setFraudPayments(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.FRAUD_PAYMENTS;
    value_ = value;
  }

  public boolean isSetPayments() {
    return setField_ == _Fields.PAYMENTS;
  }


  public boolean isSetRefunds() {
    return setField_ == _Fields.REFUNDS;
  }


  public boolean isSetChargebacks() {
    return setField_ == _Fields.CHARGEBACKS;
  }


  public boolean isSetFraudResults() {
    return setField_ == _Fields.FRAUD_RESULTS;
  }


  public boolean isSetFraudPayments() {
    return setField_ == _Fields.FRAUD_PAYMENTS;
  }


  public boolean equals(Object other) {
    if (other instanceof HistoricalData) {
      return equals((HistoricalData)other);
    } else {
      return false;
    }
  }

  public boolean equals(HistoricalData other) {
    return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
  }

  @Override
  public int compareTo(HistoricalData other) {
    int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField());
    if (lastComparison == 0) {
      return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue());
    }
    return lastComparison;
  }


  @Override
  public int hashCode() {
    List list = new ArrayList();
    list.add(this.getClass().getName());
    org.apache.thrift.TFieldIdEnum setField = getSetField();
    if (setField != null) {
      list.add(setField.getThriftFieldId());
      Object value = getFieldValue();
      if (value instanceof org.apache.thrift.TEnum) {
        list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue());
      } else {
        list.add(value);
      }
    }
    return list.hashCode();
  }
  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 {
      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);
    }
  }


}