Subversion Repositories SmartDukaan

Rev

Rev 3546 | Rev 16090 | Go to most recent revision | 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 Activity implements org.apache.thrift.TBase<Activity, Activity._Fields>, java.io.Serializable, Cloneable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Activity");

  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 DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField CREATION_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTimestamp", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4);
  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)5);
  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)6);
  private static final org.apache.thrift.protocol.TField USER_EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userEmailId", org.apache.thrift.protocol.TType.I64, (short)7);
  private static final org.apache.thrift.protocol.TField TICKET_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ticketId", org.apache.thrift.protocol.TType.I64, (short)8);
  private static final org.apache.thrift.protocol.TField TICKET_PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("ticketPriority", org.apache.thrift.protocol.TType.I32, (short)9);
  private static final org.apache.thrift.protocol.TField TICKET_ASSIGNEE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ticketAssigneeId", org.apache.thrift.protocol.TType.I64, (short)10);
  private static final org.apache.thrift.protocol.TField TICKET_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("ticketStatus", org.apache.thrift.protocol.TType.I32, (short)11);
  private static final org.apache.thrift.protocol.TField TICKET_CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("ticketCategory", org.apache.thrift.protocol.TType.I32, (short)12);
  private static final org.apache.thrift.protocol.TField TICKET_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ticketDescription", org.apache.thrift.protocol.TType.STRING, (short)13);
  private static final org.apache.thrift.protocol.TField IS_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("isRead", org.apache.thrift.protocol.TType.BOOL, (short)14);
  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)15);
  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)16);
  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)17);
  private static final org.apache.thrift.protocol.TField ATTACHMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("attachments", org.apache.thrift.protocol.TType.STRING, (short)18);

  private long id; // required
  private String description; // required
  private long creationTimestamp; // required
  private ActivityType type; // required
  private long customerId; // required
  private long creatorId; // required
  private long userEmailId; // required
  private long ticketId; // required
  private TicketPriority ticketPriority; // required
  private long ticketAssigneeId; // required
  private TicketStatus ticketStatus; // required
  private TicketCategory ticketCategory; // required
  private String ticketDescription; // required
  private boolean isRead; // required
  private String customerMobileNumber; // required
  private String customerEmailId; // required
  private String customerName; // required
  private String attachments; // 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"),
    DESCRIPTION((short)2, "description"),
    CREATION_TIMESTAMP((short)3, "creationTimestamp"),
    /**
     * 
     * @see ActivityType
     */
    TYPE((short)4, "type"),
    CUSTOMER_ID((short)5, "customerId"),
    CREATOR_ID((short)6, "creatorId"),
    USER_EMAIL_ID((short)7, "userEmailId"),
    TICKET_ID((short)8, "ticketId"),
    /**
     * 
     * @see TicketPriority
     */
    TICKET_PRIORITY((short)9, "ticketPriority"),
    TICKET_ASSIGNEE_ID((short)10, "ticketAssigneeId"),
    /**
     * 
     * @see TicketStatus
     */
    TICKET_STATUS((short)11, "ticketStatus"),
    /**
     * 
     * @see TicketCategory
     */
    TICKET_CATEGORY((short)12, "ticketCategory"),
    TICKET_DESCRIPTION((short)13, "ticketDescription"),
    IS_READ((short)14, "isRead"),
    CUSTOMER_MOBILE_NUMBER((short)15, "customerMobileNumber"),
    CUSTOMER_EMAIL_ID((short)16, "customerEmailId"),
    CUSTOMER_NAME((short)17, "customerName"),
    ATTACHMENTS((short)18, "attachments");

    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: // DESCRIPTION
          return DESCRIPTION;
        case 3: // CREATION_TIMESTAMP
          return CREATION_TIMESTAMP;
        case 4: // TYPE
          return TYPE;
        case 5: // CUSTOMER_ID
          return CUSTOMER_ID;
        case 6: // CREATOR_ID
          return CREATOR_ID;
        case 7: // USER_EMAIL_ID
          return USER_EMAIL_ID;
        case 8: // TICKET_ID
          return TICKET_ID;
        case 9: // TICKET_PRIORITY
          return TICKET_PRIORITY;
        case 10: // TICKET_ASSIGNEE_ID
          return TICKET_ASSIGNEE_ID;
        case 11: // TICKET_STATUS
          return TICKET_STATUS;
        case 12: // TICKET_CATEGORY
          return TICKET_CATEGORY;
        case 13: // TICKET_DESCRIPTION
          return TICKET_DESCRIPTION;
        case 14: // IS_READ
          return IS_READ;
        case 15: // CUSTOMER_MOBILE_NUMBER
          return CUSTOMER_MOBILE_NUMBER;
        case 16: // CUSTOMER_EMAIL_ID
          return CUSTOMER_EMAIL_ID;
        case 17: // CUSTOMER_NAME
          return CUSTOMER_NAME;
        case 18: // ATTACHMENTS
          return ATTACHMENTS;
        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 __CREATIONTIMESTAMP_ISSET_ID = 1;
  private static final int __CUSTOMERID_ISSET_ID = 2;
  private static final int __CREATORID_ISSET_ID = 3;
  private static final int __USEREMAILID_ISSET_ID = 4;
  private static final int __TICKETID_ISSET_ID = 5;
  private static final int __TICKETASSIGNEEID_ISSET_ID = 6;
  private static final int __ISREAD_ISSET_ID = 7;
  private BitSet __isset_bit_vector = new BitSet(8);

  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.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.CREATION_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("creationTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ActivityType.class)));
    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.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.USER_EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("userEmailId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TICKET_ID, new org.apache.thrift.meta_data.FieldMetaData("ticketId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TICKET_PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("ticketPriority", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TicketPriority.class)));
    tmpMap.put(_Fields.TICKET_ASSIGNEE_ID, new org.apache.thrift.meta_data.FieldMetaData("ticketAssigneeId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TICKET_STATUS, new org.apache.thrift.meta_data.FieldMetaData("ticketStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TicketStatus.class)));
    tmpMap.put(_Fields.TICKET_CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("ticketCategory", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TicketCategory.class)));
    tmpMap.put(_Fields.TICKET_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("ticketDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.IS_READ, new org.apache.thrift.meta_data.FieldMetaData("isRead", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    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)));
    tmpMap.put(_Fields.ATTACHMENTS, new org.apache.thrift.meta_data.FieldMetaData("attachments", 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(Activity.class, metaDataMap);
  }

  public Activity() {
  }

  public Activity(
    long id,
    long creationTimestamp,
    ActivityType type,
    long creatorId)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.creationTimestamp = creationTimestamp;
    setCreationTimestampIsSet(true);
    this.type = type;
    this.creatorId = creatorId;
    setCreatorIdIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public Activity(Activity other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.id = other.id;
    if (other.isSetDescription()) {
      this.description = other.description;
    }
    this.creationTimestamp = other.creationTimestamp;
    if (other.isSetType()) {
      this.type = other.type;
    }
    this.customerId = other.customerId;
    this.creatorId = other.creatorId;
    this.userEmailId = other.userEmailId;
    this.ticketId = other.ticketId;
    if (other.isSetTicketPriority()) {
      this.ticketPriority = other.ticketPriority;
    }
    this.ticketAssigneeId = other.ticketAssigneeId;
    if (other.isSetTicketStatus()) {
      this.ticketStatus = other.ticketStatus;
    }
    if (other.isSetTicketCategory()) {
      this.ticketCategory = other.ticketCategory;
    }
    if (other.isSetTicketDescription()) {
      this.ticketDescription = other.ticketDescription;
    }
    this.isRead = other.isRead;
    if (other.isSetCustomerMobileNumber()) {
      this.customerMobileNumber = other.customerMobileNumber;
    }
    if (other.isSetCustomerEmailId()) {
      this.customerEmailId = other.customerEmailId;
    }
    if (other.isSetCustomerName()) {
      this.customerName = other.customerName;
    }
    if (other.isSetAttachments()) {
      this.attachments = other.attachments;
    }
  }

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

  @Override
  public void clear() {
    setIdIsSet(false);
    this.id = 0;
    this.description = null;
    setCreationTimestampIsSet(false);
    this.creationTimestamp = 0;
    this.type = null;
    setCustomerIdIsSet(false);
    this.customerId = 0;
    setCreatorIdIsSet(false);
    this.creatorId = 0;
    setUserEmailIdIsSet(false);
    this.userEmailId = 0;
    setTicketIdIsSet(false);
    this.ticketId = 0;
    this.ticketPriority = null;
    setTicketAssigneeIdIsSet(false);
    this.ticketAssigneeId = 0;
    this.ticketStatus = null;
    this.ticketCategory = null;
    this.ticketDescription = null;
    setIsReadIsSet(false);
    this.isRead = false;
    this.customerMobileNumber = null;
    this.customerEmailId = null;
    this.customerName = null;
    this.attachments = 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 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;
    }
  }

  public long getCreationTimestamp() {
    return this.creationTimestamp;
  }

  public void setCreationTimestamp(long creationTimestamp) {
    this.creationTimestamp = creationTimestamp;
    setCreationTimestampIsSet(true);
  }

  public void unsetCreationTimestamp() {
    __isset_bit_vector.clear(__CREATIONTIMESTAMP_ISSET_ID);
  }

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

  public void setCreationTimestampIsSet(boolean value) {
    __isset_bit_vector.set(__CREATIONTIMESTAMP_ISSET_ID, value);
  }

  /**
   * 
   * @see ActivityType
   */
  public ActivityType getType() {
    return this.type;
  }

  /**
   * 
   * @see ActivityType
   */
  public void setType(ActivityType type) {
    this.type = type;
  }

  public void unsetType() {
    this.type = null;
  }

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

  public void setTypeIsSet(boolean value) {
    if (!value) {
      this.type = null;
    }
  }

  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 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 getUserEmailId() {
    return this.userEmailId;
  }

  public void setUserEmailId(long userEmailId) {
    this.userEmailId = userEmailId;
    setUserEmailIdIsSet(true);
  }

  public void unsetUserEmailId() {
    __isset_bit_vector.clear(__USEREMAILID_ISSET_ID);
  }

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

  public void setUserEmailIdIsSet(boolean value) {
    __isset_bit_vector.set(__USEREMAILID_ISSET_ID, value);
  }

  public long getTicketId() {
    return this.ticketId;
  }

  public void setTicketId(long ticketId) {
    this.ticketId = ticketId;
    setTicketIdIsSet(true);
  }

  public void unsetTicketId() {
    __isset_bit_vector.clear(__TICKETID_ISSET_ID);
  }

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

  public void setTicketIdIsSet(boolean value) {
    __isset_bit_vector.set(__TICKETID_ISSET_ID, value);
  }

  /**
   * 
   * @see TicketPriority
   */
  public TicketPriority getTicketPriority() {
    return this.ticketPriority;
  }

  /**
   * 
   * @see TicketPriority
   */
  public void setTicketPriority(TicketPriority ticketPriority) {
    this.ticketPriority = ticketPriority;
  }

  public void unsetTicketPriority() {
    this.ticketPriority = null;
  }

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

  public void setTicketPriorityIsSet(boolean value) {
    if (!value) {
      this.ticketPriority = null;
    }
  }

  public long getTicketAssigneeId() {
    return this.ticketAssigneeId;
  }

  public void setTicketAssigneeId(long ticketAssigneeId) {
    this.ticketAssigneeId = ticketAssigneeId;
    setTicketAssigneeIdIsSet(true);
  }

  public void unsetTicketAssigneeId() {
    __isset_bit_vector.clear(__TICKETASSIGNEEID_ISSET_ID);
  }

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

  public void setTicketAssigneeIdIsSet(boolean value) {
    __isset_bit_vector.set(__TICKETASSIGNEEID_ISSET_ID, value);
  }

  /**
   * 
   * @see TicketStatus
   */
  public TicketStatus getTicketStatus() {
    return this.ticketStatus;
  }

  /**
   * 
   * @see TicketStatus
   */
  public void setTicketStatus(TicketStatus ticketStatus) {
    this.ticketStatus = ticketStatus;
  }

  public void unsetTicketStatus() {
    this.ticketStatus = null;
  }

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

  public void setTicketStatusIsSet(boolean value) {
    if (!value) {
      this.ticketStatus = null;
    }
  }

  /**
   * 
   * @see TicketCategory
   */
  public TicketCategory getTicketCategory() {
    return this.ticketCategory;
  }

  /**
   * 
   * @see TicketCategory
   */
  public void setTicketCategory(TicketCategory ticketCategory) {
    this.ticketCategory = ticketCategory;
  }

  public void unsetTicketCategory() {
    this.ticketCategory = null;
  }

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

  public void setTicketCategoryIsSet(boolean value) {
    if (!value) {
      this.ticketCategory = null;
    }
  }

  public String getTicketDescription() {
    return this.ticketDescription;
  }

  public void setTicketDescription(String ticketDescription) {
    this.ticketDescription = ticketDescription;
  }

  public void unsetTicketDescription() {
    this.ticketDescription = null;
  }

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

  public void setTicketDescriptionIsSet(boolean value) {
    if (!value) {
      this.ticketDescription = null;
    }
  }

  public boolean isIsRead() {
    return this.isRead;
  }

  public void setIsRead(boolean isRead) {
    this.isRead = isRead;
    setIsReadIsSet(true);
  }

  public void unsetIsRead() {
    __isset_bit_vector.clear(__ISREAD_ISSET_ID);
  }

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

  public void setIsReadIsSet(boolean value) {
    __isset_bit_vector.set(__ISREAD_ISSET_ID, value);
  }

  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 String getAttachments() {
    return this.attachments;
  }

  public void setAttachments(String attachments) {
    this.attachments = attachments;
  }

  public void unsetAttachments() {
    this.attachments = null;
  }

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

  public void setAttachmentsIsSet(boolean value) {
    if (!value) {
      this.attachments = null;
    }
  }

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

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

    case CREATION_TIMESTAMP:
      if (value == null) {
        unsetCreationTimestamp();
      } else {
        setCreationTimestamp((Long)value);
      }
      break;

    case TYPE:
      if (value == null) {
        unsetType();
      } else {
        setType((ActivityType)value);
      }
      break;

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

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

    case USER_EMAIL_ID:
      if (value == null) {
        unsetUserEmailId();
      } else {
        setUserEmailId((Long)value);
      }
      break;

    case TICKET_ID:
      if (value == null) {
        unsetTicketId();
      } else {
        setTicketId((Long)value);
      }
      break;

    case TICKET_PRIORITY:
      if (value == null) {
        unsetTicketPriority();
      } else {
        setTicketPriority((TicketPriority)value);
      }
      break;

    case TICKET_ASSIGNEE_ID:
      if (value == null) {
        unsetTicketAssigneeId();
      } else {
        setTicketAssigneeId((Long)value);
      }
      break;

    case TICKET_STATUS:
      if (value == null) {
        unsetTicketStatus();
      } else {
        setTicketStatus((TicketStatus)value);
      }
      break;

    case TICKET_CATEGORY:
      if (value == null) {
        unsetTicketCategory();
      } else {
        setTicketCategory((TicketCategory)value);
      }
      break;

    case TICKET_DESCRIPTION:
      if (value == null) {
        unsetTicketDescription();
      } else {
        setTicketDescription((String)value);
      }
      break;

    case IS_READ:
      if (value == null) {
        unsetIsRead();
      } else {
        setIsRead((Boolean)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;

    case ATTACHMENTS:
      if (value == null) {
        unsetAttachments();
      } else {
        setAttachments((String)value);
      }
      break;

    }
  }

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

    case DESCRIPTION:
      return getDescription();

    case CREATION_TIMESTAMP:
      return Long.valueOf(getCreationTimestamp());

    case TYPE:
      return getType();

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

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

    case USER_EMAIL_ID:
      return Long.valueOf(getUserEmailId());

    case TICKET_ID:
      return Long.valueOf(getTicketId());

    case TICKET_PRIORITY:
      return getTicketPriority();

    case TICKET_ASSIGNEE_ID:
      return Long.valueOf(getTicketAssigneeId());

    case TICKET_STATUS:
      return getTicketStatus();

    case TICKET_CATEGORY:
      return getTicketCategory();

    case TICKET_DESCRIPTION:
      return getTicketDescription();

    case IS_READ:
      return Boolean.valueOf(isIsRead());

    case CUSTOMER_MOBILE_NUMBER:
      return getCustomerMobileNumber();

    case CUSTOMER_EMAIL_ID:
      return getCustomerEmailId();

    case CUSTOMER_NAME:
      return getCustomerName();

    case ATTACHMENTS:
      return getAttachments();

    }
    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 DESCRIPTION:
      return isSetDescription();
    case CREATION_TIMESTAMP:
      return isSetCreationTimestamp();
    case TYPE:
      return isSetType();
    case CUSTOMER_ID:
      return isSetCustomerId();
    case CREATOR_ID:
      return isSetCreatorId();
    case USER_EMAIL_ID:
      return isSetUserEmailId();
    case TICKET_ID:
      return isSetTicketId();
    case TICKET_PRIORITY:
      return isSetTicketPriority();
    case TICKET_ASSIGNEE_ID:
      return isSetTicketAssigneeId();
    case TICKET_STATUS:
      return isSetTicketStatus();
    case TICKET_CATEGORY:
      return isSetTicketCategory();
    case TICKET_DESCRIPTION:
      return isSetTicketDescription();
    case IS_READ:
      return isSetIsRead();
    case CUSTOMER_MOBILE_NUMBER:
      return isSetCustomerMobileNumber();
    case CUSTOMER_EMAIL_ID:
      return isSetCustomerEmailId();
    case CUSTOMER_NAME:
      return isSetCustomerName();
    case ATTACHMENTS:
      return isSetAttachments();
    }
    throw new IllegalStateException();
  }

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

  public boolean equals(Activity 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_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_creationTimestamp = true;
    boolean that_present_creationTimestamp = true;
    if (this_present_creationTimestamp || that_present_creationTimestamp) {
      if (!(this_present_creationTimestamp && that_present_creationTimestamp))
        return false;
      if (this.creationTimestamp != that.creationTimestamp)
        return false;
    }

    boolean this_present_type = true && this.isSetType();
    boolean that_present_type = true && that.isSetType();
    if (this_present_type || that_present_type) {
      if (!(this_present_type && that_present_type))
        return false;
      if (!this.type.equals(that.type))
        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_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_userEmailId = true && this.isSetUserEmailId();
    boolean that_present_userEmailId = true && that.isSetUserEmailId();
    if (this_present_userEmailId || that_present_userEmailId) {
      if (!(this_present_userEmailId && that_present_userEmailId))
        return false;
      if (this.userEmailId != that.userEmailId)
        return false;
    }

    boolean this_present_ticketId = true && this.isSetTicketId();
    boolean that_present_ticketId = true && that.isSetTicketId();
    if (this_present_ticketId || that_present_ticketId) {
      if (!(this_present_ticketId && that_present_ticketId))
        return false;
      if (this.ticketId != that.ticketId)
        return false;
    }

    boolean this_present_ticketPriority = true && this.isSetTicketPriority();
    boolean that_present_ticketPriority = true && that.isSetTicketPriority();
    if (this_present_ticketPriority || that_present_ticketPriority) {
      if (!(this_present_ticketPriority && that_present_ticketPriority))
        return false;
      if (!this.ticketPriority.equals(that.ticketPriority))
        return false;
    }

    boolean this_present_ticketAssigneeId = true && this.isSetTicketAssigneeId();
    boolean that_present_ticketAssigneeId = true && that.isSetTicketAssigneeId();
    if (this_present_ticketAssigneeId || that_present_ticketAssigneeId) {
      if (!(this_present_ticketAssigneeId && that_present_ticketAssigneeId))
        return false;
      if (this.ticketAssigneeId != that.ticketAssigneeId)
        return false;
    }

    boolean this_present_ticketStatus = true && this.isSetTicketStatus();
    boolean that_present_ticketStatus = true && that.isSetTicketStatus();
    if (this_present_ticketStatus || that_present_ticketStatus) {
      if (!(this_present_ticketStatus && that_present_ticketStatus))
        return false;
      if (!this.ticketStatus.equals(that.ticketStatus))
        return false;
    }

    boolean this_present_ticketCategory = true && this.isSetTicketCategory();
    boolean that_present_ticketCategory = true && that.isSetTicketCategory();
    if (this_present_ticketCategory || that_present_ticketCategory) {
      if (!(this_present_ticketCategory && that_present_ticketCategory))
        return false;
      if (!this.ticketCategory.equals(that.ticketCategory))
        return false;
    }

    boolean this_present_ticketDescription = true && this.isSetTicketDescription();
    boolean that_present_ticketDescription = true && that.isSetTicketDescription();
    if (this_present_ticketDescription || that_present_ticketDescription) {
      if (!(this_present_ticketDescription && that_present_ticketDescription))
        return false;
      if (!this.ticketDescription.equals(that.ticketDescription))
        return false;
    }

    boolean this_present_isRead = true && this.isSetIsRead();
    boolean that_present_isRead = true && that.isSetIsRead();
    if (this_present_isRead || that_present_isRead) {
      if (!(this_present_isRead && that_present_isRead))
        return false;
      if (this.isRead != that.isRead)
        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;
    }

    boolean this_present_attachments = true && this.isSetAttachments();
    boolean that_present_attachments = true && that.isSetAttachments();
    if (this_present_attachments || that_present_attachments) {
      if (!(this_present_attachments && that_present_attachments))
        return false;
      if (!this.attachments.equals(that.attachments))
        return false;
    }

    return true;
  }

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

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

    int lastComparison = 0;
    Activity typedOther = (Activity)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(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(isSetCreationTimestamp()).compareTo(typedOther.isSetCreationTimestamp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreationTimestamp()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTimestamp, typedOther.creationTimestamp);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
      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(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(isSetUserEmailId()).compareTo(typedOther.isSetUserEmailId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUserEmailId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userEmailId, typedOther.userEmailId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTicketId()).compareTo(typedOther.isSetTicketId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTicketId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ticketId, typedOther.ticketId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTicketPriority()).compareTo(typedOther.isSetTicketPriority());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTicketPriority()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ticketPriority, typedOther.ticketPriority);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTicketAssigneeId()).compareTo(typedOther.isSetTicketAssigneeId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTicketAssigneeId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ticketAssigneeId, typedOther.ticketAssigneeId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTicketStatus()).compareTo(typedOther.isSetTicketStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTicketStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ticketStatus, typedOther.ticketStatus);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTicketCategory()).compareTo(typedOther.isSetTicketCategory());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTicketCategory()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ticketCategory, typedOther.ticketCategory);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTicketDescription()).compareTo(typedOther.isSetTicketDescription());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTicketDescription()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ticketDescription, typedOther.ticketDescription);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsRead()).compareTo(typedOther.isSetIsRead());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsRead()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRead, typedOther.isRead);
      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;
      }
    }
    lastComparison = Boolean.valueOf(isSetAttachments()).compareTo(typedOther.isSetAttachments());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAttachments()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attachments, typedOther.attachments);
      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: // 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 3: // CREATION_TIMESTAMP
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.creationTimestamp = iprot.readI64();
            setCreationTimestampIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // TYPE
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.type = ActivityType.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // 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 6: // 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 7: // USER_EMAIL_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.userEmailId = iprot.readI64();
            setUserEmailIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // TICKET_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.ticketId = iprot.readI64();
            setTicketIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // TICKET_PRIORITY
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.ticketPriority = TicketPriority.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // TICKET_ASSIGNEE_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.ticketAssigneeId = iprot.readI64();
            setTicketAssigneeIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 11: // TICKET_STATUS
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.ticketStatus = TicketStatus.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // TICKET_CATEGORY
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.ticketCategory = TicketCategory.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // TICKET_DESCRIPTION
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.ticketDescription = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 14: // IS_READ
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.isRead = iprot.readBool();
            setIsReadIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 15: // 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 16: // 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 17: // 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;
        case 18: // ATTACHMENTS
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.attachments = 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 (this.description != null) {
      if (isSetDescription()) {
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
        oprot.writeString(this.description);
        oprot.writeFieldEnd();
      }
    }
    oprot.writeFieldBegin(CREATION_TIMESTAMP_FIELD_DESC);
    oprot.writeI64(this.creationTimestamp);
    oprot.writeFieldEnd();
    if (this.type != null) {
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
      oprot.writeI32(this.type.getValue());
      oprot.writeFieldEnd();
    }
    if (isSetCustomerId()) {
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
      oprot.writeI64(this.customerId);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(CREATOR_ID_FIELD_DESC);
    oprot.writeI64(this.creatorId);
    oprot.writeFieldEnd();
    if (isSetUserEmailId()) {
      oprot.writeFieldBegin(USER_EMAIL_ID_FIELD_DESC);
      oprot.writeI64(this.userEmailId);
      oprot.writeFieldEnd();
    }
    if (isSetTicketId()) {
      oprot.writeFieldBegin(TICKET_ID_FIELD_DESC);
      oprot.writeI64(this.ticketId);
      oprot.writeFieldEnd();
    }
    if (this.ticketPriority != null) {
      if (isSetTicketPriority()) {
        oprot.writeFieldBegin(TICKET_PRIORITY_FIELD_DESC);
        oprot.writeI32(this.ticketPriority.getValue());
        oprot.writeFieldEnd();
      }
    }
    if (isSetTicketAssigneeId()) {
      oprot.writeFieldBegin(TICKET_ASSIGNEE_ID_FIELD_DESC);
      oprot.writeI64(this.ticketAssigneeId);
      oprot.writeFieldEnd();
    }
    if (this.ticketStatus != null) {
      if (isSetTicketStatus()) {
        oprot.writeFieldBegin(TICKET_STATUS_FIELD_DESC);
        oprot.writeI32(this.ticketStatus.getValue());
        oprot.writeFieldEnd();
      }
    }
    if (this.ticketCategory != null) {
      if (isSetTicketCategory()) {
        oprot.writeFieldBegin(TICKET_CATEGORY_FIELD_DESC);
        oprot.writeI32(this.ticketCategory.getValue());
        oprot.writeFieldEnd();
      }
    }
    if (this.ticketDescription != null) {
      if (isSetTicketDescription()) {
        oprot.writeFieldBegin(TICKET_DESCRIPTION_FIELD_DESC);
        oprot.writeString(this.ticketDescription);
        oprot.writeFieldEnd();
      }
    }
    if (isSetIsRead()) {
      oprot.writeFieldBegin(IS_READ_FIELD_DESC);
      oprot.writeBool(this.isRead);
      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();
      }
    }
    if (this.attachments != null) {
      if (isSetAttachments()) {
        oprot.writeFieldBegin(ATTACHMENTS_FIELD_DESC);
        oprot.writeString(this.attachments);
        oprot.writeFieldEnd();
      }
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

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

    sb.append("id:");
    sb.append(this.id);
    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("creationTimestamp:");
    sb.append(this.creationTimestamp);
    first = false;
    if (!first) sb.append(", ");
    sb.append("type:");
    if (this.type == null) {
      sb.append("null");
    } else {
      sb.append(this.type);
    }
    first = false;
    if (isSetCustomerId()) {
      if (!first) sb.append(", ");
      sb.append("customerId:");
      sb.append(this.customerId);
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("creatorId:");
    sb.append(this.creatorId);
    first = false;
    if (isSetUserEmailId()) {
      if (!first) sb.append(", ");
      sb.append("userEmailId:");
      sb.append(this.userEmailId);
      first = false;
    }
    if (isSetTicketId()) {
      if (!first) sb.append(", ");
      sb.append("ticketId:");
      sb.append(this.ticketId);
      first = false;
    }
    if (isSetTicketPriority()) {
      if (!first) sb.append(", ");
      sb.append("ticketPriority:");
      if (this.ticketPriority == null) {
        sb.append("null");
      } else {
        sb.append(this.ticketPriority);
      }
      first = false;
    }
    if (isSetTicketAssigneeId()) {
      if (!first) sb.append(", ");
      sb.append("ticketAssigneeId:");
      sb.append(this.ticketAssigneeId);
      first = false;
    }
    if (isSetTicketStatus()) {
      if (!first) sb.append(", ");
      sb.append("ticketStatus:");
      if (this.ticketStatus == null) {
        sb.append("null");
      } else {
        sb.append(this.ticketStatus);
      }
      first = false;
    }
    if (isSetTicketCategory()) {
      if (!first) sb.append(", ");
      sb.append("ticketCategory:");
      if (this.ticketCategory == null) {
        sb.append("null");
      } else {
        sb.append(this.ticketCategory);
      }
      first = false;
    }
    if (isSetTicketDescription()) {
      if (!first) sb.append(", ");
      sb.append("ticketDescription:");
      if (this.ticketDescription == null) {
        sb.append("null");
      } else {
        sb.append(this.ticketDescription);
      }
      first = false;
    }
    if (isSetIsRead()) {
      if (!first) sb.append(", ");
      sb.append("isRead:");
      sb.append(this.isRead);
      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;
    }
    if (isSetAttachments()) {
      if (!first) sb.append(", ");
      sb.append("attachments:");
      if (this.attachments == null) {
        sb.append("null");
      } else {
        sb.append(this.attachments);
      }
      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);
    }
  }

}