Subversion Repositories SmartDukaan

Rev

Rev 18578 | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * Autogenerated by Thrift Compiler (0.7.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package in.shop2020.model.v1.order;

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

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

  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
  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)2);
  private static final org.apache.thrift.protocol.TField ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("active", org.apache.thrift.protocol.TType.BOOL, (short)3);
  private static final org.apache.thrift.protocol.TField TICKET_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("ticket_size", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
  private static final org.apache.thrift.protocol.TField CREDIT_DUE_DAYS_FIELD_DESC = new org.apache.thrift.protocol.TField("credit_due_days", org.apache.thrift.protocol.TType.I64, (short)5);
  private static final org.apache.thrift.protocol.TField CREATED_FIELD_DESC = new org.apache.thrift.protocol.TField("created", org.apache.thrift.protocol.TType.I64, (short)6);
  private static final org.apache.thrift.protocol.TField UPDATED_FIELD_DESC = new org.apache.thrift.protocol.TField("updated", org.apache.thrift.protocol.TType.I64, (short)7);

  private long id; // required
  private String name; // required
  private boolean active; // required
  private double ticket_size; // required
  private long credit_due_days; // required
  private long created; // required
  private long updated; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    ID((short)1, "id"),
    NAME((short)2, "name"),
    ACTIVE((short)3, "active"),
    TICKET_SIZE((short)4, "ticket_size"),
    CREDIT_DUE_DAYS((short)5, "credit_due_days"),
    CREATED((short)6, "created"),
    UPDATED((short)7, "updated");

    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: // ID
          return ID;
        case 2: // NAME
          return NAME;
        case 3: // ACTIVE
          return ACTIVE;
        case 4: // TICKET_SIZE
          return TICKET_SIZE;
        case 5: // CREDIT_DUE_DAYS
          return CREDIT_DUE_DAYS;
        case 6: // CREATED
          return CREATED;
        case 7: // UPDATED
          return UPDATED;
        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 __ID_ISSET_ID = 0;
  private static final int __ACTIVE_ISSET_ID = 1;
  private static final int __TICKET_SIZE_ISSET_ID = 2;
  private static final int __CREDIT_DUE_DAYS_ISSET_ID = 3;
  private static final int __CREATED_ISSET_ID = 4;
  private static final int __UPDATED_ISSET_ID = 5;
  private BitSet __isset_bit_vector = new BitSet(6);

  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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("active", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.TICKET_SIZE, new org.apache.thrift.meta_data.FieldMetaData("ticket_size", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.CREDIT_DUE_DAYS, new org.apache.thrift.meta_data.FieldMetaData("credit_due_days", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CREATED, new org.apache.thrift.meta_data.FieldMetaData("created", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.UPDATED, new org.apache.thrift.meta_data.FieldMetaData("updated", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Creditor.class, metaDataMap);
  }

  public Creditor() {
  }

  public Creditor(
    long id,
    String name,
    boolean active,
    double ticket_size,
    long credit_due_days,
    long created,
    long updated)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.name = name;
    this.active = active;
    setActiveIsSet(true);
    this.ticket_size = ticket_size;
    setTicket_sizeIsSet(true);
    this.credit_due_days = credit_due_days;
    setCredit_due_daysIsSet(true);
    this.created = created;
    setCreatedIsSet(true);
    this.updated = updated;
    setUpdatedIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public Creditor(Creditor other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.id = other.id;
    if (other.isSetName()) {
      this.name = other.name;
    }
    this.active = other.active;
    this.ticket_size = other.ticket_size;
    this.credit_due_days = other.credit_due_days;
    this.created = other.created;
    this.updated = other.updated;
  }

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

  @Override
  public void clear() {
    setIdIsSet(false);
    this.id = 0;
    this.name = null;
    setActiveIsSet(false);
    this.active = false;
    setTicket_sizeIsSet(false);
    this.ticket_size = 0.0;
    setCredit_due_daysIsSet(false);
    this.credit_due_days = 0;
    setCreatedIsSet(false);
    this.created = 0;
    setUpdatedIsSet(false);
    this.updated = 0;
  }

  public long getId() {
    return this.id;
  }

  public void setId(long id) {
    this.id = id;
    setIdIsSet(true);
  }

  public void unsetId() {
    __isset_bit_vector.clear(__ID_ISSET_ID);
  }

  /** Returns true if field id is set (has been assigned a value) and false otherwise */
  public boolean isSetId() {
    return __isset_bit_vector.get(__ID_ISSET_ID);
  }

  public void setIdIsSet(boolean value) {
    __isset_bit_vector.set(__ID_ISSET_ID, value);
  }

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

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

  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 boolean isActive() {
    return this.active;
  }

  public void setActive(boolean active) {
    this.active = active;
    setActiveIsSet(true);
  }

  public void unsetActive() {
    __isset_bit_vector.clear(__ACTIVE_ISSET_ID);
  }

  /** Returns true if field active is set (has been assigned a value) and false otherwise */
  public boolean isSetActive() {
    return __isset_bit_vector.get(__ACTIVE_ISSET_ID);
  }

  public void setActiveIsSet(boolean value) {
    __isset_bit_vector.set(__ACTIVE_ISSET_ID, value);
  }

  public double getTicket_size() {
    return this.ticket_size;
  }

  public void setTicket_size(double ticket_size) {
    this.ticket_size = ticket_size;
    setTicket_sizeIsSet(true);
  }

  public void unsetTicket_size() {
    __isset_bit_vector.clear(__TICKET_SIZE_ISSET_ID);
  }

  /** Returns true if field ticket_size is set (has been assigned a value) and false otherwise */
  public boolean isSetTicket_size() {
    return __isset_bit_vector.get(__TICKET_SIZE_ISSET_ID);
  }

  public void setTicket_sizeIsSet(boolean value) {
    __isset_bit_vector.set(__TICKET_SIZE_ISSET_ID, value);
  }

  public long getCredit_due_days() {
    return this.credit_due_days;
  }

  public void setCredit_due_days(long credit_due_days) {
    this.credit_due_days = credit_due_days;
    setCredit_due_daysIsSet(true);
  }

  public void unsetCredit_due_days() {
    __isset_bit_vector.clear(__CREDIT_DUE_DAYS_ISSET_ID);
  }

  /** Returns true if field credit_due_days is set (has been assigned a value) and false otherwise */
  public boolean isSetCredit_due_days() {
    return __isset_bit_vector.get(__CREDIT_DUE_DAYS_ISSET_ID);
  }

  public void setCredit_due_daysIsSet(boolean value) {
    __isset_bit_vector.set(__CREDIT_DUE_DAYS_ISSET_ID, value);
  }

  public long getCreated() {
    return this.created;
  }

  public void setCreated(long created) {
    this.created = created;
    setCreatedIsSet(true);
  }

  public void unsetCreated() {
    __isset_bit_vector.clear(__CREATED_ISSET_ID);
  }

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

  public void setCreatedIsSet(boolean value) {
    __isset_bit_vector.set(__CREATED_ISSET_ID, value);
  }

  public long getUpdated() {
    return this.updated;
  }

  public void setUpdated(long updated) {
    this.updated = updated;
    setUpdatedIsSet(true);
  }

  public void unsetUpdated() {
    __isset_bit_vector.clear(__UPDATED_ISSET_ID);
  }

  /** Returns true if field updated is set (has been assigned a value) and false otherwise */
  public boolean isSetUpdated() {
    return __isset_bit_vector.get(__UPDATED_ISSET_ID);
  }

  public void setUpdatedIsSet(boolean value) {
    __isset_bit_vector.set(__UPDATED_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case ID:
      if (value == null) {
        unsetId();
      } else {
        setId((Long)value);
      }
      break;

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

    case ACTIVE:
      if (value == null) {
        unsetActive();
      } else {
        setActive((Boolean)value);
      }
      break;

    case TICKET_SIZE:
      if (value == null) {
        unsetTicket_size();
      } else {
        setTicket_size((Double)value);
      }
      break;

    case CREDIT_DUE_DAYS:
      if (value == null) {
        unsetCredit_due_days();
      } else {
        setCredit_due_days((Long)value);
      }
      break;

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

    case UPDATED:
      if (value == null) {
        unsetUpdated();
      } else {
        setUpdated((Long)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case ID:
      return Long.valueOf(getId());

    case NAME:
      return getName();

    case ACTIVE:
      return Boolean.valueOf(isActive());

    case TICKET_SIZE:
      return Double.valueOf(getTicket_size());

    case CREDIT_DUE_DAYS:
      return Long.valueOf(getCredit_due_days());

    case CREATED:
      return Long.valueOf(getCreated());

    case UPDATED:
      return Long.valueOf(getUpdated());

    }
    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 ID:
      return isSetId();
    case NAME:
      return isSetName();
    case ACTIVE:
      return isSetActive();
    case TICKET_SIZE:
      return isSetTicket_size();
    case CREDIT_DUE_DAYS:
      return isSetCredit_due_days();
    case CREATED:
      return isSetCreated();
    case UPDATED:
      return isSetUpdated();
    }
    throw new IllegalStateException();
  }

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

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

    boolean this_present_id = true;
    boolean that_present_id = true;
    if (this_present_id || that_present_id) {
      if (!(this_present_id && that_present_id))
        return false;
      if (this.id != that.id)
        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_active = true;
    boolean that_present_active = true;
    if (this_present_active || that_present_active) {
      if (!(this_present_active && that_present_active))
        return false;
      if (this.active != that.active)
        return false;
    }

    boolean this_present_ticket_size = true;
    boolean that_present_ticket_size = true;
    if (this_present_ticket_size || that_present_ticket_size) {
      if (!(this_present_ticket_size && that_present_ticket_size))
        return false;
      if (this.ticket_size != that.ticket_size)
        return false;
    }

    boolean this_present_credit_due_days = true;
    boolean that_present_credit_due_days = true;
    if (this_present_credit_due_days || that_present_credit_due_days) {
      if (!(this_present_credit_due_days && that_present_credit_due_days))
        return false;
      if (this.credit_due_days != that.credit_due_days)
        return false;
    }

    boolean this_present_created = true;
    boolean that_present_created = true;
    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_updated = true;
    boolean that_present_updated = true;
    if (this_present_updated || that_present_updated) {
      if (!(this_present_updated && that_present_updated))
        return false;
      if (this.updated != that.updated)
        return false;
    }

    return true;
  }

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

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

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

    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
      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(isSetActive()).compareTo(typedOther.isSetActive());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActive()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.active, typedOther.active);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTicket_size()).compareTo(typedOther.isSetTicket_size());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTicket_size()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ticket_size, typedOther.ticket_size);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCredit_due_days()).compareTo(typedOther.isSetCredit_due_days());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCredit_due_days()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credit_due_days, typedOther.credit_due_days);
      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(isSetUpdated()).compareTo(typedOther.isSetUpdated());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUpdated()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updated, typedOther.updated);
      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 {
    org.apache.thrift.protocol.TField field;
    iprot.readStructBegin();
    while (true)
    {
      field = iprot.readFieldBegin();
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
        break;
      }
      switch (field.id) {
        case 1: // ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.id = iprot.readI64();
            setIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.name = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // ACTIVE
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.active = iprot.readBool();
            setActiveIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // TICKET_SIZE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.ticket_size = iprot.readDouble();
            setTicket_sizeIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // CREDIT_DUE_DAYS
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.credit_due_days = iprot.readI64();
            setCredit_due_daysIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // CREATED
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.created = iprot.readI64();
            setCreatedIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // UPDATED
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.updated = iprot.readI64();
            setUpdatedIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();
    validate();
  }

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

    oprot.writeStructBegin(STRUCT_DESC);
    oprot.writeFieldBegin(ID_FIELD_DESC);
    oprot.writeI64(this.id);
    oprot.writeFieldEnd();
    if (this.name != null) {
      oprot.writeFieldBegin(NAME_FIELD_DESC);
      oprot.writeString(this.name);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(ACTIVE_FIELD_DESC);
    oprot.writeBool(this.active);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(TICKET_SIZE_FIELD_DESC);
    oprot.writeDouble(this.ticket_size);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(CREDIT_DUE_DAYS_FIELD_DESC);
    oprot.writeI64(this.credit_due_days);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(CREATED_FIELD_DESC);
    oprot.writeI64(this.created);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(UPDATED_FIELD_DESC);
    oprot.writeI64(this.updated);
    oprot.writeFieldEnd();
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("Creditor(");
    boolean first = true;

    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("name:");
    if (this.name == null) {
      sb.append("null");
    } else {
      sb.append(this.name);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("active:");
    sb.append(this.active);
    first = false;
    if (!first) sb.append(", ");
    sb.append("ticket_size:");
    sb.append(this.ticket_size);
    first = false;
    if (!first) sb.append(", ");
    sb.append("credit_due_days:");
    sb.append(this.credit_due_days);
    first = false;
    if (!first) sb.append(", ");
    sb.append("created:");
    sb.append(this.created);
    first = false;
    if (!first) sb.append(", ");
    sb.append("updated:");
    sb.append(this.updated);
    first = false;
    sb.append(")");
    return sb.toString();
  }

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

  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_bit_vector = new BitSet(1);
      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);
    }
  }

}