Subversion Repositories SmartDukaan

Rev

Rev 3430 | 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.crm;

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 Ticket implements org.apache.thrift.TBase<Ticket, Ticket._Fields>, java.io.Serializable, Cloneable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Ticket");

  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 CUSTOMER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("customerId", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField OPEN_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("openDate", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField CLOSE_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("closeDate", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("priority", org.apache.thrift.protocol.TType.I32, (short)6);
  private static final org.apache.thrift.protocol.TField CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("category", org.apache.thrift.protocol.TType.I32, (short)7);
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)8);
  private static final org.apache.thrift.protocol.TField ASSIGNEE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("assigneeId", org.apache.thrift.protocol.TType.I64, (short)9);
  private static final org.apache.thrift.protocol.TField CREATOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("creatorId", org.apache.thrift.protocol.TType.I64, (short)10);
  private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)11);
  private static final org.apache.thrift.protocol.TField AIRWAY_BILL_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("airwayBillNo", org.apache.thrift.protocol.TType.STRING, (short)12);
  private static final org.apache.thrift.protocol.TField PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("productName", org.apache.thrift.protocol.TType.STRING, (short)13);
  private static final org.apache.thrift.protocol.TField CUSTOMER_MOBILE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("customerMobileNumber", org.apache.thrift.protocol.TType.STRING, (short)14);
  private static final org.apache.thrift.protocol.TField CUSTOMER_EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("customerEmailId", org.apache.thrift.protocol.TType.STRING, (short)15);
  private static final org.apache.thrift.protocol.TField CUSTOMER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("customerName", org.apache.thrift.protocol.TType.STRING, (short)16);

  private long id; // required
  private long customerId; // required
  private long openDate; // required
  private long closeDate; // required
  private String description; // required
  private TicketPriority priority; // required
  private TicketCategory category; // required
  private TicketStatus status; // required
  private long assigneeId; // required
  private long creatorId; // required
  private long orderId; // required
  private String airwayBillNo; // required
  private String productName; // required
  private String customerMobileNumber; // required
  private String customerEmailId; // required
  private String customerName; // 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"),
    CUSTOMER_ID((short)2, "customerId"),
    OPEN_DATE((short)3, "openDate"),
    CLOSE_DATE((short)4, "closeDate"),
    DESCRIPTION((short)5, "description"),
    /**
     * 
     * @see TicketPriority
     */
    PRIORITY((short)6, "priority"),
    /**
     * 
     * @see TicketCategory
     */
    CATEGORY((short)7, "category"),
    /**
     * 
     * @see TicketStatus
     */
    STATUS((short)8, "status"),
    ASSIGNEE_ID((short)9, "assigneeId"),
    CREATOR_ID((short)10, "creatorId"),
    ORDER_ID((short)11, "orderId"),
    AIRWAY_BILL_NO((short)12, "airwayBillNo"),
    PRODUCT_NAME((short)13, "productName"),
    CUSTOMER_MOBILE_NUMBER((short)14, "customerMobileNumber"),
    CUSTOMER_EMAIL_ID((short)15, "customerEmailId"),
    CUSTOMER_NAME((short)16, "customerName");

    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: // CUSTOMER_ID
          return CUSTOMER_ID;
        case 3: // OPEN_DATE
          return OPEN_DATE;
        case 4: // CLOSE_DATE
          return CLOSE_DATE;
        case 5: // DESCRIPTION
          return DESCRIPTION;
        case 6: // PRIORITY
          return PRIORITY;
        case 7: // CATEGORY
          return CATEGORY;
        case 8: // STATUS
          return STATUS;
        case 9: // ASSIGNEE_ID
          return ASSIGNEE_ID;
        case 10: // CREATOR_ID
          return CREATOR_ID;
        case 11: // ORDER_ID
          return ORDER_ID;
        case 12: // AIRWAY_BILL_NO
          return AIRWAY_BILL_NO;
        case 13: // PRODUCT_NAME
          return PRODUCT_NAME;
        case 14: // CUSTOMER_MOBILE_NUMBER
          return CUSTOMER_MOBILE_NUMBER;
        case 15: // CUSTOMER_EMAIL_ID
          return CUSTOMER_EMAIL_ID;
        case 16: // CUSTOMER_NAME
          return CUSTOMER_NAME;
        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 __CUSTOMERID_ISSET_ID = 1;
  private static final int __OPENDATE_ISSET_ID = 2;
  private static final int __CLOSEDATE_ISSET_ID = 3;
  private static final int __ASSIGNEEID_ISSET_ID = 4;
  private static final int __CREATORID_ISSET_ID = 5;
  private static final int __ORDERID_ISSET_ID = 6;
  private BitSet __isset_bit_vector = new BitSet(7);

  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.CUSTOMER_ID, new org.apache.thrift.meta_data.FieldMetaData("customerId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.OPEN_DATE, new org.apache.thrift.meta_data.FieldMetaData("openDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CLOSE_DATE, new org.apache.thrift.meta_data.FieldMetaData("closeDate", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TicketPriority.class)));
    tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TicketCategory.class)));
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TicketStatus.class)));
    tmpMap.put(_Fields.ASSIGNEE_ID, new org.apache.thrift.meta_data.FieldMetaData("assigneeId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CREATOR_ID, new org.apache.thrift.meta_data.FieldMetaData("creatorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.AIRWAY_BILL_NO, new org.apache.thrift.meta_data.FieldMetaData("airwayBillNo", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("productName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CUSTOMER_MOBILE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("customerMobileNumber", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CUSTOMER_EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("customerEmailId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CUSTOMER_NAME, new org.apache.thrift.meta_data.FieldMetaData("customerName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Ticket.class, metaDataMap);
  }

  public Ticket() {
  }

  public Ticket(
    long id,
    long openDate,
    TicketPriority priority,
    TicketCategory category,
    TicketStatus status,
    long creatorId)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.openDate = openDate;
    setOpenDateIsSet(true);
    this.priority = priority;
    this.category = category;
    this.status = status;
    this.creatorId = creatorId;
    setCreatorIdIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public Ticket(Ticket other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.id = other.id;
    this.customerId = other.customerId;
    this.openDate = other.openDate;
    this.closeDate = other.closeDate;
    if (other.isSetDescription()) {
      this.description = other.description;
    }
    if (other.isSetPriority()) {
      this.priority = other.priority;
    }
    if (other.isSetCategory()) {
      this.category = other.category;
    }
    if (other.isSetStatus()) {
      this.status = other.status;
    }
    this.assigneeId = other.assigneeId;
    this.creatorId = other.creatorId;
    this.orderId = other.orderId;
    if (other.isSetAirwayBillNo()) {
      this.airwayBillNo = other.airwayBillNo;
    }
    if (other.isSetProductName()) {
      this.productName = other.productName;
    }
    if (other.isSetCustomerMobileNumber()) {
      this.customerMobileNumber = other.customerMobileNumber;
    }
    if (other.isSetCustomerEmailId()) {
      this.customerEmailId = other.customerEmailId;
    }
    if (other.isSetCustomerName()) {
      this.customerName = other.customerName;
    }
  }

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

  @Override
  public void clear() {
    setIdIsSet(false);
    this.id = 0;
    setCustomerIdIsSet(false);
    this.customerId = 0;
    setOpenDateIsSet(false);
    this.openDate = 0;
    setCloseDateIsSet(false);
    this.closeDate = 0;
    this.description = null;
    this.priority = null;
    this.category = null;
    this.status = null;
    setAssigneeIdIsSet(false);
    this.assigneeId = 0;
    setCreatorIdIsSet(false);
    this.creatorId = 0;
    setOrderIdIsSet(false);
    this.orderId = 0;
    this.airwayBillNo = null;
    this.productName = null;
    this.customerMobileNumber = null;
    this.customerEmailId = null;
    this.customerName = null;
  }

  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 long getCustomerId() {
    return this.customerId;
  }

  public void setCustomerId(long customerId) {
    this.customerId = customerId;
    setCustomerIdIsSet(true);
  }

  public void unsetCustomerId() {
    __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
  }

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

  public void setCustomerIdIsSet(boolean value) {
    __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
  }

  public long getOpenDate() {
    return this.openDate;
  }

  public void setOpenDate(long openDate) {
    this.openDate = openDate;
    setOpenDateIsSet(true);
  }

  public void unsetOpenDate() {
    __isset_bit_vector.clear(__OPENDATE_ISSET_ID);
  }

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

  public void setOpenDateIsSet(boolean value) {
    __isset_bit_vector.set(__OPENDATE_ISSET_ID, value);
  }

  public long getCloseDate() {
    return this.closeDate;
  }

  public void setCloseDate(long closeDate) {
    this.closeDate = closeDate;
    setCloseDateIsSet(true);
  }

  public void unsetCloseDate() {
    __isset_bit_vector.clear(__CLOSEDATE_ISSET_ID);
  }

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

  public void setCloseDateIsSet(boolean value) {
    __isset_bit_vector.set(__CLOSEDATE_ISSET_ID, value);
  }

  public String getDescription() {
    return this.description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public void unsetDescription() {
    this.description = null;
  }

  /** Returns true if field description is set (has been assigned a value) and false otherwise */
  public boolean isSetDescription() {
    return this.description != null;
  }

  public void setDescriptionIsSet(boolean value) {
    if (!value) {
      this.description = null;
    }
  }

  /**
   * 
   * @see TicketPriority
   */
  public TicketPriority getPriority() {
    return this.priority;
  }

  /**
   * 
   * @see TicketPriority
   */
  public void setPriority(TicketPriority priority) {
    this.priority = priority;
  }

  public void unsetPriority() {
    this.priority = null;
  }

  /** Returns true if field priority is set (has been assigned a value) and false otherwise */
  public boolean isSetPriority() {
    return this.priority != null;
  }

  public void setPriorityIsSet(boolean value) {
    if (!value) {
      this.priority = null;
    }
  }

  /**
   * 
   * @see TicketCategory
   */
  public TicketCategory getCategory() {
    return this.category;
  }

  /**
   * 
   * @see TicketCategory
   */
  public void setCategory(TicketCategory category) {
    this.category = category;
  }

  public void unsetCategory() {
    this.category = null;
  }

  /** Returns true if field category is set (has been assigned a value) and false otherwise */
  public boolean isSetCategory() {
    return this.category != null;
  }

  public void setCategoryIsSet(boolean value) {
    if (!value) {
      this.category = null;
    }
  }

  /**
   * 
   * @see TicketStatus
   */
  public TicketStatus getStatus() {
    return this.status;
  }

  /**
   * 
   * @see TicketStatus
   */
  public void setStatus(TicketStatus status) {
    this.status = status;
  }

  public void unsetStatus() {
    this.status = null;
  }

  /** Returns true if field status is set (has been assigned a value) and false otherwise */
  public boolean isSetStatus() {
    return this.status != null;
  }

  public void setStatusIsSet(boolean value) {
    if (!value) {
      this.status = null;
    }
  }

  public long getAssigneeId() {
    return this.assigneeId;
  }

  public void setAssigneeId(long assigneeId) {
    this.assigneeId = assigneeId;
    setAssigneeIdIsSet(true);
  }

  public void unsetAssigneeId() {
    __isset_bit_vector.clear(__ASSIGNEEID_ISSET_ID);
  }

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

  public void setAssigneeIdIsSet(boolean value) {
    __isset_bit_vector.set(__ASSIGNEEID_ISSET_ID, value);
  }

  public long getCreatorId() {
    return this.creatorId;
  }

  public void setCreatorId(long creatorId) {
    this.creatorId = creatorId;
    setCreatorIdIsSet(true);
  }

  public void unsetCreatorId() {
    __isset_bit_vector.clear(__CREATORID_ISSET_ID);
  }

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

  public void setCreatorIdIsSet(boolean value) {
    __isset_bit_vector.set(__CREATORID_ISSET_ID, value);
  }

  public long getOrderId() {
    return this.orderId;
  }

  public void setOrderId(long orderId) {
    this.orderId = orderId;
    setOrderIdIsSet(true);
  }

  public void unsetOrderId() {
    __isset_bit_vector.clear(__ORDERID_ISSET_ID);
  }

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

  public void setOrderIdIsSet(boolean value) {
    __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
  }

  public String getAirwayBillNo() {
    return this.airwayBillNo;
  }

  public void setAirwayBillNo(String airwayBillNo) {
    this.airwayBillNo = airwayBillNo;
  }

  public void unsetAirwayBillNo() {
    this.airwayBillNo = null;
  }

  /** Returns true if field airwayBillNo is set (has been assigned a value) and false otherwise */
  public boolean isSetAirwayBillNo() {
    return this.airwayBillNo != null;
  }

  public void setAirwayBillNoIsSet(boolean value) {
    if (!value) {
      this.airwayBillNo = null;
    }
  }

  public String getProductName() {
    return this.productName;
  }

  public void setProductName(String productName) {
    this.productName = productName;
  }

  public void unsetProductName() {
    this.productName = null;
  }

  /** Returns true if field productName is set (has been assigned a value) and false otherwise */
  public boolean isSetProductName() {
    return this.productName != null;
  }

  public void setProductNameIsSet(boolean value) {
    if (!value) {
      this.productName = null;
    }
  }

  public String getCustomerMobileNumber() {
    return this.customerMobileNumber;
  }

  public void setCustomerMobileNumber(String customerMobileNumber) {
    this.customerMobileNumber = customerMobileNumber;
  }

  public void unsetCustomerMobileNumber() {
    this.customerMobileNumber = null;
  }

  /** Returns true if field customerMobileNumber is set (has been assigned a value) and false otherwise */
  public boolean isSetCustomerMobileNumber() {
    return this.customerMobileNumber != null;
  }

  public void setCustomerMobileNumberIsSet(boolean value) {
    if (!value) {
      this.customerMobileNumber = null;
    }
  }

  public String getCustomerEmailId() {
    return this.customerEmailId;
  }

  public void setCustomerEmailId(String customerEmailId) {
    this.customerEmailId = customerEmailId;
  }

  public void unsetCustomerEmailId() {
    this.customerEmailId = null;
  }

  /** Returns true if field customerEmailId is set (has been assigned a value) and false otherwise */
  public boolean isSetCustomerEmailId() {
    return this.customerEmailId != null;
  }

  public void setCustomerEmailIdIsSet(boolean value) {
    if (!value) {
      this.customerEmailId = null;
    }
  }

  public String getCustomerName() {
    return this.customerName;
  }

  public void setCustomerName(String customerName) {
    this.customerName = customerName;
  }

  public void unsetCustomerName() {
    this.customerName = null;
  }

  /** Returns true if field customerName is set (has been assigned a value) and false otherwise */
  public boolean isSetCustomerName() {
    return this.customerName != null;
  }

  public void setCustomerNameIsSet(boolean value) {
    if (!value) {
      this.customerName = null;
    }
  }

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

    case CUSTOMER_ID:
      if (value == null) {
        unsetCustomerId();
      } else {
        setCustomerId((Long)value);
      }
      break;

    case OPEN_DATE:
      if (value == null) {
        unsetOpenDate();
      } else {
        setOpenDate((Long)value);
      }
      break;

    case CLOSE_DATE:
      if (value == null) {
        unsetCloseDate();
      } else {
        setCloseDate((Long)value);
      }
      break;

    case DESCRIPTION:
      if (value == null) {
        unsetDescription();
      } else {
        setDescription((String)value);
      }
      break;

    case PRIORITY:
      if (value == null) {
        unsetPriority();
      } else {
        setPriority((TicketPriority)value);
      }
      break;

    case CATEGORY:
      if (value == null) {
        unsetCategory();
      } else {
        setCategory((TicketCategory)value);
      }
      break;

    case STATUS:
      if (value == null) {
        unsetStatus();
      } else {
        setStatus((TicketStatus)value);
      }
      break;

    case ASSIGNEE_ID:
      if (value == null) {
        unsetAssigneeId();
      } else {
        setAssigneeId((Long)value);
      }
      break;

    case CREATOR_ID:
      if (value == null) {
        unsetCreatorId();
      } else {
        setCreatorId((Long)value);
      }
      break;

    case ORDER_ID:
      if (value == null) {
        unsetOrderId();
      } else {
        setOrderId((Long)value);
      }
      break;

    case AIRWAY_BILL_NO:
      if (value == null) {
        unsetAirwayBillNo();
      } else {
        setAirwayBillNo((String)value);
      }
      break;

    case PRODUCT_NAME:
      if (value == null) {
        unsetProductName();
      } else {
        setProductName((String)value);
      }
      break;

    case CUSTOMER_MOBILE_NUMBER:
      if (value == null) {
        unsetCustomerMobileNumber();
      } else {
        setCustomerMobileNumber((String)value);
      }
      break;

    case CUSTOMER_EMAIL_ID:
      if (value == null) {
        unsetCustomerEmailId();
      } else {
        setCustomerEmailId((String)value);
      }
      break;

    case CUSTOMER_NAME:
      if (value == null) {
        unsetCustomerName();
      } else {
        setCustomerName((String)value);
      }
      break;

    }
  }

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

    case CUSTOMER_ID:
      return Long.valueOf(getCustomerId());

    case OPEN_DATE:
      return Long.valueOf(getOpenDate());

    case CLOSE_DATE:
      return Long.valueOf(getCloseDate());

    case DESCRIPTION:
      return getDescription();

    case PRIORITY:
      return getPriority();

    case CATEGORY:
      return getCategory();

    case STATUS:
      return getStatus();

    case ASSIGNEE_ID:
      return Long.valueOf(getAssigneeId());

    case CREATOR_ID:
      return Long.valueOf(getCreatorId());

    case ORDER_ID:
      return Long.valueOf(getOrderId());

    case AIRWAY_BILL_NO:
      return getAirwayBillNo();

    case PRODUCT_NAME:
      return getProductName();

    case CUSTOMER_MOBILE_NUMBER:
      return getCustomerMobileNumber();

    case CUSTOMER_EMAIL_ID:
      return getCustomerEmailId();

    case CUSTOMER_NAME:
      return getCustomerName();

    }
    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 CUSTOMER_ID:
      return isSetCustomerId();
    case OPEN_DATE:
      return isSetOpenDate();
    case CLOSE_DATE:
      return isSetCloseDate();
    case DESCRIPTION:
      return isSetDescription();
    case PRIORITY:
      return isSetPriority();
    case CATEGORY:
      return isSetCategory();
    case STATUS:
      return isSetStatus();
    case ASSIGNEE_ID:
      return isSetAssigneeId();
    case CREATOR_ID:
      return isSetCreatorId();
    case ORDER_ID:
      return isSetOrderId();
    case AIRWAY_BILL_NO:
      return isSetAirwayBillNo();
    case PRODUCT_NAME:
      return isSetProductName();
    case CUSTOMER_MOBILE_NUMBER:
      return isSetCustomerMobileNumber();
    case CUSTOMER_EMAIL_ID:
      return isSetCustomerEmailId();
    case CUSTOMER_NAME:
      return isSetCustomerName();
    }
    throw new IllegalStateException();
  }

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

  public boolean equals(Ticket 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_customerId = true && this.isSetCustomerId();
    boolean that_present_customerId = true && that.isSetCustomerId();
    if (this_present_customerId || that_present_customerId) {
      if (!(this_present_customerId && that_present_customerId))
        return false;
      if (this.customerId != that.customerId)
        return false;
    }

    boolean this_present_openDate = true;
    boolean that_present_openDate = true;
    if (this_present_openDate || that_present_openDate) {
      if (!(this_present_openDate && that_present_openDate))
        return false;
      if (this.openDate != that.openDate)
        return false;
    }

    boolean this_present_closeDate = true && this.isSetCloseDate();
    boolean that_present_closeDate = true && that.isSetCloseDate();
    if (this_present_closeDate || that_present_closeDate) {
      if (!(this_present_closeDate && that_present_closeDate))
        return false;
      if (this.closeDate != that.closeDate)
        return false;
    }

    boolean this_present_description = true && this.isSetDescription();
    boolean that_present_description = true && that.isSetDescription();
    if (this_present_description || that_present_description) {
      if (!(this_present_description && that_present_description))
        return false;
      if (!this.description.equals(that.description))
        return false;
    }

    boolean this_present_priority = true && this.isSetPriority();
    boolean that_present_priority = true && that.isSetPriority();
    if (this_present_priority || that_present_priority) {
      if (!(this_present_priority && that_present_priority))
        return false;
      if (!this.priority.equals(that.priority))
        return false;
    }

    boolean this_present_category = true && this.isSetCategory();
    boolean that_present_category = true && that.isSetCategory();
    if (this_present_category || that_present_category) {
      if (!(this_present_category && that_present_category))
        return false;
      if (!this.category.equals(that.category))
        return false;
    }

    boolean this_present_status = true && this.isSetStatus();
    boolean that_present_status = true && that.isSetStatus();
    if (this_present_status || that_present_status) {
      if (!(this_present_status && that_present_status))
        return false;
      if (!this.status.equals(that.status))
        return false;
    }

    boolean this_present_assigneeId = true && this.isSetAssigneeId();
    boolean that_present_assigneeId = true && that.isSetAssigneeId();
    if (this_present_assigneeId || that_present_assigneeId) {
      if (!(this_present_assigneeId && that_present_assigneeId))
        return false;
      if (this.assigneeId != that.assigneeId)
        return false;
    }

    boolean this_present_creatorId = true;
    boolean that_present_creatorId = true;
    if (this_present_creatorId || that_present_creatorId) {
      if (!(this_present_creatorId && that_present_creatorId))
        return false;
      if (this.creatorId != that.creatorId)
        return false;
    }

    boolean this_present_orderId = true && this.isSetOrderId();
    boolean that_present_orderId = true && that.isSetOrderId();
    if (this_present_orderId || that_present_orderId) {
      if (!(this_present_orderId && that_present_orderId))
        return false;
      if (this.orderId != that.orderId)
        return false;
    }

    boolean this_present_airwayBillNo = true && this.isSetAirwayBillNo();
    boolean that_present_airwayBillNo = true && that.isSetAirwayBillNo();
    if (this_present_airwayBillNo || that_present_airwayBillNo) {
      if (!(this_present_airwayBillNo && that_present_airwayBillNo))
        return false;
      if (!this.airwayBillNo.equals(that.airwayBillNo))
        return false;
    }

    boolean this_present_productName = true && this.isSetProductName();
    boolean that_present_productName = true && that.isSetProductName();
    if (this_present_productName || that_present_productName) {
      if (!(this_present_productName && that_present_productName))
        return false;
      if (!this.productName.equals(that.productName))
        return false;
    }

    boolean this_present_customerMobileNumber = true && this.isSetCustomerMobileNumber();
    boolean that_present_customerMobileNumber = true && that.isSetCustomerMobileNumber();
    if (this_present_customerMobileNumber || that_present_customerMobileNumber) {
      if (!(this_present_customerMobileNumber && that_present_customerMobileNumber))
        return false;
      if (!this.customerMobileNumber.equals(that.customerMobileNumber))
        return false;
    }

    boolean this_present_customerEmailId = true && this.isSetCustomerEmailId();
    boolean that_present_customerEmailId = true && that.isSetCustomerEmailId();
    if (this_present_customerEmailId || that_present_customerEmailId) {
      if (!(this_present_customerEmailId && that_present_customerEmailId))
        return false;
      if (!this.customerEmailId.equals(that.customerEmailId))
        return false;
    }

    boolean this_present_customerName = true && this.isSetCustomerName();
    boolean that_present_customerName = true && that.isSetCustomerName();
    if (this_present_customerName || that_present_customerName) {
      if (!(this_present_customerName && that_present_customerName))
        return false;
      if (!this.customerName.equals(that.customerName))
        return false;
    }

    return true;
  }

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

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

    int lastComparison = 0;
    Ticket typedOther = (Ticket)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(isSetCustomerId()).compareTo(typedOther.isSetCustomerId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCustomerId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.customerId, typedOther.customerId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOpenDate()).compareTo(typedOther.isSetOpenDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOpenDate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.openDate, typedOther.openDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCloseDate()).compareTo(typedOther.isSetCloseDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCloseDate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.closeDate, typedOther.closeDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDescription()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPriority()).compareTo(typedOther.isSetPriority());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPriority()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priority, typedOther.priority);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCategory()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAssigneeId()).compareTo(typedOther.isSetAssigneeId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAssigneeId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.assigneeId, typedOther.assigneeId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCreatorId()).compareTo(typedOther.isSetCreatorId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreatorId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creatorId, typedOther.creatorId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOrderId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAirwayBillNo()).compareTo(typedOther.isSetAirwayBillNo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAirwayBillNo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airwayBillNo, typedOther.airwayBillNo);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetProductName()).compareTo(typedOther.isSetProductName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProductName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productName, typedOther.productName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCustomerMobileNumber()).compareTo(typedOther.isSetCustomerMobileNumber());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCustomerMobileNumber()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.customerMobileNumber, typedOther.customerMobileNumber);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCustomerEmailId()).compareTo(typedOther.isSetCustomerEmailId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCustomerEmailId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.customerEmailId, typedOther.customerEmailId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCustomerName()).compareTo(typedOther.isSetCustomerName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCustomerName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.customerName, typedOther.customerName);
      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: // CUSTOMER_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.customerId = iprot.readI64();
            setCustomerIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // OPEN_DATE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.openDate = iprot.readI64();
            setOpenDateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // CLOSE_DATE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.closeDate = iprot.readI64();
            setCloseDateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // DESCRIPTION
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.description = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // PRIORITY
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.priority = TicketPriority.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // CATEGORY
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.category = TicketCategory.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // STATUS
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.status = TicketStatus.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // ASSIGNEE_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.assigneeId = iprot.readI64();
            setAssigneeIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // CREATOR_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.creatorId = iprot.readI64();
            setCreatorIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 11: // ORDER_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.orderId = iprot.readI64();
            setOrderIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // AIRWAY_BILL_NO
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.airwayBillNo = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // PRODUCT_NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.productName = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 14: // CUSTOMER_MOBILE_NUMBER
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.customerMobileNumber = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 15: // CUSTOMER_EMAIL_ID
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.customerEmailId = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 16: // CUSTOMER_NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.customerName = iprot.readString();
          } 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 (isSetCustomerId()) {
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
      oprot.writeI64(this.customerId);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(OPEN_DATE_FIELD_DESC);
    oprot.writeI64(this.openDate);
    oprot.writeFieldEnd();
    if (isSetCloseDate()) {
      oprot.writeFieldBegin(CLOSE_DATE_FIELD_DESC);
      oprot.writeI64(this.closeDate);
      oprot.writeFieldEnd();
    }
    if (this.description != null) {
      if (isSetDescription()) {
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
        oprot.writeString(this.description);
        oprot.writeFieldEnd();
      }
    }
    if (this.priority != null) {
      oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
      oprot.writeI32(this.priority.getValue());
      oprot.writeFieldEnd();
    }
    if (this.category != null) {
      oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
      oprot.writeI32(this.category.getValue());
      oprot.writeFieldEnd();
    }
    if (this.status != null) {
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
      oprot.writeI32(this.status.getValue());
      oprot.writeFieldEnd();
    }
    if (isSetAssigneeId()) {
      oprot.writeFieldBegin(ASSIGNEE_ID_FIELD_DESC);
      oprot.writeI64(this.assigneeId);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(CREATOR_ID_FIELD_DESC);
    oprot.writeI64(this.creatorId);
    oprot.writeFieldEnd();
    if (isSetOrderId()) {
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
      oprot.writeI64(this.orderId);
      oprot.writeFieldEnd();
    }
    if (this.airwayBillNo != null) {
      if (isSetAirwayBillNo()) {
        oprot.writeFieldBegin(AIRWAY_BILL_NO_FIELD_DESC);
        oprot.writeString(this.airwayBillNo);
        oprot.writeFieldEnd();
      }
    }
    if (this.productName != null) {
      if (isSetProductName()) {
        oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
        oprot.writeString(this.productName);
        oprot.writeFieldEnd();
      }
    }
    if (this.customerMobileNumber != null) {
      if (isSetCustomerMobileNumber()) {
        oprot.writeFieldBegin(CUSTOMER_MOBILE_NUMBER_FIELD_DESC);
        oprot.writeString(this.customerMobileNumber);
        oprot.writeFieldEnd();
      }
    }
    if (this.customerEmailId != null) {
      if (isSetCustomerEmailId()) {
        oprot.writeFieldBegin(CUSTOMER_EMAIL_ID_FIELD_DESC);
        oprot.writeString(this.customerEmailId);
        oprot.writeFieldEnd();
      }
    }
    if (this.customerName != null) {
      if (isSetCustomerName()) {
        oprot.writeFieldBegin(CUSTOMER_NAME_FIELD_DESC);
        oprot.writeString(this.customerName);
        oprot.writeFieldEnd();
      }
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

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

    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (isSetCustomerId()) {
      if (!first) sb.append(", ");
      sb.append("customerId:");
      sb.append(this.customerId);
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("openDate:");
    sb.append(this.openDate);
    first = false;
    if (isSetCloseDate()) {
      if (!first) sb.append(", ");
      sb.append("closeDate:");
      sb.append(this.closeDate);
      first = false;
    }
    if (isSetDescription()) {
      if (!first) sb.append(", ");
      sb.append("description:");
      if (this.description == null) {
        sb.append("null");
      } else {
        sb.append(this.description);
      }
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("priority:");
    if (this.priority == null) {
      sb.append("null");
    } else {
      sb.append(this.priority);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("category:");
    if (this.category == null) {
      sb.append("null");
    } else {
      sb.append(this.category);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("status:");
    if (this.status == null) {
      sb.append("null");
    } else {
      sb.append(this.status);
    }
    first = false;
    if (isSetAssigneeId()) {
      if (!first) sb.append(", ");
      sb.append("assigneeId:");
      sb.append(this.assigneeId);
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("creatorId:");
    sb.append(this.creatorId);
    first = false;
    if (isSetOrderId()) {
      if (!first) sb.append(", ");
      sb.append("orderId:");
      sb.append(this.orderId);
      first = false;
    }
    if (isSetAirwayBillNo()) {
      if (!first) sb.append(", ");
      sb.append("airwayBillNo:");
      if (this.airwayBillNo == null) {
        sb.append("null");
      } else {
        sb.append(this.airwayBillNo);
      }
      first = false;
    }
    if (isSetProductName()) {
      if (!first) sb.append(", ");
      sb.append("productName:");
      if (this.productName == null) {
        sb.append("null");
      } else {
        sb.append(this.productName);
      }
      first = false;
    }
    if (isSetCustomerMobileNumber()) {
      if (!first) sb.append(", ");
      sb.append("customerMobileNumber:");
      if (this.customerMobileNumber == null) {
        sb.append("null");
      } else {
        sb.append(this.customerMobileNumber);
      }
      first = false;
    }
    if (isSetCustomerEmailId()) {
      if (!first) sb.append(", ");
      sb.append("customerEmailId:");
      if (this.customerEmailId == null) {
        sb.append("null");
      } else {
        sb.append(this.customerEmailId);
      }
      first = false;
    }
    if (isSetCustomerName()) {
      if (!first) sb.append(", ");
      sb.append("customerName:");
      if (this.customerName == null) {
        sb.append("null");
      } else {
        sb.append(this.customerName);
      }
      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);
    }
  }

}