#
# Autogenerated by Thrift Compiler (0.9.1)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
#  options string: py:new_style
#

from thrift.Thrift import TType, TMessageType, TException, TApplicationException

from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
  from thrift.protocol import fastbinary
except:
  fastbinary = None


class TalkExceptionCode(object):
  ILLEGAL_ARGUMENT = 0
  AUTHENTICATION_FAILED = 1
  DB_FAILED = 2
  INVALID_STATE = 3
  EXCESSIVE_ACCESS = 4
  NOT_FOUND = 5
  INVALID_MID = 9
  NOT_A_MEMBER = 10
  INVALID_LENGTH = 6
  NOT_AVAILABLE_USER = 7
  NOT_AUTHORIZED_DEVICE = 8
  NOT_AUTHORIZED_SESSION = 14
  INCOMPATIBLE_APP_VERSION = 11
  NOT_READY = 12
  NOT_AVAILABLE_SESSION = 13
  SYSTEM_ERROR = 15
  NO_AVAILABLE_VERIFICATION_METHOD = 16
  NOT_AUTHENTICATED = 17
  INVALID_IDENTITY_CREDENTIAL = 18
  NOT_AVAILABLE_IDENTITY_IDENTIFIER = 19
  INTERNAL_ERROR = 20
  NO_SUCH_IDENTITY_IDENFIER = 21
  DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY = 22
  ILLEGAL_IDENTITY_CREDENTIAL = 23
  UNKNOWN_CHANNEL = 24
  NO_SUCH_MESSAGE_BOX = 25
  NOT_AVAILABLE_MESSAGE_BOX = 26
  CHANNEL_DOES_NOT_MATCH = 27
  NOT_YOUR_MESSAGE = 28
  MESSAGE_DEFINED_ERROR = 29
  USER_CANNOT_ACCEPT_PRESENTS = 30
  USER_NOT_STICKER_OWNER = 32
  MAINTENANCE_ERROR = 33
  ACCOUNT_NOT_MATCHED = 34
  ABUSE_BLOCK = 35
  NOT_FRIEND = 36
  NOT_ALLOWED_CALL = 37
  BLOCK_FRIEND = 38
  INCOMPATIBLE_VOIP_VERSION = 39
  INVALID_SNS_ACCESS_TOKEN = 40
  EXTERNAL_SERVICE_NOT_AVAILABLE = 41
  NOT_ALLOWED_ADD_CONTACT = 42
  NOT_CERTIFICATED = 43
  NOT_ALLOWED_SECONDARY_DEVICE = 44
  INVALID_PIN_CODE = 45
  NOT_FOUND_IDENTITY_CREDENTIAL = 46
  EXCEED_FILE_MAX_SIZE = 47
  EXCEED_DAILY_QUOTA = 48
  NOT_SUPPORT_SEND_FILE = 49
  MUST_UPGRADE = 50
  NOT_AVAILABLE_PIN_CODE_SESSION = 51

  _VALUES_TO_NAMES = {
    0: "ILLEGAL_ARGUMENT",
    1: "AUTHENTICATION_FAILED",
    2: "DB_FAILED",
    3: "INVALID_STATE",
    4: "EXCESSIVE_ACCESS",
    5: "NOT_FOUND",
    9: "INVALID_MID",
    10: "NOT_A_MEMBER",
    6: "INVALID_LENGTH",
    7: "NOT_AVAILABLE_USER",
    8: "NOT_AUTHORIZED_DEVICE",
    14: "NOT_AUTHORIZED_SESSION",
    11: "INCOMPATIBLE_APP_VERSION",
    12: "NOT_READY",
    13: "NOT_AVAILABLE_SESSION",
    15: "SYSTEM_ERROR",
    16: "NO_AVAILABLE_VERIFICATION_METHOD",
    17: "NOT_AUTHENTICATED",
    18: "INVALID_IDENTITY_CREDENTIAL",
    19: "NOT_AVAILABLE_IDENTITY_IDENTIFIER",
    20: "INTERNAL_ERROR",
    21: "NO_SUCH_IDENTITY_IDENFIER",
    22: "DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY",
    23: "ILLEGAL_IDENTITY_CREDENTIAL",
    24: "UNKNOWN_CHANNEL",
    25: "NO_SUCH_MESSAGE_BOX",
    26: "NOT_AVAILABLE_MESSAGE_BOX",
    27: "CHANNEL_DOES_NOT_MATCH",
    28: "NOT_YOUR_MESSAGE",
    29: "MESSAGE_DEFINED_ERROR",
    30: "USER_CANNOT_ACCEPT_PRESENTS",
    32: "USER_NOT_STICKER_OWNER",
    33: "MAINTENANCE_ERROR",
    34: "ACCOUNT_NOT_MATCHED",
    35: "ABUSE_BLOCK",
    36: "NOT_FRIEND",
    37: "NOT_ALLOWED_CALL",
    38: "BLOCK_FRIEND",
    39: "INCOMPATIBLE_VOIP_VERSION",
    40: "INVALID_SNS_ACCESS_TOKEN",
    41: "EXTERNAL_SERVICE_NOT_AVAILABLE",
    42: "NOT_ALLOWED_ADD_CONTACT",
    43: "NOT_CERTIFICATED",
    44: "NOT_ALLOWED_SECONDARY_DEVICE",
    45: "INVALID_PIN_CODE",
    46: "NOT_FOUND_IDENTITY_CREDENTIAL",
    47: "EXCEED_FILE_MAX_SIZE",
    48: "EXCEED_DAILY_QUOTA",
    49: "NOT_SUPPORT_SEND_FILE",
    50: "MUST_UPGRADE",
    51: "NOT_AVAILABLE_PIN_CODE_SESSION",
  }

  _NAMES_TO_VALUES = {
    "ILLEGAL_ARGUMENT": 0,
    "AUTHENTICATION_FAILED": 1,
    "DB_FAILED": 2,
    "INVALID_STATE": 3,
    "EXCESSIVE_ACCESS": 4,
    "NOT_FOUND": 5,
    "INVALID_MID": 9,
    "NOT_A_MEMBER": 10,
    "INVALID_LENGTH": 6,
    "NOT_AVAILABLE_USER": 7,
    "NOT_AUTHORIZED_DEVICE": 8,
    "NOT_AUTHORIZED_SESSION": 14,
    "INCOMPATIBLE_APP_VERSION": 11,
    "NOT_READY": 12,
    "NOT_AVAILABLE_SESSION": 13,
    "SYSTEM_ERROR": 15,
    "NO_AVAILABLE_VERIFICATION_METHOD": 16,
    "NOT_AUTHENTICATED": 17,
    "INVALID_IDENTITY_CREDENTIAL": 18,
    "NOT_AVAILABLE_IDENTITY_IDENTIFIER": 19,
    "INTERNAL_ERROR": 20,
    "NO_SUCH_IDENTITY_IDENFIER": 21,
    "DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY": 22,
    "ILLEGAL_IDENTITY_CREDENTIAL": 23,
    "UNKNOWN_CHANNEL": 24,
    "NO_SUCH_MESSAGE_BOX": 25,
    "NOT_AVAILABLE_MESSAGE_BOX": 26,
    "CHANNEL_DOES_NOT_MATCH": 27,
    "NOT_YOUR_MESSAGE": 28,
    "MESSAGE_DEFINED_ERROR": 29,
    "USER_CANNOT_ACCEPT_PRESENTS": 30,
    "USER_NOT_STICKER_OWNER": 32,
    "MAINTENANCE_ERROR": 33,
    "ACCOUNT_NOT_MATCHED": 34,
    "ABUSE_BLOCK": 35,
    "NOT_FRIEND": 36,
    "NOT_ALLOWED_CALL": 37,
    "BLOCK_FRIEND": 38,
    "INCOMPATIBLE_VOIP_VERSION": 39,
    "INVALID_SNS_ACCESS_TOKEN": 40,
    "EXTERNAL_SERVICE_NOT_AVAILABLE": 41,
    "NOT_ALLOWED_ADD_CONTACT": 42,
    "NOT_CERTIFICATED": 43,
    "NOT_ALLOWED_SECONDARY_DEVICE": 44,
    "INVALID_PIN_CODE": 45,
    "NOT_FOUND_IDENTITY_CREDENTIAL": 46,
    "EXCEED_FILE_MAX_SIZE": 47,
    "EXCEED_DAILY_QUOTA": 48,
    "NOT_SUPPORT_SEND_FILE": 49,
    "MUST_UPGRADE": 50,
    "NOT_AVAILABLE_PIN_CODE_SESSION": 51,
  }

class ToType(object):
  USER = 0
  ROOM = 1
  GROUP = 2

  _VALUES_TO_NAMES = {
    0: "USER",
    1: "ROOM",
    2: "GROUP",
  }

  _NAMES_TO_VALUES = {
    "USER": 0,
    "ROOM": 1,
    "GROUP": 2,
  }

class ContentType(object):
  NONE = 0
  IMAGE = 1
  VIDEO = 2
  AUDIO = 3
  HTML = 4
  PDF = 5
  CALL = 6
  STICKER = 7
  PRESENCE = 8
  GIFT = 9
  GROUBOARD = 10
  APPLINK = 11

  _VALUES_TO_NAMES = {
    0: "NONE",
    1: "IMAGE",
    2: "VIDEO",
    3: "AUDIO",
    4: "HTML",
    5: "PDF",
    6: "CALL",
    7: "STICKER",
    8: "PRESENCE",
    9: "GIFT",
    10: "GROUBOARD",
    11: "APPLINK",
  }

  _NAMES_TO_VALUES = {
    "NONE": 0,
    "IMAGE": 1,
    "VIDEO": 2,
    "AUDIO": 3,
    "HTML": 4,
    "PDF": 5,
    "CALL": 6,
    "STICKER": 7,
    "PRESENCE": 8,
    "GIFT": 9,
    "GROUBOARD": 10,
    "APPLINK": 11,
  }

class OperationType(object):
  END_OF_OPERATION = 0
  UPDATE_PROFILE = 1
  UPDATE_SETTINGS = 36
  NOTIFIED_UPDATE_PROFILE = 2
  REGISTER_USERID = 3
  ADD_CONTACT = 4
  NOTIFIED_ADD_CONTACT = 5
  BLOCK_CONTACT = 6
  UNBLOCK_CONTACT = 7
  NOTIFIED_RECOMMEND_CONTACT = 8
  CREATE_GROUP = 9
  UPDATE_GROUP = 10
  NOTIFIED_UPDATE_GROUP = 11
  INVITE_INTO_GROUP = 12
  NOTIFIED_INVITE_INTO_GROUP = 13
  CANCEL_INVITATION_GROUP = 31
  NOTIFIED_CANCEL_INVITATION_GROUP = 32
  LEAVE_GROUP = 14
  NOTIFIED_LEAVE_GROUP = 15
  ACCEPT_GROUP_INVITATION = 16
  NOTIFIED_ACCEPT_GROUP_INVITATION = 17
  REJECT_GROUP_INVITATION = 34
  NOTIFIED_REJECT_GROUP_INVITATION = 35
  KICKOUT_FROM_GROUP = 18
  NOTIFIED_KICKOUT_FROM_GROUP = 19
  CREATE_ROOM = 20
  INVITE_INTO_ROOM = 21
  NOTIFIED_INVITE_INTO_ROOM = 22
  LEAVE_ROOM = 23
  NOTIFIED_LEAVE_ROOM = 24
  SEND_MESSAGE = 25
  RECEIVE_MESSAGE = 26
  SEND_MESSAGE_RECEIPT = 27
  RECEIVE_MESSAGE_RECEIPT = 28
  SEND_CONTENT_RECEIPT = 29
  SEND_CHAT_CHECKED = 40
  SEND_CHAT_REMOVED = 41
  RECEIVE_ANNOUNCEMENT = 30
  INVITE_VIA_EMAIL = 38
  NOTIFIED_REGISTER_USER = 37
  NOTIFIED_UNREGISTER_USER = 33
  NOTIFIED_REQUEST_RECOVERY = 39
  NOTIFIED_FORCE_SYNC = 42
  SEND_CONTENT = 43
  SEND_MESSAGE_MYHOME = 44
  NOTIFIED_UPDATE_CONTENT_PREVIEW = 45
  REMOVE_ALL_MESSAGES = 46
  NOTIFIED_UPDATE_PURCHASES = 47
  DUMMY = 48
  UPDATE_CONTACT = 49
  NOTIFIED_RECEIVED_CALL = 50
  CANCEL_CALL = 51
  NOTIFIED_REDIRECT = 52
  NOTIFIED_CHANNEL_SYNC = 53
  FAILED_SEND_MESSAGE = 54
  NOTIFIED_READ_MESSAGE = 55
  FAILED_EMAIL_CONFIRMATION = 56
  NOTIFIED_PUSH_NOTICENTER_ITEM = 59
  NOTIFIED_CHAT_CONTENT = 58

  _VALUES_TO_NAMES = {
    0: "END_OF_OPERATION",
    1: "UPDATE_PROFILE",
    36: "UPDATE_SETTINGS",
    2: "NOTIFIED_UPDATE_PROFILE",
    3: "REGISTER_USERID",
    4: "ADD_CONTACT",
    5: "NOTIFIED_ADD_CONTACT",
    6: "BLOCK_CONTACT",
    7: "UNBLOCK_CONTACT",
    8: "NOTIFIED_RECOMMEND_CONTACT",
    9: "CREATE_GROUP",
    10: "UPDATE_GROUP",
    11: "NOTIFIED_UPDATE_GROUP",
    12: "INVITE_INTO_GROUP",
    13: "NOTIFIED_INVITE_INTO_GROUP",
    31: "CANCEL_INVITATION_GROUP",
    32: "NOTIFIED_CANCEL_INVITATION_GROUP",
    14: "LEAVE_GROUP",
    15: "NOTIFIED_LEAVE_GROUP",
    16: "ACCEPT_GROUP_INVITATION",
    17: "NOTIFIED_ACCEPT_GROUP_INVITATION",
    34: "REJECT_GROUP_INVITATION",
    35: "NOTIFIED_REJECT_GROUP_INVITATION",
    18: "KICKOUT_FROM_GROUP",
    19: "NOTIFIED_KICKOUT_FROM_GROUP",
    20: "CREATE_ROOM",
    21: "INVITE_INTO_ROOM",
    22: "NOTIFIED_INVITE_INTO_ROOM",
    23: "LEAVE_ROOM",
    24: "NOTIFIED_LEAVE_ROOM",
    25: "SEND_MESSAGE",
    26: "RECEIVE_MESSAGE",
    27: "SEND_MESSAGE_RECEIPT",
    28: "RECEIVE_MESSAGE_RECEIPT",
    29: "SEND_CONTENT_RECEIPT",
    40: "SEND_CHAT_CHECKED",
    41: "SEND_CHAT_REMOVED",
    30: "RECEIVE_ANNOUNCEMENT",
    38: "INVITE_VIA_EMAIL",
    37: "NOTIFIED_REGISTER_USER",
    33: "NOTIFIED_UNREGISTER_USER",
    39: "NOTIFIED_REQUEST_RECOVERY",
    42: "NOTIFIED_FORCE_SYNC",
    43: "SEND_CONTENT",
    44: "SEND_MESSAGE_MYHOME",
    45: "NOTIFIED_UPDATE_CONTENT_PREVIEW",
    46: "REMOVE_ALL_MESSAGES",
    47: "NOTIFIED_UPDATE_PURCHASES",
    48: "DUMMY",
    49: "UPDATE_CONTACT",
    50: "NOTIFIED_RECEIVED_CALL",
    51: "CANCEL_CALL",
    52: "NOTIFIED_REDIRECT",
    53: "NOTIFIED_CHANNEL_SYNC",
    54: "FAILED_SEND_MESSAGE",
    55: "NOTIFIED_READ_MESSAGE",
    56: "FAILED_EMAIL_CONFIRMATION",
    59: "NOTIFIED_PUSH_NOTICENTER_ITEM",
    58: "NOTIFIED_CHAT_CONTENT",
  }

  _NAMES_TO_VALUES = {
    "END_OF_OPERATION": 0,
    "UPDATE_PROFILE": 1,
    "UPDATE_SETTINGS": 36,
    "NOTIFIED_UPDATE_PROFILE": 2,
    "REGISTER_USERID": 3,
    "ADD_CONTACT": 4,
    "NOTIFIED_ADD_CONTACT": 5,
    "BLOCK_CONTACT": 6,
    "UNBLOCK_CONTACT": 7,
    "NOTIFIED_RECOMMEND_CONTACT": 8,
    "CREATE_GROUP": 9,
    "UPDATE_GROUP": 10,
    "NOTIFIED_UPDATE_GROUP": 11,
    "INVITE_INTO_GROUP": 12,
    "NOTIFIED_INVITE_INTO_GROUP": 13,
    "CANCEL_INVITATION_GROUP": 31,
    "NOTIFIED_CANCEL_INVITATION_GROUP": 32,
    "LEAVE_GROUP": 14,
    "NOTIFIED_LEAVE_GROUP": 15,
    "ACCEPT_GROUP_INVITATION": 16,
    "NOTIFIED_ACCEPT_GROUP_INVITATION": 17,
    "REJECT_GROUP_INVITATION": 34,
    "NOTIFIED_REJECT_GROUP_INVITATION": 35,
    "KICKOUT_FROM_GROUP": 18,
    "NOTIFIED_KICKOUT_FROM_GROUP": 19,
    "CREATE_ROOM": 20,
    "INVITE_INTO_ROOM": 21,
    "NOTIFIED_INVITE_INTO_ROOM": 22,
    "LEAVE_ROOM": 23,
    "NOTIFIED_LEAVE_ROOM": 24,
    "SEND_MESSAGE": 25,
    "RECEIVE_MESSAGE": 26,
    "SEND_MESSAGE_RECEIPT": 27,
    "RECEIVE_MESSAGE_RECEIPT": 28,
    "SEND_CONTENT_RECEIPT": 29,
    "SEND_CHAT_CHECKED": 40,
    "SEND_CHAT_REMOVED": 41,
    "RECEIVE_ANNOUNCEMENT": 30,
    "INVITE_VIA_EMAIL": 38,
    "NOTIFIED_REGISTER_USER": 37,
    "NOTIFIED_UNREGISTER_USER": 33,
    "NOTIFIED_REQUEST_RECOVERY": 39,
    "NOTIFIED_FORCE_SYNC": 42,
    "SEND_CONTENT": 43,
    "SEND_MESSAGE_MYHOME": 44,
    "NOTIFIED_UPDATE_CONTENT_PREVIEW": 45,
    "REMOVE_ALL_MESSAGES": 46,
    "NOTIFIED_UPDATE_PURCHASES": 47,
    "DUMMY": 48,
    "UPDATE_CONTACT": 49,
    "NOTIFIED_RECEIVED_CALL": 50,
    "CANCEL_CALL": 51,
    "NOTIFIED_REDIRECT": 52,
    "NOTIFIED_CHANNEL_SYNC": 53,
    "FAILED_SEND_MESSAGE": 54,
    "NOTIFIED_READ_MESSAGE": 55,
    "FAILED_EMAIL_CONFIRMATION": 56,
    "NOTIFIED_PUSH_NOTICENTER_ITEM": 59,
    "NOTIFIED_CHAT_CONTENT": 58,
  }

class OperationStatus(object):
  NORMAL = 1
  ALERT_DISABLED = 1

  _VALUES_TO_NAMES = {
    1: "NORMAL",
    1: "ALERT_DISABLED",
  }

  _NAMES_TO_VALUES = {
    "NORMAL": 1,
    "ALERT_DISABLED": 1,
  }

class Provider(object):
  UNKNOWN = 0
  LINE = 1
  NAVER_KR = 2

  _VALUES_TO_NAMES = {
    0: "UNKNOWN",
    1: "LINE",
    2: "NAVER_KR",
  }

  _NAMES_TO_VALUES = {
    "UNKNOWN": 0,
    "LINE": 1,
    "NAVER_KR": 2,
  }

class LoginResultType(object):
  SUCCESS = 1
  REQUIRE_QRCODE = 2
  REQUIRE_DEVICE_CONFIRM = 3

  _VALUES_TO_NAMES = {
    1: "SUCCESS",
    2: "REQUIRE_QRCODE",
    3: "REQUIRE_DEVICE_CONFIRM",
  }

  _NAMES_TO_VALUES = {
    "SUCCESS": 1,
    "REQUIRE_QRCODE": 2,
    "REQUIRE_DEVICE_CONFIRM": 3,
  }

class ContactType(object):
  MID = 0
  PHONE = 1
  EMAIL = 2
  USERID = 3
  PROXIMITY = 4
  GROUP = 5
  USER = 6
  QRCODE = 7
  PROMOTION_BOT = 8

  _VALUES_TO_NAMES = {
    0: "MID",
    1: "PHONE",
    2: "EMAIL",
    3: "USERID",
    4: "PROXIMITY",
    5: "GROUP",
    6: "USER",
    7: "QRCODE",
    8: "PROMOTION_BOT",
  }

  _NAMES_TO_VALUES = {
    "MID": 0,
    "PHONE": 1,
    "EMAIL": 2,
    "USERID": 3,
    "PROXIMITY": 4,
    "GROUP": 5,
    "USER": 6,
    "QRCODE": 7,
    "PROMOTION_BOT": 8,
  }

class ContactStatus(object):
  UNSPECIFIED = 0
  FRIEND = 1
  FRIEND_BLOCKED = 2
  RECOMMEND = 3
  RECOMMEND_BLOCKED = 4
  DELETED = 5
  DELETED_BLOCKED = 6

  _VALUES_TO_NAMES = {
    0: "UNSPECIFIED",
    1: "FRIEND",
    2: "FRIEND_BLOCKED",
    3: "RECOMMEND",
    4: "RECOMMEND_BLOCKED",
    5: "DELETED",
    6: "DELETED_BLOCKED",
  }

  _NAMES_TO_VALUES = {
    "UNSPECIFIED": 0,
    "FRIEND": 1,
    "FRIEND_BLOCKED": 2,
    "RECOMMEND": 3,
    "RECOMMEND_BLOCKED": 4,
    "DELETED": 5,
    "DELETED_BLOCKED": 6,
  }

class ContactRelation(object):
  ONEWAY = 0
  BOTH = 1
  NOT_REGISTERED = 2

  _VALUES_TO_NAMES = {
    0: "ONEWAY",
    1: "BOTH",
    2: "NOT_REGISTERED",
  }

  _NAMES_TO_VALUES = {
    "ONEWAY": 0,
    "BOTH": 1,
    "NOT_REGISTERED": 2,
  }

class ContactSettingsFlags(object):
  CONTACT_SETTING_NOTIFICATION_DISABLE = 1
  CONTACT_SETTING_DISPLAY_NAME_OVERRIDE = 2
  CONTACT_SETTING_CONTACT_HIDE = 4
  CONTACT_SETTING_FAVORITE = 8
  CONTACT_SETTING_DELETE = 16

  _VALUES_TO_NAMES = {
    1: "CONTACT_SETTING_NOTIFICATION_DISABLE",
    2: "CONTACT_SETTING_DISPLAY_NAME_OVERRIDE",
    4: "CONTACT_SETTING_CONTACT_HIDE",
    8: "CONTACT_SETTING_FAVORITE",
    16: "CONTACT_SETTING_DELETE",
  }

  _NAMES_TO_VALUES = {
    "CONTACT_SETTING_NOTIFICATION_DISABLE": 1,
    "CONTACT_SETTING_DISPLAY_NAME_OVERRIDE": 2,
    "CONTACT_SETTING_CONTACT_HIDE": 4,
    "CONTACT_SETTING_FAVORITE": 8,
    "CONTACT_SETTING_DELETE": 16,
  }


class TalkException(TException):
  """
  Attributes:
   - code
   - reason
   - parameterMap
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'code', None, None, ), # 1
    (2, TType.STRING, 'reason', None, None, ), # 2
    (3, TType.MAP, 'parameterMap', (TType.STRING,None,TType.STRING,None), None, ), # 3
  )

  def __init__(self, code=None, reason=None, parameterMap=None,):
    self.code = code
    self.reason = reason
    self.parameterMap = parameterMap

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I32:
          self.code = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.reason = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.parameterMap = {}
          (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin()
          for _i4 in xrange(_size0):
            _key5 = iprot.readString();
            _val6 = iprot.readString();
            self.parameterMap[_key5] = _val6
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TalkException')
    if self.code is not None:
      oprot.writeFieldBegin('code', TType.I32, 1)
      oprot.writeI32(self.code)
      oprot.writeFieldEnd()
    if self.reason is not None:
      oprot.writeFieldBegin('reason', TType.STRING, 2)
      oprot.writeString(self.reason)
      oprot.writeFieldEnd()
    if self.parameterMap is not None:
      oprot.writeFieldBegin('parameterMap', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameterMap))
      for kiter7,viter8 in self.parameterMap.items():
        oprot.writeString(kiter7)
        oprot.writeString(viter8)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class Location(object):
  """
  Attributes:
   - title
   - address
   - latitude
   - longitude
   - phone
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'title', None, None, ), # 1
    (2, TType.STRING, 'address', None, None, ), # 2
    (3, TType.DOUBLE, 'latitude', None, None, ), # 3
    (4, TType.DOUBLE, 'longitude', None, None, ), # 4
    (5, TType.STRING, 'phone', None, None, ), # 5
  )

  def __init__(self, title=None, address=None, latitude=None, longitude=None, phone=None,):
    self.title = title
    self.address = address
    self.latitude = latitude
    self.longitude = longitude
    self.phone = phone

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.title = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.address = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.DOUBLE:
          self.latitude = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.DOUBLE:
          self.longitude = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.phone = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Location')
    if self.title is not None:
      oprot.writeFieldBegin('title', TType.STRING, 1)
      oprot.writeString(self.title)
      oprot.writeFieldEnd()
    if self.address is not None:
      oprot.writeFieldBegin('address', TType.STRING, 2)
      oprot.writeString(self.address)
      oprot.writeFieldEnd()
    if self.latitude is not None:
      oprot.writeFieldBegin('latitude', TType.DOUBLE, 3)
      oprot.writeDouble(self.latitude)
      oprot.writeFieldEnd()
    if self.longitude is not None:
      oprot.writeFieldBegin('longitude', TType.DOUBLE, 4)
      oprot.writeDouble(self.longitude)
      oprot.writeFieldEnd()
    if self.phone is not None:
      oprot.writeFieldBegin('phone', TType.STRING, 5)
      oprot.writeString(self.phone)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class Message(object):
  """
  Attributes:
   - _from
   - to
   - toType
   - id
   - createdTime
   - deliveredTime
   - text
   - location
   - hasContent
   - contentType
   - contentPreview
   - contentMetadata
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, '_from', None, None, ), # 1
    (2, TType.STRING, 'to', None, None, ), # 2
    (3, TType.I32, 'toType', None, None, ), # 3
    (4, TType.STRING, 'id', None, None, ), # 4
    (5, TType.I64, 'createdTime', None, None, ), # 5
    (6, TType.I64, 'deliveredTime', None, None, ), # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.STRING, 'text', None, None, ), # 10
    (11, TType.STRUCT, 'location', (Location, Location.thrift_spec), None, ), # 11
    None, # 12
    None, # 13
    (14, TType.BOOL, 'hasContent', None, None, ), # 14
    (15, TType.I32, 'contentType', None, None, ), # 15
    None, # 16
    (17, TType.STRING, 'contentPreview', None, None, ), # 17
    (18, TType.MAP, 'contentMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 18
  )

  def __init__(self, _from=None, to=None, toType=None, id=None, createdTime=None, deliveredTime=None, text=None, location=None, hasContent=None, contentType=None, contentPreview=None, contentMetadata=None,):
    self._from = _from
    self.to = to
    self.toType = toType
    self.id = id
    self.createdTime = createdTime
    self.deliveredTime = deliveredTime
    self.text = text
    self.location = location
    self.hasContent = hasContent
    self.contentType = contentType
    self.contentPreview = contentPreview
    self.contentMetadata = contentMetadata

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self._from = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.to = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.toType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.id = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.deliveredTime = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.text = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRUCT:
          self.location = Location()
          self.location.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.BOOL:
          self.hasContent = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.I32:
          self.contentType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.STRING:
          self.contentPreview = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.MAP:
          self.contentMetadata = {}
          (_ktype10, _vtype11, _size9 ) = iprot.readMapBegin()
          for _i13 in xrange(_size9):
            _key14 = iprot.readString();
            _val15 = iprot.readString();
            self.contentMetadata[_key14] = _val15
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Message')
    if self._from is not None:
      oprot.writeFieldBegin('_from', TType.STRING, 1)
      oprot.writeString(self._from)
      oprot.writeFieldEnd()
    if self.to is not None:
      oprot.writeFieldBegin('to', TType.STRING, 2)
      oprot.writeString(self.to)
      oprot.writeFieldEnd()
    if self.toType is not None:
      oprot.writeFieldBegin('toType', TType.I32, 3)
      oprot.writeI32(self.toType)
      oprot.writeFieldEnd()
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.STRING, 4)
      oprot.writeString(self.id)
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 5)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    if self.deliveredTime is not None:
      oprot.writeFieldBegin('deliveredTime', TType.I64, 6)
      oprot.writeI64(self.deliveredTime)
      oprot.writeFieldEnd()
    if self.text is not None:
      oprot.writeFieldBegin('text', TType.STRING, 10)
      oprot.writeString(self.text)
      oprot.writeFieldEnd()
    if self.location is not None:
      oprot.writeFieldBegin('location', TType.STRUCT, 11)
      self.location.write(oprot)
      oprot.writeFieldEnd()
    if self.hasContent is not None:
      oprot.writeFieldBegin('hasContent', TType.BOOL, 14)
      oprot.writeBool(self.hasContent)
      oprot.writeFieldEnd()
    if self.contentType is not None:
      oprot.writeFieldBegin('contentType', TType.I32, 15)
      oprot.writeI32(self.contentType)
      oprot.writeFieldEnd()
    if self.contentPreview is not None:
      oprot.writeFieldBegin('contentPreview', TType.STRING, 17)
      oprot.writeString(self.contentPreview)
      oprot.writeFieldEnd()
    if self.contentMetadata is not None:
      oprot.writeFieldBegin('contentMetadata', TType.MAP, 18)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.contentMetadata))
      for kiter16,viter17 in self.contentMetadata.items():
        oprot.writeString(kiter16)
        oprot.writeString(viter17)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class Operation(object):
  """
  Attributes:
   - revision
   - createdTime
   - type
   - reqSeq
   - checkSum
   - status
   - param1
   - param2
   - param3
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'revision', None, None, ), # 1
    (2, TType.I64, 'createdTime', None, None, ), # 2
    (3, TType.I32, 'type', None, None, ), # 3
    (4, TType.I32, 'reqSeq', None, None, ), # 4
    (5, TType.STRING, 'checkSum', None, None, ), # 5
    None, # 6
    (7, TType.I32, 'status', None, None, ), # 7
    None, # 8
    None, # 9
    (10, TType.STRING, 'param1', None, None, ), # 10
    (11, TType.STRING, 'param2', None, None, ), # 11
    (12, TType.STRING, 'param3', None, None, ), # 12
    None, # 13
    None, # 14
    None, # 15
    None, # 16
    None, # 17
    None, # 18
    None, # 19
    (20, TType.STRUCT, 'message', (Message, Message.thrift_spec), None, ), # 20
  )

  def __init__(self, revision=None, createdTime=None, type=None, reqSeq=None, checkSum=None, status=None, param1=None, param2=None, param3=None, message=None,):
    self.revision = revision
    self.createdTime = createdTime
    self.type = type
    self.reqSeq = reqSeq
    self.checkSum = checkSum
    self.status = status
    self.param1 = param1
    self.param2 = param2
    self.param3 = param3
    self.message = message

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.revision = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.type = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.reqSeq = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.checkSum = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.param1 = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.param2 = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.param3 = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.STRUCT:
          self.message = Message()
          self.message.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Operation')
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 1)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 2)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 3)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.reqSeq is not None:
      oprot.writeFieldBegin('reqSeq', TType.I32, 4)
      oprot.writeI32(self.reqSeq)
      oprot.writeFieldEnd()
    if self.checkSum is not None:
      oprot.writeFieldBegin('checkSum', TType.STRING, 5)
      oprot.writeString(self.checkSum)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 7)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.param1 is not None:
      oprot.writeFieldBegin('param1', TType.STRING, 10)
      oprot.writeString(self.param1)
      oprot.writeFieldEnd()
    if self.param2 is not None:
      oprot.writeFieldBegin('param2', TType.STRING, 11)
      oprot.writeString(self.param2)
      oprot.writeFieldEnd()
    if self.param3 is not None:
      oprot.writeFieldBegin('param3', TType.STRING, 12)
      oprot.writeString(self.param3)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRUCT, 20)
      self.message.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class LoginResult(object):
  """
  Attributes:
   - authToken
   - certificate
   - verifier
   - pinCode
   - type
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'authToken', None, None, ), # 1
    (2, TType.STRING, 'certificate', None, None, ), # 2
    (3, TType.STRING, 'verifier', None, None, ), # 3
    (4, TType.STRING, 'pinCode', None, None, ), # 4
    (5, TType.I32, 'type', None, None, ), # 5
  )

  def __init__(self, authToken=None, certificate=None, verifier=None, pinCode=None, type=None,):
    self.authToken = authToken
    self.certificate = certificate
    self.verifier = verifier
    self.pinCode = pinCode
    self.type = type

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.authToken = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.certificate = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.verifier = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.pinCode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.type = iprot.readI32();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('LoginResult')
    if self.authToken is not None:
      oprot.writeFieldBegin('authToken', TType.STRING, 1)
      oprot.writeString(self.authToken)
      oprot.writeFieldEnd()
    if self.certificate is not None:
      oprot.writeFieldBegin('certificate', TType.STRING, 2)
      oprot.writeString(self.certificate)
      oprot.writeFieldEnd()
    if self.verifier is not None:
      oprot.writeFieldBegin('verifier', TType.STRING, 3)
      oprot.writeString(self.verifier)
      oprot.writeFieldEnd()
    if self.pinCode is not None:
      oprot.writeFieldBegin('pinCode', TType.STRING, 4)
      oprot.writeString(self.pinCode)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 5)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class Profile(object):
  """
  Attributes:
   - mid
   - userid
   - phone
   - email
   - regionCode
   - displayName
   - phoneticName
   - pictureStatus
   - statusMessage
   - allowSearchByUserid
   - allowSearchByEmail
   - picturePath
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    None, # 2
    (3, TType.STRING, 'userid', None, None, ), # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.STRING, 'phone', None, None, ), # 10
    (11, TType.STRING, 'email', None, None, ), # 11
    (12, TType.STRING, 'regionCode', None, None, ), # 12
    None, # 13
    None, # 14
    None, # 15
    None, # 16
    None, # 17
    None, # 18
    None, # 19
    (20, TType.STRING, 'displayName', None, None, ), # 20
    (21, TType.STRING, 'phoneticName', None, None, ), # 21
    (22, TType.STRING, 'pictureStatus', None, None, ), # 22
    None, # 23
    (24, TType.STRING, 'statusMessage', None, None, ), # 24
    None, # 25
    None, # 26
    None, # 27
    None, # 28
    None, # 29
    None, # 30
    (31, TType.BOOL, 'allowSearchByUserid', None, None, ), # 31
    (32, TType.BOOL, 'allowSearchByEmail', None, None, ), # 32
    (33, TType.STRING, 'picturePath', None, None, ), # 33
  )

  def __init__(self, mid=None, userid=None, phone=None, email=None, regionCode=None, displayName=None, phoneticName=None, pictureStatus=None, statusMessage=None, allowSearchByUserid=None, allowSearchByEmail=None, picturePath=None,):
    self.mid = mid
    self.userid = userid
    self.phone = phone
    self.email = email
    self.regionCode = regionCode
    self.displayName = displayName
    self.phoneticName = phoneticName
    self.pictureStatus = pictureStatus
    self.statusMessage = statusMessage
    self.allowSearchByUserid = allowSearchByUserid
    self.allowSearchByEmail = allowSearchByEmail
    self.picturePath = picturePath

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.mid = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.userid = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.phone = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.email = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.regionCode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.STRING:
          self.displayName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.STRING:
          self.phoneticName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRING:
          self.pictureStatus = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 24:
        if ftype == TType.STRING:
          self.statusMessage = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 31:
        if ftype == TType.BOOL:
          self.allowSearchByUserid = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 32:
        if ftype == TType.BOOL:
          self.allowSearchByEmail = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 33:
        if ftype == TType.STRING:
          self.picturePath = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Profile')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.userid is not None:
      oprot.writeFieldBegin('userid', TType.STRING, 3)
      oprot.writeString(self.userid)
      oprot.writeFieldEnd()
    if self.phone is not None:
      oprot.writeFieldBegin('phone', TType.STRING, 10)
      oprot.writeString(self.phone)
      oprot.writeFieldEnd()
    if self.email is not None:
      oprot.writeFieldBegin('email', TType.STRING, 11)
      oprot.writeString(self.email)
      oprot.writeFieldEnd()
    if self.regionCode is not None:
      oprot.writeFieldBegin('regionCode', TType.STRING, 12)
      oprot.writeString(self.regionCode)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 20)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.phoneticName is not None:
      oprot.writeFieldBegin('phoneticName', TType.STRING, 21)
      oprot.writeString(self.phoneticName)
      oprot.writeFieldEnd()
    if self.pictureStatus is not None:
      oprot.writeFieldBegin('pictureStatus', TType.STRING, 22)
      oprot.writeString(self.pictureStatus)
      oprot.writeFieldEnd()
    if self.statusMessage is not None:
      oprot.writeFieldBegin('statusMessage', TType.STRING, 24)
      oprot.writeString(self.statusMessage)
      oprot.writeFieldEnd()
    if self.allowSearchByUserid is not None:
      oprot.writeFieldBegin('allowSearchByUserid', TType.BOOL, 31)
      oprot.writeBool(self.allowSearchByUserid)
      oprot.writeFieldEnd()
    if self.allowSearchByEmail is not None:
      oprot.writeFieldBegin('allowSearchByEmail', TType.BOOL, 32)
      oprot.writeBool(self.allowSearchByEmail)
      oprot.writeFieldEnd()
    if self.picturePath is not None:
      oprot.writeFieldBegin('picturePath', TType.STRING, 33)
      oprot.writeString(self.picturePath)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class Contact(object):
  """
  Attributes:
   - mid
   - createdTime
   - type
   - status
   - relation
   - displayName
   - phoneticName
   - pictureStatus
   - thumbnailUrl_
   - statusMessage
   - displayNameOverridden
   - facoriteTime
   - capableVoiceCall
   - capableVideoCall
   - capableMyhome
   - capableBuddy
   - attributes
   - settings
   - picturePath
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.I64, 'createdTime', None, None, ), # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.I32, 'type', None, None, ), # 10
    (11, TType.I32, 'status', None, None, ), # 11
    None, # 12
    None, # 13
    None, # 14
    None, # 15
    None, # 16
    None, # 17
    None, # 18
    None, # 19
    None, # 20
    (21, TType.I32, 'relation', None, None, ), # 21
    (22, TType.STRING, 'displayName', None, None, ), # 22
    (23, TType.STRING, 'phoneticName', None, None, ), # 23
    (24, TType.STRING, 'pictureStatus', None, None, ), # 24
    (25, TType.STRING, 'thumbnailUrl_', None, None, ), # 25
    (26, TType.STRING, 'statusMessage', None, None, ), # 26
    (27, TType.STRING, 'displayNameOverridden', None, None, ), # 27
    (28, TType.I64, 'facoriteTime', None, None, ), # 28
    None, # 29
    None, # 30
    (31, TType.BOOL, 'capableVoiceCall', None, None, ), # 31
    (32, TType.BOOL, 'capableVideoCall', None, None, ), # 32
    (33, TType.BOOL, 'capableMyhome', None, None, ), # 33
    (34, TType.BOOL, 'capableBuddy', None, None, ), # 34
    (35, TType.I32, 'attributes', None, None, ), # 35
    (36, TType.I64, 'settings', None, None, ), # 36
    (37, TType.STRING, 'picturePath', None, None, ), # 37
  )

  def __init__(self, mid=None, createdTime=None, type=None, status=None, relation=None, displayName=None, phoneticName=None, pictureStatus=None, thumbnailUrl_=None, statusMessage=None, displayNameOverridden=None, facoriteTime=None, capableVoiceCall=None, capableVideoCall=None, capableMyhome=None, capableBuddy=None, attributes=None, settings=None, picturePath=None,):
    self.mid = mid
    self.createdTime = createdTime
    self.type = type
    self.status = status
    self.relation = relation
    self.displayName = displayName
    self.phoneticName = phoneticName
    self.pictureStatus = pictureStatus
    self.thumbnailUrl_ = thumbnailUrl_
    self.statusMessage = statusMessage
    self.displayNameOverridden = displayNameOverridden
    self.facoriteTime = facoriteTime
    self.capableVoiceCall = capableVoiceCall
    self.capableVideoCall = capableVideoCall
    self.capableMyhome = capableMyhome
    self.capableBuddy = capableBuddy
    self.attributes = attributes
    self.settings = settings
    self.picturePath = picturePath

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.mid = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I32:
          self.type = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.I32:
          self.relation = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRING:
          self.displayName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 23:
        if ftype == TType.STRING:
          self.phoneticName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 24:
        if ftype == TType.STRING:
          self.pictureStatus = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 25:
        if ftype == TType.STRING:
          self.thumbnailUrl_ = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 26:
        if ftype == TType.STRING:
          self.statusMessage = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 27:
        if ftype == TType.STRING:
          self.displayNameOverridden = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 28:
        if ftype == TType.I64:
          self.facoriteTime = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 31:
        if ftype == TType.BOOL:
          self.capableVoiceCall = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 32:
        if ftype == TType.BOOL:
          self.capableVideoCall = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 33:
        if ftype == TType.BOOL:
          self.capableMyhome = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 34:
        if ftype == TType.BOOL:
          self.capableBuddy = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 35:
        if ftype == TType.I32:
          self.attributes = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 36:
        if ftype == TType.I64:
          self.settings = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 37:
        if ftype == TType.STRING:
          self.picturePath = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Contact')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 2)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 10)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 11)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.relation is not None:
      oprot.writeFieldBegin('relation', TType.I32, 21)
      oprot.writeI32(self.relation)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 22)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.phoneticName is not None:
      oprot.writeFieldBegin('phoneticName', TType.STRING, 23)
      oprot.writeString(self.phoneticName)
      oprot.writeFieldEnd()
    if self.pictureStatus is not None:
      oprot.writeFieldBegin('pictureStatus', TType.STRING, 24)
      oprot.writeString(self.pictureStatus)
      oprot.writeFieldEnd()
    if self.thumbnailUrl_ is not None:
      oprot.writeFieldBegin('thumbnailUrl_', TType.STRING, 25)
      oprot.writeString(self.thumbnailUrl_)
      oprot.writeFieldEnd()
    if self.statusMessage is not None:
      oprot.writeFieldBegin('statusMessage', TType.STRING, 26)
      oprot.writeString(self.statusMessage)
      oprot.writeFieldEnd()
    if self.displayNameOverridden is not None:
      oprot.writeFieldBegin('displayNameOverridden', TType.STRING, 27)
      oprot.writeString(self.displayNameOverridden)
      oprot.writeFieldEnd()
    if self.facoriteTime is not None:
      oprot.writeFieldBegin('facoriteTime', TType.I64, 28)
      oprot.writeI64(self.facoriteTime)
      oprot.writeFieldEnd()
    if self.capableVoiceCall is not None:
      oprot.writeFieldBegin('capableVoiceCall', TType.BOOL, 31)
      oprot.writeBool(self.capableVoiceCall)
      oprot.writeFieldEnd()
    if self.capableVideoCall is not None:
      oprot.writeFieldBegin('capableVideoCall', TType.BOOL, 32)
      oprot.writeBool(self.capableVideoCall)
      oprot.writeFieldEnd()
    if self.capableMyhome is not None:
      oprot.writeFieldBegin('capableMyhome', TType.BOOL, 33)
      oprot.writeBool(self.capableMyhome)
      oprot.writeFieldEnd()
    if self.capableBuddy is not None:
      oprot.writeFieldBegin('capableBuddy', TType.BOOL, 34)
      oprot.writeBool(self.capableBuddy)
      oprot.writeFieldEnd()
    if self.attributes is not None:
      oprot.writeFieldBegin('attributes', TType.I32, 35)
      oprot.writeI32(self.attributes)
      oprot.writeFieldEnd()
    if self.settings is not None:
      oprot.writeFieldBegin('settings', TType.I64, 36)
      oprot.writeI64(self.settings)
      oprot.writeFieldEnd()
    if self.picturePath is not None:
      oprot.writeFieldBegin('picturePath', TType.STRING, 37)
      oprot.writeString(self.picturePath)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class Group(object):
  """
  Attributes:
   - id
   - createdTime
   - name
   - pictureStatus
   - members
   - creator
   - invitee
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'id', None, None, ), # 1
    (2, TType.I64, 'createdTime', None, None, ), # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.STRING, 'name', None, None, ), # 10
    (11, TType.STRING, 'pictureStatus', None, None, ), # 11
    None, # 12
    None, # 13
    None, # 14
    None, # 15
    None, # 16
    None, # 17
    None, # 18
    None, # 19
    (20, TType.LIST, 'members', (TType.STRUCT,(Contact, Contact.thrift_spec)), None, ), # 20
    (21, TType.STRUCT, 'creator', (Contact, Contact.thrift_spec), None, ), # 21
    (22, TType.LIST, 'invitee', (TType.STRUCT,(Contact, Contact.thrift_spec)), None, ), # 22
  )

  def __init__(self, id=None, createdTime=None, name=None, pictureStatus=None, members=None, creator=None, invitee=None,):
    self.id = id
    self.createdTime = createdTime
    self.name = name
    self.pictureStatus = pictureStatus
    self.members = members
    self.creator = creator
    self.invitee = invitee

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.id = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.pictureStatus = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.LIST:
          self.members = []
          (_etype21, _size18) = iprot.readListBegin()
          for _i22 in xrange(_size18):
            _elem23 = Contact()
            _elem23.read(iprot)
            self.members.append(_elem23)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.STRUCT:
          self.creator = Contact()
          self.creator.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.LIST:
          self.invitee = []
          (_etype27, _size24) = iprot.readListBegin()
          for _i28 in xrange(_size24):
            _elem29 = Contact()
            _elem29.read(iprot)
            self.invitee.append(_elem29)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Group')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.STRING, 1)
      oprot.writeString(self.id)
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 2)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 10)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.pictureStatus is not None:
      oprot.writeFieldBegin('pictureStatus', TType.STRING, 11)
      oprot.writeString(self.pictureStatus)
      oprot.writeFieldEnd()
    if self.members is not None:
      oprot.writeFieldBegin('members', TType.LIST, 20)
      oprot.writeListBegin(TType.STRUCT, len(self.members))
      for iter30 in self.members:
        iter30.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.creator is not None:
      oprot.writeFieldBegin('creator', TType.STRUCT, 21)
      self.creator.write(oprot)
      oprot.writeFieldEnd()
    if self.invitee is not None:
      oprot.writeFieldBegin('invitee', TType.LIST, 22)
      oprot.writeListBegin(TType.STRUCT, len(self.invitee))
      for iter31 in self.invitee:
        iter31.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class Room(object):
  """
  Attributes:
   - mid
   - createdTime
   - contacts
   - notificationDisabled
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.I64, 'createdTime', None, None, ), # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.LIST, 'contacts', (TType.STRUCT,(Contact, Contact.thrift_spec)), None, ), # 10
    None, # 11
    None, # 12
    None, # 13
    None, # 14
    None, # 15
    None, # 16
    None, # 17
    None, # 18
    None, # 19
    None, # 20
    None, # 21
    None, # 22
    None, # 23
    None, # 24
    None, # 25
    None, # 26
    None, # 27
    None, # 28
    None, # 29
    None, # 30
    (31, TType.BOOL, 'notificationDisabled', None, None, ), # 31
  )

  def __init__(self, mid=None, createdTime=None, contacts=None, notificationDisabled=None,):
    self.mid = mid
    self.createdTime = createdTime
    self.contacts = contacts
    self.notificationDisabled = notificationDisabled

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.mid = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.LIST:
          self.contacts = []
          (_etype35, _size32) = iprot.readListBegin()
          for _i36 in xrange(_size32):
            _elem37 = Contact()
            _elem37.read(iprot)
            self.contacts.append(_elem37)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 31:
        if ftype == TType.BOOL:
          self.notificationDisabled = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Room')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 2)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    if self.contacts is not None:
      oprot.writeFieldBegin('contacts', TType.LIST, 10)
      oprot.writeListBegin(TType.STRUCT, len(self.contacts))
      for iter38 in self.contacts:
        iter38.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.notificationDisabled is not None:
      oprot.writeFieldBegin('notificationDisabled', TType.BOOL, 31)
      oprot.writeBool(self.notificationDisabled)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class MessageBox(object):
  """
  Attributes:
   - id
   - channelId
   - lastSeq
   - unreadCount
   - lastModifiedTime
   - status
   - midType
   - lastMessages
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'id', None, None, ), # 1
    (2, TType.STRING, 'channelId', None, None, ), # 2
    None, # 3
    None, # 4
    (5, TType.I64, 'lastSeq', None, None, ), # 5
    (6, TType.I64, 'unreadCount', None, None, ), # 6
    (7, TType.I64, 'lastModifiedTime', None, None, ), # 7
    (8, TType.I32, 'status', None, None, ), # 8
    (9, TType.I32, 'midType', None, None, ), # 9
    (10, TType.LIST, 'lastMessages', (TType.STRUCT,(Message, Message.thrift_spec)), None, ), # 10
  )

  def __init__(self, id=None, channelId=None, lastSeq=None, unreadCount=None, lastModifiedTime=None, status=None, midType=None, lastMessages=None,):
    self.id = id
    self.channelId = channelId
    self.lastSeq = lastSeq
    self.unreadCount = unreadCount
    self.lastModifiedTime = lastModifiedTime
    self.status = status
    self.midType = midType
    self.lastMessages = lastMessages

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.id = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.channelId = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.lastSeq = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.unreadCount = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I64:
          self.lastModifiedTime = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I32:
          self.midType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.LIST:
          self.lastMessages = []
          (_etype42, _size39) = iprot.readListBegin()
          for _i43 in xrange(_size39):
            _elem44 = Message()
            _elem44.read(iprot)
            self.lastMessages.append(_elem44)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('MessageBox')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.STRING, 1)
      oprot.writeString(self.id)
      oprot.writeFieldEnd()
    if self.channelId is not None:
      oprot.writeFieldBegin('channelId', TType.STRING, 2)
      oprot.writeString(self.channelId)
      oprot.writeFieldEnd()
    if self.lastSeq is not None:
      oprot.writeFieldBegin('lastSeq', TType.I64, 5)
      oprot.writeI64(self.lastSeq)
      oprot.writeFieldEnd()
    if self.unreadCount is not None:
      oprot.writeFieldBegin('unreadCount', TType.I64, 6)
      oprot.writeI64(self.unreadCount)
      oprot.writeFieldEnd()
    if self.lastModifiedTime is not None:
      oprot.writeFieldBegin('lastModifiedTime', TType.I64, 7)
      oprot.writeI64(self.lastModifiedTime)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 8)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.midType is not None:
      oprot.writeFieldBegin('midType', TType.I32, 9)
      oprot.writeI32(self.midType)
      oprot.writeFieldEnd()
    if self.lastMessages is not None:
      oprot.writeFieldBegin('lastMessages', TType.LIST, 10)
      oprot.writeListBegin(TType.STRUCT, len(self.lastMessages))
      for iter45 in self.lastMessages:
        iter45.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class MessageBoxWrapUp(object):
  """
  Attributes:
   - messageBox
   - name
   - contacts
   - pictureRevision
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'messageBox', (MessageBox, MessageBox.thrift_spec), None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
    (3, TType.LIST, 'contacts', (TType.STRUCT,(Contact, Contact.thrift_spec)), None, ), # 3
    (4, TType.STRING, 'pictureRevision', None, None, ), # 4
  )

  def __init__(self, messageBox=None, name=None, contacts=None, pictureRevision=None,):
    self.messageBox = messageBox
    self.name = name
    self.contacts = contacts
    self.pictureRevision = pictureRevision

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.messageBox = MessageBox()
          self.messageBox.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.contacts = []
          (_etype49, _size46) = iprot.readListBegin()
          for _i50 in xrange(_size46):
            _elem51 = Contact()
            _elem51.read(iprot)
            self.contacts.append(_elem51)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.pictureRevision = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('MessageBoxWrapUp')
    if self.messageBox is not None:
      oprot.writeFieldBegin('messageBox', TType.STRUCT, 1)
      self.messageBox.write(oprot)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.contacts is not None:
      oprot.writeFieldBegin('contacts', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.contacts))
      for iter52 in self.contacts:
        iter52.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.pictureRevision is not None:
      oprot.writeFieldBegin('pictureRevision', TType.STRING, 4)
      oprot.writeString(self.pictureRevision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class MessageBoxWrapUpResponse(object):
  """
  Attributes:
   - messageBoxWrapUpList
   - totalSize
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'messageBoxWrapUpList', (TType.STRUCT,(MessageBoxWrapUp, MessageBoxWrapUp.thrift_spec)), None, ), # 1
    (2, TType.I32, 'totalSize', None, None, ), # 2
  )

  def __init__(self, messageBoxWrapUpList=None, totalSize=None,):
    self.messageBoxWrapUpList = messageBoxWrapUpList
    self.totalSize = totalSize

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.LIST:
          self.messageBoxWrapUpList = []
          (_etype56, _size53) = iprot.readListBegin()
          for _i57 in xrange(_size53):
            _elem58 = MessageBoxWrapUp()
            _elem58.read(iprot)
            self.messageBoxWrapUpList.append(_elem58)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.totalSize = iprot.readI32();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('MessageBoxWrapUpResponse')
    if self.messageBoxWrapUpList is not None:
      oprot.writeFieldBegin('messageBoxWrapUpList', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.messageBoxWrapUpList))
      for iter59 in self.messageBoxWrapUpList:
        iter59.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.totalSize is not None:
      oprot.writeFieldBegin('totalSize', TType.I32, 2)
      oprot.writeI32(self.totalSize)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class MessageBoxEntry(object):
  """
  Attributes:
   - messageBox
   - displayName
   - contacts
   - mystery
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'messageBox', (MessageBox, MessageBox.thrift_spec), None, ), # 1
    (2, TType.STRING, 'displayName', None, None, ), # 2
    (3, TType.LIST, 'contacts', (TType.STRUCT,(Contact, Contact.thrift_spec)), None, ), # 3
    (4, TType.STRING, 'mystery', None, None, ), # 4
  )

  def __init__(self, messageBox=None, displayName=None, contacts=None, mystery=None,):
    self.messageBox = messageBox
    self.displayName = displayName
    self.contacts = contacts
    self.mystery = mystery

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.messageBox = MessageBox()
          self.messageBox.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.displayName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.contacts = []
          (_etype63, _size60) = iprot.readListBegin()
          for _i64 in xrange(_size60):
            _elem65 = Contact()
            _elem65.read(iprot)
            self.contacts.append(_elem65)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.mystery = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('MessageBoxEntry')
    if self.messageBox is not None:
      oprot.writeFieldBegin('messageBox', TType.STRUCT, 1)
      self.messageBox.write(oprot)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 2)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.contacts is not None:
      oprot.writeFieldBegin('contacts', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.contacts))
      for iter66 in self.contacts:
        iter66.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.mystery is not None:
      oprot.writeFieldBegin('mystery', TType.STRING, 4)
      oprot.writeString(self.mystery)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class MessageBoxCompactWrapUpList(object):
  """
  Attributes:
   - entries
   - mystery
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'entries', (TType.STRUCT,(MessageBoxEntry, MessageBoxEntry.thrift_spec)), None, ), # 1
    (2, TType.I32, 'mystery', None, None, ), # 2
  )

  def __init__(self, entries=None, mystery=None,):
    self.entries = entries
    self.mystery = mystery

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.LIST:
          self.entries = []
          (_etype70, _size67) = iprot.readListBegin()
          for _i71 in xrange(_size67):
            _elem72 = MessageBoxEntry()
            _elem72.read(iprot)
            self.entries.append(_elem72)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.mystery = iprot.readI32();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('MessageBoxCompactWrapUpList')
    if self.entries is not None:
      oprot.writeFieldBegin('entries', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.entries))
      for iter73 in self.entries:
        iter73.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.mystery is not None:
      oprot.writeFieldBegin('mystery', TType.I32, 2)
      oprot.writeI32(self.mystery)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)
