/**
 * Autogenerated by Thrift Compiler (0.16.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.wso2.carbon.databridge.commons.thrift.data;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2022-04-22")
public class ThriftEventBundle implements org.apache.thrift.TBase<ThriftEventBundle, ThriftEventBundle._Fields>, java.io.Serializable, Cloneable, Comparable<ThriftEventBundle> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ThriftEventBundle");

  private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField EVENT_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("eventNum", org.apache.thrift.protocol.TType.I32, (short)2);
  private static final org.apache.thrift.protocol.TField INT_ATTRIBUTE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("intAttributeList", org.apache.thrift.protocol.TType.LIST, (short)3);
  private static final org.apache.thrift.protocol.TField LONG_ATTRIBUTE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("longAttributeList", org.apache.thrift.protocol.TType.LIST, (short)4);
  private static final org.apache.thrift.protocol.TField DOUBLE_ATTRIBUTE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("doubleAttributeList", org.apache.thrift.protocol.TType.LIST, (short)5);
  private static final org.apache.thrift.protocol.TField BOOL_ATTRIBUTE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("boolAttributeList", org.apache.thrift.protocol.TType.LIST, (short)6);
  private static final org.apache.thrift.protocol.TField STRING_ATTRIBUTE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("stringAttributeList", org.apache.thrift.protocol.TType.LIST, (short)7);
  private static final org.apache.thrift.protocol.TField ARBITRARY_DATA_MAP_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("arbitraryDataMapMap", org.apache.thrift.protocol.TType.MAP, (short)8);

  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ThriftEventBundleStandardSchemeFactory();
  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ThriftEventBundleTupleSchemeFactory();

  public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // optional
  public int eventNum; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> intAttributeList; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> longAttributeList; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Double> doubleAttributeList; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Boolean> boolAttributeList; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> stringAttributeList; // optional
  public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.String>> arbitraryDataMapMap; // optional

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    SESSION_ID((short)1, "sessionId"),
    EVENT_NUM((short)2, "eventNum"),
    INT_ATTRIBUTE_LIST((short)3, "intAttributeList"),
    LONG_ATTRIBUTE_LIST((short)4, "longAttributeList"),
    DOUBLE_ATTRIBUTE_LIST((short)5, "doubleAttributeList"),
    BOOL_ATTRIBUTE_LIST((short)6, "boolAttributeList"),
    STRING_ATTRIBUTE_LIST((short)7, "stringAttributeList"),
    ARBITRARY_DATA_MAP_MAP((short)8, "arbitraryDataMapMap");

    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

    static {
      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // SESSION_ID
          return SESSION_ID;
        case 2: // EVENT_NUM
          return EVENT_NUM;
        case 3: // INT_ATTRIBUTE_LIST
          return INT_ATTRIBUTE_LIST;
        case 4: // LONG_ATTRIBUTE_LIST
          return LONG_ATTRIBUTE_LIST;
        case 5: // DOUBLE_ATTRIBUTE_LIST
          return DOUBLE_ATTRIBUTE_LIST;
        case 6: // BOOL_ATTRIBUTE_LIST
          return BOOL_ATTRIBUTE_LIST;
        case 7: // STRING_ATTRIBUTE_LIST
          return STRING_ATTRIBUTE_LIST;
        case 8: // ARBITRARY_DATA_MAP_MAP
          return ARBITRARY_DATA_MAP_MAP;
        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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByName(java.lang.String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final java.lang.String _fieldName;

    _Fields(short thriftId, java.lang.String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public java.lang.String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __EVENTNUM_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.SESSION_ID,_Fields.EVENT_NUM,_Fields.INT_ATTRIBUTE_LIST,_Fields.LONG_ATTRIBUTE_LIST,_Fields.DOUBLE_ATTRIBUTE_LIST,_Fields.BOOL_ATTRIBUTE_LIST,_Fields.STRING_ATTRIBUTE_LIST,_Fields.ARBITRARY_DATA_MAP_MAP};
  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.EVENT_NUM, new org.apache.thrift.meta_data.FieldMetaData("eventNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.INT_ATTRIBUTE_LIST, new org.apache.thrift.meta_data.FieldMetaData("intAttributeList", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
    tmpMap.put(_Fields.LONG_ATTRIBUTE_LIST, new org.apache.thrift.meta_data.FieldMetaData("longAttributeList", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
    tmpMap.put(_Fields.DOUBLE_ATTRIBUTE_LIST, new org.apache.thrift.meta_data.FieldMetaData("doubleAttributeList", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
    tmpMap.put(_Fields.BOOL_ATTRIBUTE_LIST, new org.apache.thrift.meta_data.FieldMetaData("boolAttributeList", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))));
    tmpMap.put(_Fields.STRING_ATTRIBUTE_LIST, new org.apache.thrift.meta_data.FieldMetaData("stringAttributeList", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.ARBITRARY_DATA_MAP_MAP, new org.apache.thrift.meta_data.FieldMetaData("arbitraryDataMapMap", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), 
            new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ThriftEventBundle.class, metaDataMap);
  }

  public ThriftEventBundle() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public ThriftEventBundle(ThriftEventBundle other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetSessionId()) {
      this.sessionId = other.sessionId;
    }
    this.eventNum = other.eventNum;
    if (other.isSetIntAttributeList()) {
      java.util.List<java.lang.Integer> __this__intAttributeList = new java.util.ArrayList<java.lang.Integer>(other.intAttributeList);
      this.intAttributeList = __this__intAttributeList;
    }
    if (other.isSetLongAttributeList()) {
      java.util.List<java.lang.Long> __this__longAttributeList = new java.util.ArrayList<java.lang.Long>(other.longAttributeList);
      this.longAttributeList = __this__longAttributeList;
    }
    if (other.isSetDoubleAttributeList()) {
      java.util.List<java.lang.Double> __this__doubleAttributeList = new java.util.ArrayList<java.lang.Double>(other.doubleAttributeList);
      this.doubleAttributeList = __this__doubleAttributeList;
    }
    if (other.isSetBoolAttributeList()) {
      java.util.List<java.lang.Boolean> __this__boolAttributeList = new java.util.ArrayList<java.lang.Boolean>(other.boolAttributeList);
      this.boolAttributeList = __this__boolAttributeList;
    }
    if (other.isSetStringAttributeList()) {
      java.util.List<java.lang.String> __this__stringAttributeList = new java.util.ArrayList<java.lang.String>(other.stringAttributeList);
      this.stringAttributeList = __this__stringAttributeList;
    }
    if (other.isSetArbitraryDataMapMap()) {
      java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.String>> __this__arbitraryDataMapMap = new java.util.HashMap<java.lang.Integer,java.util.Map<java.lang.String,java.lang.String>>(other.arbitraryDataMapMap.size());
      for (java.util.Map.Entry<java.lang.Integer, java.util.Map<java.lang.String,java.lang.String>> other_element : other.arbitraryDataMapMap.entrySet()) {

        java.lang.Integer other_element_key = other_element.getKey();
        java.util.Map<java.lang.String,java.lang.String> other_element_value = other_element.getValue();

        java.lang.Integer __this__arbitraryDataMapMap_copy_key = other_element_key;

        java.util.Map<java.lang.String,java.lang.String> __this__arbitraryDataMapMap_copy_value = new java.util.HashMap<java.lang.String,java.lang.String>(other_element_value);

        __this__arbitraryDataMapMap.put(__this__arbitraryDataMapMap_copy_key, __this__arbitraryDataMapMap_copy_value);
      }
      this.arbitraryDataMapMap = __this__arbitraryDataMapMap;
    }
  }

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

  @Override
  public void clear() {
    this.sessionId = null;
    setEventNumIsSet(false);
    this.eventNum = 0;
    this.intAttributeList = null;
    this.longAttributeList = null;
    this.doubleAttributeList = null;
    this.boolAttributeList = null;
    this.stringAttributeList = null;
    this.arbitraryDataMapMap = null;
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.String getSessionId() {
    return this.sessionId;
  }

  public ThriftEventBundle setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) {
    this.sessionId = sessionId;
    return this;
  }

  public void unsetSessionId() {
    this.sessionId = null;
  }

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

  public void setSessionIdIsSet(boolean value) {
    if (!value) {
      this.sessionId = null;
    }
  }

  public int getEventNum() {
    return this.eventNum;
  }

  public ThriftEventBundle setEventNum(int eventNum) {
    this.eventNum = eventNum;
    setEventNumIsSet(true);
    return this;
  }

  public void unsetEventNum() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EVENTNUM_ISSET_ID);
  }

  /** Returns true if field eventNum is set (has been assigned a value) and false otherwise */
  public boolean isSetEventNum() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EVENTNUM_ISSET_ID);
  }

  public void setEventNumIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EVENTNUM_ISSET_ID, value);
  }

  public int getIntAttributeListSize() {
    return (this.intAttributeList == null) ? 0 : this.intAttributeList.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.lang.Integer> getIntAttributeListIterator() {
    return (this.intAttributeList == null) ? null : this.intAttributeList.iterator();
  }

  public void addToIntAttributeList(int elem) {
    if (this.intAttributeList == null) {
      this.intAttributeList = new java.util.ArrayList<java.lang.Integer>();
    }
    this.intAttributeList.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.Integer> getIntAttributeList() {
    return this.intAttributeList;
  }

  public ThriftEventBundle setIntAttributeList(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> intAttributeList) {
    this.intAttributeList = intAttributeList;
    return this;
  }

  public void unsetIntAttributeList() {
    this.intAttributeList = null;
  }

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

  public void setIntAttributeListIsSet(boolean value) {
    if (!value) {
      this.intAttributeList = null;
    }
  }

  public int getLongAttributeListSize() {
    return (this.longAttributeList == null) ? 0 : this.longAttributeList.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.lang.Long> getLongAttributeListIterator() {
    return (this.longAttributeList == null) ? null : this.longAttributeList.iterator();
  }

  public void addToLongAttributeList(long elem) {
    if (this.longAttributeList == null) {
      this.longAttributeList = new java.util.ArrayList<java.lang.Long>();
    }
    this.longAttributeList.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.Long> getLongAttributeList() {
    return this.longAttributeList;
  }

  public ThriftEventBundle setLongAttributeList(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> longAttributeList) {
    this.longAttributeList = longAttributeList;
    return this;
  }

  public void unsetLongAttributeList() {
    this.longAttributeList = null;
  }

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

  public void setLongAttributeListIsSet(boolean value) {
    if (!value) {
      this.longAttributeList = null;
    }
  }

  public int getDoubleAttributeListSize() {
    return (this.doubleAttributeList == null) ? 0 : this.doubleAttributeList.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.lang.Double> getDoubleAttributeListIterator() {
    return (this.doubleAttributeList == null) ? null : this.doubleAttributeList.iterator();
  }

  public void addToDoubleAttributeList(double elem) {
    if (this.doubleAttributeList == null) {
      this.doubleAttributeList = new java.util.ArrayList<java.lang.Double>();
    }
    this.doubleAttributeList.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.Double> getDoubleAttributeList() {
    return this.doubleAttributeList;
  }

  public ThriftEventBundle setDoubleAttributeList(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Double> doubleAttributeList) {
    this.doubleAttributeList = doubleAttributeList;
    return this;
  }

  public void unsetDoubleAttributeList() {
    this.doubleAttributeList = null;
  }

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

  public void setDoubleAttributeListIsSet(boolean value) {
    if (!value) {
      this.doubleAttributeList = null;
    }
  }

  public int getBoolAttributeListSize() {
    return (this.boolAttributeList == null) ? 0 : this.boolAttributeList.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.lang.Boolean> getBoolAttributeListIterator() {
    return (this.boolAttributeList == null) ? null : this.boolAttributeList.iterator();
  }

  public void addToBoolAttributeList(boolean elem) {
    if (this.boolAttributeList == null) {
      this.boolAttributeList = new java.util.ArrayList<java.lang.Boolean>();
    }
    this.boolAttributeList.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.Boolean> getBoolAttributeList() {
    return this.boolAttributeList;
  }

  public ThriftEventBundle setBoolAttributeList(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Boolean> boolAttributeList) {
    this.boolAttributeList = boolAttributeList;
    return this;
  }

  public void unsetBoolAttributeList() {
    this.boolAttributeList = null;
  }

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

  public void setBoolAttributeListIsSet(boolean value) {
    if (!value) {
      this.boolAttributeList = null;
    }
  }

  public int getStringAttributeListSize() {
    return (this.stringAttributeList == null) ? 0 : this.stringAttributeList.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.lang.String> getStringAttributeListIterator() {
    return (this.stringAttributeList == null) ? null : this.stringAttributeList.iterator();
  }

  public void addToStringAttributeList(java.lang.String elem) {
    if (this.stringAttributeList == null) {
      this.stringAttributeList = new java.util.ArrayList<java.lang.String>();
    }
    this.stringAttributeList.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.String> getStringAttributeList() {
    return this.stringAttributeList;
  }

  public ThriftEventBundle setStringAttributeList(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> stringAttributeList) {
    this.stringAttributeList = stringAttributeList;
    return this;
  }

  public void unsetStringAttributeList() {
    this.stringAttributeList = null;
  }

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

  public void setStringAttributeListIsSet(boolean value) {
    if (!value) {
      this.stringAttributeList = null;
    }
  }

  public int getArbitraryDataMapMapSize() {
    return (this.arbitraryDataMapMap == null) ? 0 : this.arbitraryDataMapMap.size();
  }

  public void putToArbitraryDataMapMap(int key, java.util.Map<java.lang.String,java.lang.String> val) {
    if (this.arbitraryDataMapMap == null) {
      this.arbitraryDataMapMap = new java.util.HashMap<java.lang.Integer,java.util.Map<java.lang.String,java.lang.String>>();
    }
    this.arbitraryDataMapMap.put(key, val);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.String>> getArbitraryDataMapMap() {
    return this.arbitraryDataMapMap;
  }

  public ThriftEventBundle setArbitraryDataMapMap(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.String>> arbitraryDataMapMap) {
    this.arbitraryDataMapMap = arbitraryDataMapMap;
    return this;
  }

  public void unsetArbitraryDataMapMap() {
    this.arbitraryDataMapMap = null;
  }

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

  public void setArbitraryDataMapMapIsSet(boolean value) {
    if (!value) {
      this.arbitraryDataMapMap = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case SESSION_ID:
      if (value == null) {
        unsetSessionId();
      } else {
        setSessionId((java.lang.String)value);
      }
      break;

    case EVENT_NUM:
      if (value == null) {
        unsetEventNum();
      } else {
        setEventNum((java.lang.Integer)value);
      }
      break;

    case INT_ATTRIBUTE_LIST:
      if (value == null) {
        unsetIntAttributeList();
      } else {
        setIntAttributeList((java.util.List<java.lang.Integer>)value);
      }
      break;

    case LONG_ATTRIBUTE_LIST:
      if (value == null) {
        unsetLongAttributeList();
      } else {
        setLongAttributeList((java.util.List<java.lang.Long>)value);
      }
      break;

    case DOUBLE_ATTRIBUTE_LIST:
      if (value == null) {
        unsetDoubleAttributeList();
      } else {
        setDoubleAttributeList((java.util.List<java.lang.Double>)value);
      }
      break;

    case BOOL_ATTRIBUTE_LIST:
      if (value == null) {
        unsetBoolAttributeList();
      } else {
        setBoolAttributeList((java.util.List<java.lang.Boolean>)value);
      }
      break;

    case STRING_ATTRIBUTE_LIST:
      if (value == null) {
        unsetStringAttributeList();
      } else {
        setStringAttributeList((java.util.List<java.lang.String>)value);
      }
      break;

    case ARBITRARY_DATA_MAP_MAP:
      if (value == null) {
        unsetArbitraryDataMapMap();
      } else {
        setArbitraryDataMapMap((java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.String>>)value);
      }
      break;

    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.Object getFieldValue(_Fields field) {
    switch (field) {
    case SESSION_ID:
      return getSessionId();

    case EVENT_NUM:
      return getEventNum();

    case INT_ATTRIBUTE_LIST:
      return getIntAttributeList();

    case LONG_ATTRIBUTE_LIST:
      return getLongAttributeList();

    case DOUBLE_ATTRIBUTE_LIST:
      return getDoubleAttributeList();

    case BOOL_ATTRIBUTE_LIST:
      return getBoolAttributeList();

    case STRING_ATTRIBUTE_LIST:
      return getStringAttributeList();

    case ARBITRARY_DATA_MAP_MAP:
      return getArbitraryDataMapMap();

    }
    throw new java.lang.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 java.lang.IllegalArgumentException();
    }

    switch (field) {
    case SESSION_ID:
      return isSetSessionId();
    case EVENT_NUM:
      return isSetEventNum();
    case INT_ATTRIBUTE_LIST:
      return isSetIntAttributeList();
    case LONG_ATTRIBUTE_LIST:
      return isSetLongAttributeList();
    case DOUBLE_ATTRIBUTE_LIST:
      return isSetDoubleAttributeList();
    case BOOL_ATTRIBUTE_LIST:
      return isSetBoolAttributeList();
    case STRING_ATTRIBUTE_LIST:
      return isSetStringAttributeList();
    case ARBITRARY_DATA_MAP_MAP:
      return isSetArbitraryDataMapMap();
    }
    throw new java.lang.IllegalStateException();
  }

  @Override
  public boolean equals(java.lang.Object that) {
    if (that instanceof ThriftEventBundle)
      return this.equals((ThriftEventBundle)that);
    return false;
  }

  public boolean equals(ThriftEventBundle that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_sessionId = true && this.isSetSessionId();
    boolean that_present_sessionId = true && that.isSetSessionId();
    if (this_present_sessionId || that_present_sessionId) {
      if (!(this_present_sessionId && that_present_sessionId))
        return false;
      if (!this.sessionId.equals(that.sessionId))
        return false;
    }

    boolean this_present_eventNum = true && this.isSetEventNum();
    boolean that_present_eventNum = true && that.isSetEventNum();
    if (this_present_eventNum || that_present_eventNum) {
      if (!(this_present_eventNum && that_present_eventNum))
        return false;
      if (this.eventNum != that.eventNum)
        return false;
    }

    boolean this_present_intAttributeList = true && this.isSetIntAttributeList();
    boolean that_present_intAttributeList = true && that.isSetIntAttributeList();
    if (this_present_intAttributeList || that_present_intAttributeList) {
      if (!(this_present_intAttributeList && that_present_intAttributeList))
        return false;
      if (!this.intAttributeList.equals(that.intAttributeList))
        return false;
    }

    boolean this_present_longAttributeList = true && this.isSetLongAttributeList();
    boolean that_present_longAttributeList = true && that.isSetLongAttributeList();
    if (this_present_longAttributeList || that_present_longAttributeList) {
      if (!(this_present_longAttributeList && that_present_longAttributeList))
        return false;
      if (!this.longAttributeList.equals(that.longAttributeList))
        return false;
    }

    boolean this_present_doubleAttributeList = true && this.isSetDoubleAttributeList();
    boolean that_present_doubleAttributeList = true && that.isSetDoubleAttributeList();
    if (this_present_doubleAttributeList || that_present_doubleAttributeList) {
      if (!(this_present_doubleAttributeList && that_present_doubleAttributeList))
        return false;
      if (!this.doubleAttributeList.equals(that.doubleAttributeList))
        return false;
    }

    boolean this_present_boolAttributeList = true && this.isSetBoolAttributeList();
    boolean that_present_boolAttributeList = true && that.isSetBoolAttributeList();
    if (this_present_boolAttributeList || that_present_boolAttributeList) {
      if (!(this_present_boolAttributeList && that_present_boolAttributeList))
        return false;
      if (!this.boolAttributeList.equals(that.boolAttributeList))
        return false;
    }

    boolean this_present_stringAttributeList = true && this.isSetStringAttributeList();
    boolean that_present_stringAttributeList = true && that.isSetStringAttributeList();
    if (this_present_stringAttributeList || that_present_stringAttributeList) {
      if (!(this_present_stringAttributeList && that_present_stringAttributeList))
        return false;
      if (!this.stringAttributeList.equals(that.stringAttributeList))
        return false;
    }

    boolean this_present_arbitraryDataMapMap = true && this.isSetArbitraryDataMapMap();
    boolean that_present_arbitraryDataMapMap = true && that.isSetArbitraryDataMapMap();
    if (this_present_arbitraryDataMapMap || that_present_arbitraryDataMapMap) {
      if (!(this_present_arbitraryDataMapMap && that_present_arbitraryDataMapMap))
        return false;
      if (!this.arbitraryDataMapMap.equals(that.arbitraryDataMapMap))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;

    hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
    if (isSetSessionId())
      hashCode = hashCode * 8191 + sessionId.hashCode();

    hashCode = hashCode * 8191 + ((isSetEventNum()) ? 131071 : 524287);
    if (isSetEventNum())
      hashCode = hashCode * 8191 + eventNum;

    hashCode = hashCode * 8191 + ((isSetIntAttributeList()) ? 131071 : 524287);
    if (isSetIntAttributeList())
      hashCode = hashCode * 8191 + intAttributeList.hashCode();

    hashCode = hashCode * 8191 + ((isSetLongAttributeList()) ? 131071 : 524287);
    if (isSetLongAttributeList())
      hashCode = hashCode * 8191 + longAttributeList.hashCode();

    hashCode = hashCode * 8191 + ((isSetDoubleAttributeList()) ? 131071 : 524287);
    if (isSetDoubleAttributeList())
      hashCode = hashCode * 8191 + doubleAttributeList.hashCode();

    hashCode = hashCode * 8191 + ((isSetBoolAttributeList()) ? 131071 : 524287);
    if (isSetBoolAttributeList())
      hashCode = hashCode * 8191 + boolAttributeList.hashCode();

    hashCode = hashCode * 8191 + ((isSetStringAttributeList()) ? 131071 : 524287);
    if (isSetStringAttributeList())
      hashCode = hashCode * 8191 + stringAttributeList.hashCode();

    hashCode = hashCode * 8191 + ((isSetArbitraryDataMapMap()) ? 131071 : 524287);
    if (isSetArbitraryDataMapMap())
      hashCode = hashCode * 8191 + arbitraryDataMapMap.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSessionId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEventNum(), other.isSetEventNum());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEventNum()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventNum, other.eventNum);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIntAttributeList(), other.isSetIntAttributeList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIntAttributeList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.intAttributeList, other.intAttributeList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLongAttributeList(), other.isSetLongAttributeList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLongAttributeList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.longAttributeList, other.longAttributeList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDoubleAttributeList(), other.isSetDoubleAttributeList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDoubleAttributeList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.doubleAttributeList, other.doubleAttributeList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBoolAttributeList(), other.isSetBoolAttributeList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBoolAttributeList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.boolAttributeList, other.boolAttributeList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStringAttributeList(), other.isSetStringAttributeList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStringAttributeList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stringAttributeList, other.stringAttributeList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetArbitraryDataMapMap(), other.isSetArbitraryDataMapMap());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetArbitraryDataMapMap()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.arbitraryDataMapMap, other.arbitraryDataMapMap);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  @org.apache.thrift.annotation.Nullable
  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    scheme(iprot).read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    scheme(oprot).write(oprot, this);
  }

  @Override
  public java.lang.String toString() {
    java.lang.StringBuilder sb = new java.lang.StringBuilder("ThriftEventBundle(");
    boolean first = true;

    if (isSetSessionId()) {
      sb.append("sessionId:");
      if (this.sessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.sessionId);
      }
      first = false;
    }
    if (isSetEventNum()) {
      if (!first) sb.append(", ");
      sb.append("eventNum:");
      sb.append(this.eventNum);
      first = false;
    }
    if (isSetIntAttributeList()) {
      if (!first) sb.append(", ");
      sb.append("intAttributeList:");
      if (this.intAttributeList == null) {
        sb.append("null");
      } else {
        sb.append(this.intAttributeList);
      }
      first = false;
    }
    if (isSetLongAttributeList()) {
      if (!first) sb.append(", ");
      sb.append("longAttributeList:");
      if (this.longAttributeList == null) {
        sb.append("null");
      } else {
        sb.append(this.longAttributeList);
      }
      first = false;
    }
    if (isSetDoubleAttributeList()) {
      if (!first) sb.append(", ");
      sb.append("doubleAttributeList:");
      if (this.doubleAttributeList == null) {
        sb.append("null");
      } else {
        sb.append(this.doubleAttributeList);
      }
      first = false;
    }
    if (isSetBoolAttributeList()) {
      if (!first) sb.append(", ");
      sb.append("boolAttributeList:");
      if (this.boolAttributeList == null) {
        sb.append("null");
      } else {
        sb.append(this.boolAttributeList);
      }
      first = false;
    }
    if (isSetStringAttributeList()) {
      if (!first) sb.append(", ");
      sb.append("stringAttributeList:");
      if (this.stringAttributeList == null) {
        sb.append("null");
      } else {
        sb.append(this.stringAttributeList);
      }
      first = false;
    }
    if (isSetArbitraryDataMapMap()) {
      if (!first) sb.append(", ");
      sb.append("arbitraryDataMapMap:");
      if (this.arbitraryDataMapMap == null) {
        sb.append("null");
      } else {
        sb.append(this.arbitraryDataMapMap);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

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

  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, java.lang.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_bitfield = 0;
      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);
    }
  }

  private static class ThriftEventBundleStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public ThriftEventBundleStandardScheme getScheme() {
      return new ThriftEventBundleStandardScheme();
    }
  }

  private static class ThriftEventBundleStandardScheme extends org.apache.thrift.scheme.StandardScheme<ThriftEventBundle> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftEventBundle struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 1: // SESSION_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.sessionId = iprot.readString();
              struct.setSessionIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // EVENT_NUM
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.eventNum = iprot.readI32();
              struct.setEventNumIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // INT_ATTRIBUTE_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                struct.intAttributeList = new java.util.ArrayList<java.lang.Integer>(_list0.size);
                int _elem1;
                for (int _i2 = 0; _i2 < _list0.size; ++_i2)
                {
                  _elem1 = iprot.readI32();
                  struct.intAttributeList.add(_elem1);
                }
                iprot.readListEnd();
              }
              struct.setIntAttributeListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // LONG_ATTRIBUTE_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
                struct.longAttributeList = new java.util.ArrayList<java.lang.Long>(_list3.size);
                long _elem4;
                for (int _i5 = 0; _i5 < _list3.size; ++_i5)
                {
                  _elem4 = iprot.readI64();
                  struct.longAttributeList.add(_elem4);
                }
                iprot.readListEnd();
              }
              struct.setLongAttributeListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // DOUBLE_ATTRIBUTE_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list6 = iprot.readListBegin();
                struct.doubleAttributeList = new java.util.ArrayList<java.lang.Double>(_list6.size);
                double _elem7;
                for (int _i8 = 0; _i8 < _list6.size; ++_i8)
                {
                  _elem7 = iprot.readDouble();
                  struct.doubleAttributeList.add(_elem7);
                }
                iprot.readListEnd();
              }
              struct.setDoubleAttributeListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // BOOL_ATTRIBUTE_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list9 = iprot.readListBegin();
                struct.boolAttributeList = new java.util.ArrayList<java.lang.Boolean>(_list9.size);
                boolean _elem10;
                for (int _i11 = 0; _i11 < _list9.size; ++_i11)
                {
                  _elem10 = iprot.readBool();
                  struct.boolAttributeList.add(_elem10);
                }
                iprot.readListEnd();
              }
              struct.setBoolAttributeListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // STRING_ATTRIBUTE_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
                struct.stringAttributeList = new java.util.ArrayList<java.lang.String>(_list12.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem13;
                for (int _i14 = 0; _i14 < _list12.size; ++_i14)
                {
                  _elem13 = iprot.readString();
                  struct.stringAttributeList.add(_elem13);
                }
                iprot.readListEnd();
              }
              struct.setStringAttributeListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // ARBITRARY_DATA_MAP_MAP
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map15 = iprot.readMapBegin();
                struct.arbitraryDataMapMap = new java.util.HashMap<java.lang.Integer,java.util.Map<java.lang.String,java.lang.String>>(2*_map15.size);
                int _key16;
                @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> _val17;
                for (int _i18 = 0; _i18 < _map15.size; ++_i18)
                {
                  _key16 = iprot.readI32();
                  {
                    org.apache.thrift.protocol.TMap _map19 = iprot.readMapBegin();
                    _val17 = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map19.size);
                    @org.apache.thrift.annotation.Nullable java.lang.String _key20;
                    @org.apache.thrift.annotation.Nullable java.lang.String _val21;
                    for (int _i22 = 0; _i22 < _map19.size; ++_i22)
                    {
                      _key20 = iprot.readString();
                      _val21 = iprot.readString();
                      _val17.put(_key20, _val21);
                    }
                    iprot.readMapEnd();
                  }
                  struct.arbitraryDataMapMap.put(_key16, _val17);
                }
                iprot.readMapEnd();
              }
              struct.setArbitraryDataMapMapIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.sessionId != null) {
        if (struct.isSetSessionId()) {
          oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.sessionId);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetEventNum()) {
        oprot.writeFieldBegin(EVENT_NUM_FIELD_DESC);
        oprot.writeI32(struct.eventNum);
        oprot.writeFieldEnd();
      }
      if (struct.intAttributeList != null) {
        if (struct.isSetIntAttributeList()) {
          oprot.writeFieldBegin(INT_ATTRIBUTE_LIST_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.intAttributeList.size()));
            for (int _iter23 : struct.intAttributeList)
            {
              oprot.writeI32(_iter23);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.longAttributeList != null) {
        if (struct.isSetLongAttributeList()) {
          oprot.writeFieldBegin(LONG_ATTRIBUTE_LIST_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.longAttributeList.size()));
            for (long _iter24 : struct.longAttributeList)
            {
              oprot.writeI64(_iter24);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.doubleAttributeList != null) {
        if (struct.isSetDoubleAttributeList()) {
          oprot.writeFieldBegin(DOUBLE_ATTRIBUTE_LIST_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, struct.doubleAttributeList.size()));
            for (double _iter25 : struct.doubleAttributeList)
            {
              oprot.writeDouble(_iter25);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.boolAttributeList != null) {
        if (struct.isSetBoolAttributeList()) {
          oprot.writeFieldBegin(BOOL_ATTRIBUTE_LIST_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, struct.boolAttributeList.size()));
            for (boolean _iter26 : struct.boolAttributeList)
            {
              oprot.writeBool(_iter26);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.stringAttributeList != null) {
        if (struct.isSetStringAttributeList()) {
          oprot.writeFieldBegin(STRING_ATTRIBUTE_LIST_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.stringAttributeList.size()));
            for (java.lang.String _iter27 : struct.stringAttributeList)
            {
              oprot.writeString(_iter27);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.arbitraryDataMapMap != null) {
        if (struct.isSetArbitraryDataMapMap()) {
          oprot.writeFieldBegin(ARBITRARY_DATA_MAP_MAP_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.MAP, struct.arbitraryDataMapMap.size()));
            for (java.util.Map.Entry<java.lang.Integer, java.util.Map<java.lang.String,java.lang.String>> _iter28 : struct.arbitraryDataMapMap.entrySet())
            {
              oprot.writeI32(_iter28.getKey());
              {
                oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter28.getValue().size()));
                for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter29 : _iter28.getValue().entrySet())
                {
                  oprot.writeString(_iter29.getKey());
                  oprot.writeString(_iter29.getValue());
                }
                oprot.writeMapEnd();
              }
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class ThriftEventBundleTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public ThriftEventBundleTupleScheme getScheme() {
      return new ThriftEventBundleTupleScheme();
    }
  }

  private static class ThriftEventBundleTupleScheme extends org.apache.thrift.scheme.TupleScheme<ThriftEventBundle> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, ThriftEventBundle struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetSessionId()) {
        optionals.set(0);
      }
      if (struct.isSetEventNum()) {
        optionals.set(1);
      }
      if (struct.isSetIntAttributeList()) {
        optionals.set(2);
      }
      if (struct.isSetLongAttributeList()) {
        optionals.set(3);
      }
      if (struct.isSetDoubleAttributeList()) {
        optionals.set(4);
      }
      if (struct.isSetBoolAttributeList()) {
        optionals.set(5);
      }
      if (struct.isSetStringAttributeList()) {
        optionals.set(6);
      }
      if (struct.isSetArbitraryDataMapMap()) {
        optionals.set(7);
      }
      oprot.writeBitSet(optionals, 8);
      if (struct.isSetSessionId()) {
        oprot.writeString(struct.sessionId);
      }
      if (struct.isSetEventNum()) {
        oprot.writeI32(struct.eventNum);
      }
      if (struct.isSetIntAttributeList()) {
        {
          oprot.writeI32(struct.intAttributeList.size());
          for (int _iter30 : struct.intAttributeList)
          {
            oprot.writeI32(_iter30);
          }
        }
      }
      if (struct.isSetLongAttributeList()) {
        {
          oprot.writeI32(struct.longAttributeList.size());
          for (long _iter31 : struct.longAttributeList)
          {
            oprot.writeI64(_iter31);
          }
        }
      }
      if (struct.isSetDoubleAttributeList()) {
        {
          oprot.writeI32(struct.doubleAttributeList.size());
          for (double _iter32 : struct.doubleAttributeList)
          {
            oprot.writeDouble(_iter32);
          }
        }
      }
      if (struct.isSetBoolAttributeList()) {
        {
          oprot.writeI32(struct.boolAttributeList.size());
          for (boolean _iter33 : struct.boolAttributeList)
          {
            oprot.writeBool(_iter33);
          }
        }
      }
      if (struct.isSetStringAttributeList()) {
        {
          oprot.writeI32(struct.stringAttributeList.size());
          for (java.lang.String _iter34 : struct.stringAttributeList)
          {
            oprot.writeString(_iter34);
          }
        }
      }
      if (struct.isSetArbitraryDataMapMap()) {
        {
          oprot.writeI32(struct.arbitraryDataMapMap.size());
          for (java.util.Map.Entry<java.lang.Integer, java.util.Map<java.lang.String,java.lang.String>> _iter35 : struct.arbitraryDataMapMap.entrySet())
          {
            oprot.writeI32(_iter35.getKey());
            {
              oprot.writeI32(_iter35.getValue().size());
              for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter36 : _iter35.getValue().entrySet())
              {
                oprot.writeString(_iter36.getKey());
                oprot.writeString(_iter36.getValue());
              }
            }
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, ThriftEventBundle struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(8);
      if (incoming.get(0)) {
        struct.sessionId = iprot.readString();
        struct.setSessionIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.eventNum = iprot.readI32();
        struct.setEventNumIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.thrift.protocol.TList _list37 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
          struct.intAttributeList = new java.util.ArrayList<java.lang.Integer>(_list37.size);
          int _elem38;
          for (int _i39 = 0; _i39 < _list37.size; ++_i39)
          {
            _elem38 = iprot.readI32();
            struct.intAttributeList.add(_elem38);
          }
        }
        struct.setIntAttributeListIsSet(true);
      }
      if (incoming.get(3)) {
        {
          org.apache.thrift.protocol.TList _list40 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
          struct.longAttributeList = new java.util.ArrayList<java.lang.Long>(_list40.size);
          long _elem41;
          for (int _i42 = 0; _i42 < _list40.size; ++_i42)
          {
            _elem41 = iprot.readI64();
            struct.longAttributeList.add(_elem41);
          }
        }
        struct.setLongAttributeListIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.thrift.protocol.TList _list43 = iprot.readListBegin(org.apache.thrift.protocol.TType.DOUBLE);
          struct.doubleAttributeList = new java.util.ArrayList<java.lang.Double>(_list43.size);
          double _elem44;
          for (int _i45 = 0; _i45 < _list43.size; ++_i45)
          {
            _elem44 = iprot.readDouble();
            struct.doubleAttributeList.add(_elem44);
          }
        }
        struct.setDoubleAttributeListIsSet(true);
      }
      if (incoming.get(5)) {
        {
          org.apache.thrift.protocol.TList _list46 = iprot.readListBegin(org.apache.thrift.protocol.TType.BOOL);
          struct.boolAttributeList = new java.util.ArrayList<java.lang.Boolean>(_list46.size);
          boolean _elem47;
          for (int _i48 = 0; _i48 < _list46.size; ++_i48)
          {
            _elem47 = iprot.readBool();
            struct.boolAttributeList.add(_elem47);
          }
        }
        struct.setBoolAttributeListIsSet(true);
      }
      if (incoming.get(6)) {
        {
          org.apache.thrift.protocol.TList _list49 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.stringAttributeList = new java.util.ArrayList<java.lang.String>(_list49.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem50;
          for (int _i51 = 0; _i51 < _list49.size; ++_i51)
          {
            _elem50 = iprot.readString();
            struct.stringAttributeList.add(_elem50);
          }
        }
        struct.setStringAttributeListIsSet(true);
      }
      if (incoming.get(7)) {
        {
          org.apache.thrift.protocol.TMap _map52 = iprot.readMapBegin(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.MAP); 
          struct.arbitraryDataMapMap = new java.util.HashMap<java.lang.Integer,java.util.Map<java.lang.String,java.lang.String>>(2*_map52.size);
          int _key53;
          @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> _val54;
          for (int _i55 = 0; _i55 < _map52.size; ++_i55)
          {
            _key53 = iprot.readI32();
            {
              org.apache.thrift.protocol.TMap _map56 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); 
              _val54 = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map56.size);
              @org.apache.thrift.annotation.Nullable java.lang.String _key57;
              @org.apache.thrift.annotation.Nullable java.lang.String _val58;
              for (int _i59 = 0; _i59 < _map56.size; ++_i59)
              {
                _key57 = iprot.readString();
                _val58 = iprot.readString();
                _val54.put(_key57, _val58);
              }
            }
            struct.arbitraryDataMapMap.put(_key53, _val54);
          }
        }
        struct.setArbitraryDataMapMapIsSet(true);
      }
    }
  }

  private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
    return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
  }
}

