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

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 ApplicationType:
  IOS = 16
  IOS_RC = 17
  IOS_BETA = 18
  IOS_ALPHA = 19
  ANDROID = 32
  ANDROID_RC = 33
  ANDROID_BETA = 34
  ANDROID_ALPHA = 35
  WAP = 48
  WAP_RC = 49
  WAP_BETA = 50
  WAP_ALPHA = 51
  BOT = 64
  BOT_RC = 65
  BOT_BETA = 66
  BOT_ALPHA = 67
  WEB = 80
  WEB_RC = 81
  WEB_BETA = 82
  WEB_ALPHA = 83
  DESKTOPWIN = 96
  DESKTOPWIN_RC = 97
  DESKTOPWIN_BETA = 98
  DESKTOPWIN_ALPHA = 99
  DESKTOPMAC = 112
  DESKTOPMAC_RC = 113
  DESKTOPMAC_BETA = 114
  DESKTOPMAC_ALPHA = 115
  CHANNELGW = 128
  CHANNELGW_RC = 129
  CHANNELGW_BETA = 130
  CHANNELGW_ALPHA = 131
  CHANNELCP = 144
  CHANNELCP_RC = 145
  CHANNELCP_BETA = 146
  CHANNELCP_ALPHA = 147
  WINPHONE = 160
  WINPHONE_RC = 161
  WINPHONE_BETA = 162
  WINPHONE_ALPHA = 163
  BLACKBERRY = 176
  BLACKBERRY_RC = 177
  BLACKBERRY_BETA = 178
  BLACKBERRY_ALPHA = 179
  WINMETRO = 192
  WINMETRO_RC = 193
  WINMETRO_BETA = 194
  WINMETRO_ALPHA = 195
  S40 = 208
  S40_RC = 209
  S40_BETA = 210
  S40_ALPHA = 211
  CHRONO = 224
  CHRONO_RC = 225
  CHRONO_BETA = 226
  CHRONO_ALPHA = 227
  TIZEN = 256
  TIZEN_RC = 257
  TIZEN_BETA = 258
  TIZEN_ALPHA = 259
  VIRTUAL = 272
  FIREFOXOS = 288
  FIREFOXOS_RC = 289
  FIREFOXOS_BETA = 290
  FIREFOXOS_ALPHA = 291
  IOSIPAD = 304
  IOSIPAD_RC = 305
  IOSIPAD_BETA = 306
  IOSIPAD_ALPHA = 307
  BIZIOS = 320
  BIZIOS_RC = 321
  BIZIOS_BETA = 322
  BIZIOS_ALPHA = 323
  BIZANDROID = 336
  BIZANDROID_RC = 337
  BIZANDROID_BETA = 338
  BIZANDROID_ALPHA = 339
  BIZBOT = 352
  BIZBOT_RC = 353
  BIZBOT_BETA = 354
  BIZBOT_ALPHA = 355
  CHROMEOS = 368
  CHROMEOS_RC = 369
  CHROMEOS_BETA = 370
  CHROMEOS_ALPHA = 371
  ANDROIDLITE = 384
  ANDROIDLITE_RC = 385
  ANDROIDLITE_BETA = 386
  ANDROIDLITE_ALPHA = 387
  WIN10 = 400
  WIN10_RC = 401
  WIN10_BETA = 402
  WIN10_ALPHA = 403
  BIZWEB = 416
  BIZWEB_RC = 417
  BIZWEB_BETA = 418
  BIZWEB_ALPHA = 419
  DUMMYPRIMARY = 432
  DUMMYPRIMARY_RC = 433
  DUMMYPRIMARY_BETA = 434
  DUMMYPRIMARY_ALPHA = 435
  SQUARE = 448
  SQUARE_RC = 449
  SQUARE_BETA = 450
  SQUARE_ALPHA = 451
  INTERNAL = 464
  INTERNAL_RC = 465
  INTERNAL_BETA = 466
  INTERNAL_ALPHA = 467
  CLOVAFRIENDS = 480
  CLOVAFRIENDS_RC = 481
  CLOVAFRIENDS_BETA = 482
  CLOVAFRIENDS_ALPHA = 483

  _VALUES_TO_NAMES = {
    16: "IOS",
    17: "IOS_RC",
    18: "IOS_BETA",
    19: "IOS_ALPHA",
    32: "ANDROID",
    33: "ANDROID_RC",
    34: "ANDROID_BETA",
    35: "ANDROID_ALPHA",
    48: "WAP",
    49: "WAP_RC",
    50: "WAP_BETA",
    51: "WAP_ALPHA",
    64: "BOT",
    65: "BOT_RC",
    66: "BOT_BETA",
    67: "BOT_ALPHA",
    80: "WEB",
    81: "WEB_RC",
    82: "WEB_BETA",
    83: "WEB_ALPHA",
    96: "DESKTOPWIN",
    97: "DESKTOPWIN_RC",
    98: "DESKTOPWIN_BETA",
    99: "DESKTOPWIN_ALPHA",
    112: "DESKTOPMAC",
    113: "DESKTOPMAC_RC",
    114: "DESKTOPMAC_BETA",
    115: "DESKTOPMAC_ALPHA",
    128: "CHANNELGW",
    129: "CHANNELGW_RC",
    130: "CHANNELGW_BETA",
    131: "CHANNELGW_ALPHA",
    144: "CHANNELCP",
    145: "CHANNELCP_RC",
    146: "CHANNELCP_BETA",
    147: "CHANNELCP_ALPHA",
    160: "WINPHONE",
    161: "WINPHONE_RC",
    162: "WINPHONE_BETA",
    163: "WINPHONE_ALPHA",
    176: "BLACKBERRY",
    177: "BLACKBERRY_RC",
    178: "BLACKBERRY_BETA",
    179: "BLACKBERRY_ALPHA",
    192: "WINMETRO",
    193: "WINMETRO_RC",
    194: "WINMETRO_BETA",
    195: "WINMETRO_ALPHA",
    208: "S40",
    209: "S40_RC",
    210: "S40_BETA",
    211: "S40_ALPHA",
    224: "CHRONO",
    225: "CHRONO_RC",
    226: "CHRONO_BETA",
    227: "CHRONO_ALPHA",
    256: "TIZEN",
    257: "TIZEN_RC",
    258: "TIZEN_BETA",
    259: "TIZEN_ALPHA",
    272: "VIRTUAL",
    288: "FIREFOXOS",
    289: "FIREFOXOS_RC",
    290: "FIREFOXOS_BETA",
    291: "FIREFOXOS_ALPHA",
    304: "IOSIPAD",
    305: "IOSIPAD_RC",
    306: "IOSIPAD_BETA",
    307: "IOSIPAD_ALPHA",
    320: "BIZIOS",
    321: "BIZIOS_RC",
    322: "BIZIOS_BETA",
    323: "BIZIOS_ALPHA",
    336: "BIZANDROID",
    337: "BIZANDROID_RC",
    338: "BIZANDROID_BETA",
    339: "BIZANDROID_ALPHA",
    352: "BIZBOT",
    353: "BIZBOT_RC",
    354: "BIZBOT_BETA",
    355: "BIZBOT_ALPHA",
    368: "CHROMEOS",
    369: "CHROMEOS_RC",
    370: "CHROMEOS_BETA",
    371: "CHROMEOS_ALPHA",
    384: "ANDROIDLITE",
    385: "ANDROIDLITE_RC",
    386: "ANDROIDLITE_BETA",
    387: "ANDROIDLITE_ALPHA",
    400: "WIN10",
    401: "WIN10_RC",
    402: "WIN10_BETA",
    403: "WIN10_ALPHA",
    416: "BIZWEB",
    417: "BIZWEB_RC",
    418: "BIZWEB_BETA",
    419: "BIZWEB_ALPHA",
    432: "DUMMYPRIMARY",
    433: "DUMMYPRIMARY_RC",
    434: "DUMMYPRIMARY_BETA",
    435: "DUMMYPRIMARY_ALPHA",
    448: "SQUARE",
    449: "SQUARE_RC",
    450: "SQUARE_BETA",
    451: "SQUARE_ALPHA",
    464: "INTERNAL",
    465: "INTERNAL_RC",
    466: "INTERNAL_BETA",
    467: "INTERNAL_ALPHA",
    480: "CLOVAFRIENDS",
    481: "CLOVAFRIENDS_RC",
    482: "CLOVAFRIENDS_BETA",
    483: "CLOVAFRIENDS_ALPHA",
  }

  _NAMES_TO_VALUES = {
    "IOS": 16,
    "IOS_RC": 17,
    "IOS_BETA": 18,
    "IOS_ALPHA": 19,
    "ANDROID": 32,
    "ANDROID_RC": 33,
    "ANDROID_BETA": 34,
    "ANDROID_ALPHA": 35,
    "WAP": 48,
    "WAP_RC": 49,
    "WAP_BETA": 50,
    "WAP_ALPHA": 51,
    "BOT": 64,
    "BOT_RC": 65,
    "BOT_BETA": 66,
    "BOT_ALPHA": 67,
    "WEB": 80,
    "WEB_RC": 81,
    "WEB_BETA": 82,
    "WEB_ALPHA": 83,
    "DESKTOPWIN": 96,
    "DESKTOPWIN_RC": 97,
    "DESKTOPWIN_BETA": 98,
    "DESKTOPWIN_ALPHA": 99,
    "DESKTOPMAC": 112,
    "DESKTOPMAC_RC": 113,
    "DESKTOPMAC_BETA": 114,
    "DESKTOPMAC_ALPHA": 115,
    "CHANNELGW": 128,
    "CHANNELGW_RC": 129,
    "CHANNELGW_BETA": 130,
    "CHANNELGW_ALPHA": 131,
    "CHANNELCP": 144,
    "CHANNELCP_RC": 145,
    "CHANNELCP_BETA": 146,
    "CHANNELCP_ALPHA": 147,
    "WINPHONE": 160,
    "WINPHONE_RC": 161,
    "WINPHONE_BETA": 162,
    "WINPHONE_ALPHA": 163,
    "BLACKBERRY": 176,
    "BLACKBERRY_RC": 177,
    "BLACKBERRY_BETA": 178,
    "BLACKBERRY_ALPHA": 179,
    "WINMETRO": 192,
    "WINMETRO_RC": 193,
    "WINMETRO_BETA": 194,
    "WINMETRO_ALPHA": 195,
    "S40": 208,
    "S40_RC": 209,
    "S40_BETA": 210,
    "S40_ALPHA": 211,
    "CHRONO": 224,
    "CHRONO_RC": 225,
    "CHRONO_BETA": 226,
    "CHRONO_ALPHA": 227,
    "TIZEN": 256,
    "TIZEN_RC": 257,
    "TIZEN_BETA": 258,
    "TIZEN_ALPHA": 259,
    "VIRTUAL": 272,
    "FIREFOXOS": 288,
    "FIREFOXOS_RC": 289,
    "FIREFOXOS_BETA": 290,
    "FIREFOXOS_ALPHA": 291,
    "IOSIPAD": 304,
    "IOSIPAD_RC": 305,
    "IOSIPAD_BETA": 306,
    "IOSIPAD_ALPHA": 307,
    "BIZIOS": 320,
    "BIZIOS_RC": 321,
    "BIZIOS_BETA": 322,
    "BIZIOS_ALPHA": 323,
    "BIZANDROID": 336,
    "BIZANDROID_RC": 337,
    "BIZANDROID_BETA": 338,
    "BIZANDROID_ALPHA": 339,
    "BIZBOT": 352,
    "BIZBOT_RC": 353,
    "BIZBOT_BETA": 354,
    "BIZBOT_ALPHA": 355,
    "CHROMEOS": 368,
    "CHROMEOS_RC": 369,
    "CHROMEOS_BETA": 370,
    "CHROMEOS_ALPHA": 371,
    "ANDROIDLITE": 384,
    "ANDROIDLITE_RC": 385,
    "ANDROIDLITE_BETA": 386,
    "ANDROIDLITE_ALPHA": 387,
    "WIN10": 400,
    "WIN10_RC": 401,
    "WIN10_BETA": 402,
    "WIN10_ALPHA": 403,
    "BIZWEB": 416,
    "BIZWEB_RC": 417,
    "BIZWEB_BETA": 418,
    "BIZWEB_ALPHA": 419,
    "DUMMYPRIMARY": 432,
    "DUMMYPRIMARY_RC": 433,
    "DUMMYPRIMARY_BETA": 434,
    "DUMMYPRIMARY_ALPHA": 435,
    "SQUARE": 448,
    "SQUARE_RC": 449,
    "SQUARE_BETA": 450,
    "SQUARE_ALPHA": 451,
    "INTERNAL": 464,
    "INTERNAL_RC": 465,
    "INTERNAL_BETA": 466,
    "INTERNAL_ALPHA": 467,
    "CLOVAFRIENDS": 480,
    "CLOVAFRIENDS_RC": 481,
    "CLOVAFRIENDS_BETA": 482,
    "CLOVAFRIENDS_ALPHA": 483,
  }

class ExtendedProfileAttribute:

  _VALUES_TO_NAMES = {
  }

  _NAMES_TO_VALUES = {
  }

class PrivacyLevelType:
  PUBLIC = 0
  PRIVATE = 1

  _VALUES_TO_NAMES = {
    0: "PUBLIC",
    1: "PRIVATE",
  }

  _NAMES_TO_VALUES = {
    "PUBLIC": 0,
    "PRIVATE": 1,
  }

class PaidCallerIdStatus:
  NOT_SPECIFIED = 0
  VALID = 1
  VERIFICATION_REQUIRED = 2
  NOT_PERMITTED = 3
  LIMIT_EXCEEDED = 4
  LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED = 5

  _VALUES_TO_NAMES = {
    0: "NOT_SPECIFIED",
    1: "VALID",
    2: "VERIFICATION_REQUIRED",
    3: "NOT_PERMITTED",
    4: "LIMIT_EXCEEDED",
    5: "LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED",
  }

  _NAMES_TO_VALUES = {
    "NOT_SPECIFIED": 0,
    "VALID": 1,
    "VERIFICATION_REQUIRED": 2,
    "NOT_PERMITTED": 3,
    "LIMIT_EXCEEDED": 4,
    "LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED": 5,
  }

class PaidCallProductType:
  COIN = 0
  CREDIT = 1
  MONTHLY = 2

  _VALUES_TO_NAMES = {
    0: "COIN",
    1: "CREDIT",
    2: "MONTHLY",
  }

  _NAMES_TO_VALUES = {
    "COIN": 0,
    "CREDIT": 1,
    "MONTHLY": 2,
  }

class PaidCallType:
  OUT = 0
  IN = 1
  TOLLFREE = 2
  RECORD = 3
  AD = 4
  CS = 5

  _VALUES_TO_NAMES = {
    0: "OUT",
    1: "IN",
    2: "TOLLFREE",
    3: "RECORD",
    4: "AD",
    5: "CS",
  }

  _NAMES_TO_VALUES = {
    "OUT": 0,
    "IN": 1,
    "TOLLFREE": 2,
    "RECORD": 3,
    "AD": 4,
    "CS": 5,
  }

class BotType:
  RESERVED = 0
  OFFICIAL = 1
  LINE_AT_0 = 2
  LINE_AT = 3

  _VALUES_TO_NAMES = {
    0: "RESERVED",
    1: "OFFICIAL",
    2: "LINE_AT_0",
    3: "LINE_AT",
  }

  _NAMES_TO_VALUES = {
    "RESERVED": 0,
    "OFFICIAL": 1,
    "LINE_AT_0": 2,
    "LINE_AT": 3,
  }

class BuddyOnAirLabel:
  ON_AIR = 0
  LIVE = 1

  _VALUES_TO_NAMES = {
    0: "ON_AIR",
    1: "LIVE",
  }

  _NAMES_TO_VALUES = {
    "ON_AIR": 0,
    "LIVE": 1,
  }

class BuddyBannerLinkType:
  BUDDY_BANNER_LINK_HIDDEN = 0
  BUDDY_BANNER_LINK_MID = 1
  BUDDY_BANNER_LINK_URL = 2

  _VALUES_TO_NAMES = {
    0: "BUDDY_BANNER_LINK_HIDDEN",
    1: "BUDDY_BANNER_LINK_MID",
    2: "BUDDY_BANNER_LINK_URL",
  }

  _NAMES_TO_VALUES = {
    "BUDDY_BANNER_LINK_HIDDEN": 0,
    "BUDDY_BANNER_LINK_MID": 1,
    "BUDDY_BANNER_LINK_URL": 2,
  }

class BuddyOnAirType:
  NORMAL = 0
  LIVE = 1
  VOIP = 2

  _VALUES_TO_NAMES = {
    0: "NORMAL",
    1: "LIVE",
    2: "VOIP",
  }

  _NAMES_TO_VALUES = {
    "NORMAL": 0,
    "LIVE": 1,
    "VOIP": 2,
  }

class Diff:
  ADDED = 0
  UPDATED = 1
  REMOVED = 2

  _VALUES_TO_NAMES = {
    0: "ADDED",
    1: "UPDATED",
    2: "REMOVED",
  }

  _NAMES_TO_VALUES = {
    "ADDED": 0,
    "UPDATED": 1,
    "REMOVED": 2,
  }

class ReportType:
  ADVERTISING = 1
  GENDER_HARASSMENT = 2
  HARASSMENT = 3
  OTHER = 4

  _VALUES_TO_NAMES = {
    1: "ADVERTISING",
    2: "GENDER_HARASSMENT",
    3: "HARASSMENT",
    4: "OTHER",
  }

  _NAMES_TO_VALUES = {
    "ADVERTISING": 1,
    "GENDER_HARASSMENT": 2,
    "HARASSMENT": 3,
    "OTHER": 4,
  }

class SyncTriggerReason:
  OTHER = 0
  REVISION_GAP_TOO_LARGE = 1
  OPERATION_EXPIRED = 2

  _VALUES_TO_NAMES = {
    0: "OTHER",
    1: "REVISION_GAP_TOO_LARGE",
    2: "OPERATION_EXPIRED",
  }

  _NAMES_TO_VALUES = {
    "OTHER": 0,
    "REVISION_GAP_TOO_LARGE": 1,
    "OPERATION_EXPIRED": 2,
  }

class ReportCategory:
  PUSH_NORMAL_PLAIN = 0
  PUSH_NORMAL_E2EE = 1
  PUSH_VOIP_PLAIN = 2
  PUSH_VOIP_E2EE = 3

  _VALUES_TO_NAMES = {
    0: "PUSH_NORMAL_PLAIN",
    1: "PUSH_NORMAL_E2EE",
    2: "PUSH_VOIP_PLAIN",
    3: "PUSH_VOIP_E2EE",
  }

  _NAMES_TO_VALUES = {
    "PUSH_NORMAL_PLAIN": 0,
    "PUSH_NORMAL_E2EE": 1,
    "PUSH_VOIP_PLAIN": 2,
    "PUSH_VOIP_E2EE": 3,
  }

class BuddyResultState:
  ACCEPTED = 1
  SUCCEEDED = 2
  FAILED = 3
  CANCELLED = 4
  NOTIFY_FAILED = 5
  STORING = 11
  UPLOADING = 21
  NOTIFYING = 31
  REMOVING_SUBSCRIPTION = 41
  UNREGISTERING_ACCOUNT = 42
  NOTIFYING_LEAVE_CHAT = 43

  _VALUES_TO_NAMES = {
    1: "ACCEPTED",
    2: "SUCCEEDED",
    3: "FAILED",
    4: "CANCELLED",
    5: "NOTIFY_FAILED",
    11: "STORING",
    21: "UPLOADING",
    31: "NOTIFYING",
    41: "REMOVING_SUBSCRIPTION",
    42: "UNREGISTERING_ACCOUNT",
    43: "NOTIFYING_LEAVE_CHAT",
  }

  _NAMES_TO_VALUES = {
    "ACCEPTED": 1,
    "SUCCEEDED": 2,
    "FAILED": 3,
    "CANCELLED": 4,
    "NOTIFY_FAILED": 5,
    "STORING": 11,
    "UPLOADING": 21,
    "NOTIFYING": 31,
    "REMOVING_SUBSCRIPTION": 41,
    "UNREGISTERING_ACCOUNT": 42,
    "NOTIFYING_LEAVE_CHAT": 43,
  }

class BuddySearchRequestSource:
  NA = 0
  FRIEND_VIEW = 1
  OFFICIAL_ACCOUNT_VIEW = 2

  _VALUES_TO_NAMES = {
    0: "NA",
    1: "FRIEND_VIEW",
    2: "OFFICIAL_ACCOUNT_VIEW",
  }

  _NAMES_TO_VALUES = {
    "NA": 0,
    "FRIEND_VIEW": 1,
    "OFFICIAL_ACCOUNT_VIEW": 2,
  }

class CarrierCode:
  NOT_SPECIFIED = 0
  JP_DOCOMO = 1
  JP_AU = 2
  JP_SOFTBANK = 3
  JP_DOCOMO_LINE = 4
  KR_SKT = 17
  KR_KT = 18
  KR_LGT = 19

  _VALUES_TO_NAMES = {
    0: "NOT_SPECIFIED",
    1: "JP_DOCOMO",
    2: "JP_AU",
    3: "JP_SOFTBANK",
    4: "JP_DOCOMO_LINE",
    17: "KR_SKT",
    18: "KR_KT",
    19: "KR_LGT",
  }

  _NAMES_TO_VALUES = {
    "NOT_SPECIFIED": 0,
    "JP_DOCOMO": 1,
    "JP_AU": 2,
    "JP_SOFTBANK": 3,
    "JP_DOCOMO_LINE": 4,
    "KR_SKT": 17,
    "KR_KT": 18,
    "KR_LGT": 19,
  }

class ChannelConfiguration:
  MESSAGE = 0
  MESSAGE_NOTIFICATION = 1
  NOTIFICATION_CENTER = 2

  _VALUES_TO_NAMES = {
    0: "MESSAGE",
    1: "MESSAGE_NOTIFICATION",
    2: "NOTIFICATION_CENTER",
  }

  _NAMES_TO_VALUES = {
    "MESSAGE": 0,
    "MESSAGE_NOTIFICATION": 1,
    "NOTIFICATION_CENTER": 2,
  }

class ChannelPermission:
  PROFILE = 0
  FRIENDS = 1
  GROUP = 2

  _VALUES_TO_NAMES = {
    0: "PROFILE",
    1: "FRIENDS",
    2: "GROUP",
  }

  _NAMES_TO_VALUES = {
    "PROFILE": 0,
    "FRIENDS": 1,
    "GROUP": 2,
  }

class ChannelFeatureLicense:
  BLE_LCS_API_USABLE = 26
  PROHIBIT_MINIMIZE_CHANNEL_BROWSER = 27
  ALLOW_IOS_WEBKIT = 28

  _VALUES_TO_NAMES = {
    26: "BLE_LCS_API_USABLE",
    27: "PROHIBIT_MINIMIZE_CHANNEL_BROWSER",
    28: "ALLOW_IOS_WEBKIT",
  }

  _NAMES_TO_VALUES = {
    "BLE_LCS_API_USABLE": 26,
    "PROHIBIT_MINIMIZE_CHANNEL_BROWSER": 27,
    "ALLOW_IOS_WEBKIT": 28,
  }

class ChannelErrorCode:
  ILLEGAL_ARGUMENT = 0
  INTERNAL_ERROR = 1
  CONNECTION_ERROR = 2
  AUTHENTICATIONI_FAILED = 3
  NEED_PERMISSION_APPROVAL = 4
  COIN_NOT_USABLE = 5
  WEBVIEW_NOT_ALLOWED = 6

  _VALUES_TO_NAMES = {
    0: "ILLEGAL_ARGUMENT",
    1: "INTERNAL_ERROR",
    2: "CONNECTION_ERROR",
    3: "AUTHENTICATIONI_FAILED",
    4: "NEED_PERMISSION_APPROVAL",
    5: "COIN_NOT_USABLE",
    6: "WEBVIEW_NOT_ALLOWED",
  }

  _NAMES_TO_VALUES = {
    "ILLEGAL_ARGUMENT": 0,
    "INTERNAL_ERROR": 1,
    "CONNECTION_ERROR": 2,
    "AUTHENTICATIONI_FAILED": 3,
    "NEED_PERMISSION_APPROVAL": 4,
    "COIN_NOT_USABLE": 5,
    "WEBVIEW_NOT_ALLOWED": 6,
  }

class ChannelSyncType:
  SYNC = 0
  REMOVE = 1
  REMOVE_ALL = 2

  _VALUES_TO_NAMES = {
    0: "SYNC",
    1: "REMOVE",
    2: "REMOVE_ALL",
  }

  _NAMES_TO_VALUES = {
    "SYNC": 0,
    "REMOVE": 1,
    "REMOVE_ALL": 2,
  }

class LoginType:
  ID_CREDENTIAL = 0
  QRCODE = 1
  ID_CREDENTIAL_WITH_E2EE = 2

  _VALUES_TO_NAMES = {
    0: "ID_CREDENTIAL",
    1: "QRCODE",
    2: "ID_CREDENTIAL_WITH_E2EE",
  }

  _NAMES_TO_VALUES = {
    "ID_CREDENTIAL": 0,
    "QRCODE": 1,
    "ID_CREDENTIAL_WITH_E2EE": 2,
  }

class ContactAttribute:
  CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL = 1
  CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL = 2
  CONTACT_ATTRIBUTE_CAPABLE_MY_HOME = 16
  CONTACT_ATTRIBUTE_CAPABLE_BUDDY = 32

  _VALUES_TO_NAMES = {
    1: "CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL",
    2: "CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL",
    16: "CONTACT_ATTRIBUTE_CAPABLE_MY_HOME",
    32: "CONTACT_ATTRIBUTE_CAPABLE_BUDDY",
  }

  _NAMES_TO_VALUES = {
    "CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL": 1,
    "CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL": 2,
    "CONTACT_ATTRIBUTE_CAPABLE_MY_HOME": 16,
    "CONTACT_ATTRIBUTE_CAPABLE_BUDDY": 32,
  }

class ContactCategory:
  NORMAL = 0
  RECOMMEND = 1

  _VALUES_TO_NAMES = {
    0: "NORMAL",
    1: "RECOMMEND",
  }

  _NAMES_TO_VALUES = {
    "NORMAL": 0,
    "RECOMMEND": 1,
  }

class ContactRelation:
  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 AsymmetricKeyAlgorithm:
  ASYMMETRIC_KEY_ALGORITHM_RSA = 1
  ASYMMETRIC_KEY_ALGORITHM_ECDH = 2

  _VALUES_TO_NAMES = {
    1: "ASYMMETRIC_KEY_ALGORITHM_RSA",
    2: "ASYMMETRIC_KEY_ALGORITHM_ECDH",
  }

  _NAMES_TO_VALUES = {
    "ASYMMETRIC_KEY_ALGORITHM_RSA": 1,
    "ASYMMETRIC_KEY_ALGORITHM_ECDH": 2,
  }

class ContactSetting:
  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 ContactStatus:
  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 ContactType:
  MID = 0
  PHONE = 1
  EMAIL = 2
  USERID = 3
  PROXIMITY = 4
  GROUP = 5
  USER = 6
  QRCODE = 7
  PROMOTION_BOT = 8
  CONTACT_MESSAGE = 9
  FRIEND_REQUEST = 10
  REPAIR = 128
  FACEBOOK = 2305
  SINA = 2306
  RENREN = 2307
  FEIXIN = 2308
  BBM = 2309
  BEACON = 11

  _VALUES_TO_NAMES = {
    0: "MID",
    1: "PHONE",
    2: "EMAIL",
    3: "USERID",
    4: "PROXIMITY",
    5: "GROUP",
    6: "USER",
    7: "QRCODE",
    8: "PROMOTION_BOT",
    9: "CONTACT_MESSAGE",
    10: "FRIEND_REQUEST",
    128: "REPAIR",
    2305: "FACEBOOK",
    2306: "SINA",
    2307: "RENREN",
    2308: "FEIXIN",
    2309: "BBM",
    11: "BEACON",
  }

  _NAMES_TO_VALUES = {
    "MID": 0,
    "PHONE": 1,
    "EMAIL": 2,
    "USERID": 3,
    "PROXIMITY": 4,
    "GROUP": 5,
    "USER": 6,
    "QRCODE": 7,
    "PROMOTION_BOT": 8,
    "CONTACT_MESSAGE": 9,
    "FRIEND_REQUEST": 10,
    "REPAIR": 128,
    "FACEBOOK": 2305,
    "SINA": 2306,
    "RENREN": 2307,
    "FEIXIN": 2308,
    "BBM": 2309,
    "BEACON": 11,
  }

class GroupPreferenceAttribute:
  INVITATION_TICKET = 1
  FAVORITE_TIMESTAMP = 2

  _VALUES_TO_NAMES = {
    1: "INVITATION_TICKET",
    2: "FAVORITE_TIMESTAMP",
  }

  _NAMES_TO_VALUES = {
    "INVITATION_TICKET": 1,
    "FAVORITE_TIMESTAMP": 2,
  }

class ContentType:
  NONE = 0
  IMAGE = 1
  VIDEO = 2
  AUDIO = 3
  HTML = 4
  PDF = 5
  CALL = 6
  STICKER = 7
  PRESENCE = 8
  GIFT = 9
  GROUPBOARD = 10
  APPLINK = 11
  LINK = 12
  CONTACT = 13
  FILE = 14
  LOCATION = 15
  POSTNOTIFICATION = 16
  RICH = 17
  CHATEVENT = 18
  MUSIC = 19
  PAYMENT = 20
  EXTIMAGE = 21

  _VALUES_TO_NAMES = {
    0: "NONE",
    1: "IMAGE",
    2: "VIDEO",
    3: "AUDIO",
    4: "HTML",
    5: "PDF",
    6: "CALL",
    7: "STICKER",
    8: "PRESENCE",
    9: "GIFT",
    10: "GROUPBOARD",
    11: "APPLINK",
    12: "LINK",
    13: "CONTACT",
    14: "FILE",
    15: "LOCATION",
    16: "POSTNOTIFICATION",
    17: "RICH",
    18: "CHATEVENT",
    19: "MUSIC",
    20: "PAYMENT",
    21: "EXTIMAGE",
  }

  _NAMES_TO_VALUES = {
    "NONE": 0,
    "IMAGE": 1,
    "VIDEO": 2,
    "AUDIO": 3,
    "HTML": 4,
    "PDF": 5,
    "CALL": 6,
    "STICKER": 7,
    "PRESENCE": 8,
    "GIFT": 9,
    "GROUPBOARD": 10,
    "APPLINK": 11,
    "LINK": 12,
    "CONTACT": 13,
    "FILE": 14,
    "LOCATION": 15,
    "POSTNOTIFICATION": 16,
    "RICH": 17,
    "CHATEVENT": 18,
    "MUSIC": 19,
    "PAYMENT": 20,
    "EXTIMAGE": 21,
  }

class MessageRelationType:
  FORWARD = 0
  AUTO_REPLY = 1
  SUBORDINATE = 2

  _VALUES_TO_NAMES = {
    0: "FORWARD",
    1: "AUTO_REPLY",
    2: "SUBORDINATE",
  }

  _NAMES_TO_VALUES = {
    "FORWARD": 0,
    "AUTO_REPLY": 1,
    "SUBORDINATE": 2,
  }

class CustomMode:
  PROMOTION_FRIENDS_INVITE = 1
  CAPABILITY_SERVER_SIDE_SMS = 2
  LINE_CLIENT_ANALYTICS_CONFIGURATION = 3

  _VALUES_TO_NAMES = {
    1: "PROMOTION_FRIENDS_INVITE",
    2: "CAPABILITY_SERVER_SIDE_SMS",
    3: "LINE_CLIENT_ANALYTICS_CONFIGURATION",
  }

  _NAMES_TO_VALUES = {
    "PROMOTION_FRIENDS_INVITE": 1,
    "CAPABILITY_SERVER_SIDE_SMS": 2,
    "LINE_CLIENT_ANALYTICS_CONFIGURATION": 3,
  }

class RoomAttribute:
  ALL = 255
  NOTIFICATION_SETTING = 1

  _VALUES_TO_NAMES = {
    255: "ALL",
    1: "NOTIFICATION_SETTING",
  }

  _NAMES_TO_VALUES = {
    "ALL": 255,
    "NOTIFICATION_SETTING": 1,
  }

class UserStatus:
  NORMAL = 0
  UNBOUND = 1
  UNREGISTERED = 2

  _VALUES_TO_NAMES = {
    0: "NORMAL",
    1: "UNBOUND",
    2: "UNREGISTERED",
  }

  _NAMES_TO_VALUES = {
    "NORMAL": 0,
    "UNBOUND": 1,
    "UNREGISTERED": 2,
  }

class EmailConfirmationStatus:
  NOT_SPECIFIED = 0
  NOT_YET = 1
  DONE = 3
  NEED_ENFORCED_INPUT = 4

  _VALUES_TO_NAMES = {
    0: "NOT_SPECIFIED",
    1: "NOT_YET",
    3: "DONE",
    4: "NEED_ENFORCED_INPUT",
  }

  _NAMES_TO_VALUES = {
    "NOT_SPECIFIED": 0,
    "NOT_YET": 1,
    "DONE": 3,
    "NEED_ENFORCED_INPUT": 4,
  }

class AccountMigrationPincodeType:
  NOT_APPLICABLE = 0
  NOT_SET = 1
  SET = 2
  NEED_ENFORCED_INPUT = 3

  _VALUES_TO_NAMES = {
    0: "NOT_APPLICABLE",
    1: "NOT_SET",
    2: "SET",
    3: "NEED_ENFORCED_INPUT",
  }

  _NAMES_TO_VALUES = {
    "NOT_APPLICABLE": 0,
    "NOT_SET": 1,
    "SET": 2,
    "NEED_ENFORCED_INPUT": 3,
  }

class AccountMigrationCheckType:
  SKIP = 0
  PINCODE = 1
  SECURITY_CENTER = 2

  _VALUES_TO_NAMES = {
    0: "SKIP",
    1: "PINCODE",
    2: "SECURITY_CENTER",
  }

  _NAMES_TO_VALUES = {
    "SKIP": 0,
    "PINCODE": 1,
    "SECURITY_CENTER": 2,
  }

class SecurityCenterSettingsType:
  NOT_APPLICABLE = 0
  NOT_SET = 1
  SET = 2
  NEED_ENFORCED_INPUT = 3

  _VALUES_TO_NAMES = {
    0: "NOT_APPLICABLE",
    1: "NOT_SET",
    2: "SET",
    3: "NEED_ENFORCED_INPUT",
  }

  _NAMES_TO_VALUES = {
    "NOT_APPLICABLE": 0,
    "NOT_SET": 1,
    "SET": 2,
    "NEED_ENFORCED_INPUT": 3,
  }

class EmailConfirmationType:
  SERVER_SIDE_EMAIL = 0
  CLIENT_SIDE_EMAIL = 1

  _VALUES_TO_NAMES = {
    0: "SERVER_SIDE_EMAIL",
    1: "CLIENT_SIDE_EMAIL",
  }

  _NAMES_TO_VALUES = {
    "SERVER_SIDE_EMAIL": 0,
    "CLIENT_SIDE_EMAIL": 1,
  }

class SquareChatAnnouncementType:
  TEXT_MESSAGE = 0

  _VALUES_TO_NAMES = {
    0: "TEXT_MESSAGE",
  }

  _NAMES_TO_VALUES = {
    "TEXT_MESSAGE": 0,
  }

class SquareChatAttribute:
  NAME = 2
  SQUARE_CHAT_IMAGE = 3
  STATE = 4

  _VALUES_TO_NAMES = {
    2: "NAME",
    3: "SQUARE_CHAT_IMAGE",
    4: "STATE",
  }

  _NAMES_TO_VALUES = {
    "NAME": 2,
    "SQUARE_CHAT_IMAGE": 3,
    "STATE": 4,
  }

class SquareMemberAttribute:
  DISPLAY_NAME = 1
  PROFILE_IMAGE = 2
  ABLE_TO_RECEIVE_MESSAGE = 3
  MEMBERSHIP_STATE = 5
  ROLE = 6
  PREFERENCE = 7

  _VALUES_TO_NAMES = {
    1: "DISPLAY_NAME",
    2: "PROFILE_IMAGE",
    3: "ABLE_TO_RECEIVE_MESSAGE",
    5: "MEMBERSHIP_STATE",
    6: "ROLE",
    7: "PREFERENCE",
  }

  _NAMES_TO_VALUES = {
    "DISPLAY_NAME": 1,
    "PROFILE_IMAGE": 2,
    "ABLE_TO_RECEIVE_MESSAGE": 3,
    "MEMBERSHIP_STATE": 5,
    "ROLE": 6,
    "PREFERENCE": 7,
  }

class SquareMemberRelationAttribute:
  BLOCKED = 1

  _VALUES_TO_NAMES = {
    1: "BLOCKED",
  }

  _NAMES_TO_VALUES = {
    "BLOCKED": 1,
  }

class SquarePreferenceAttribute:
  FAVORITE = 1
  NOTI_FOR_NEW_JOIN_REQUEST = 2

  _VALUES_TO_NAMES = {
    1: "FAVORITE",
    2: "NOTI_FOR_NEW_JOIN_REQUEST",
  }

  _NAMES_TO_VALUES = {
    "FAVORITE": 1,
    "NOTI_FOR_NEW_JOIN_REQUEST": 2,
  }

class SquareState:
  ALIVE = 0
  DELETED = 1
  SUSPENDED = 2

  _VALUES_TO_NAMES = {
    0: "ALIVE",
    1: "DELETED",
    2: "SUSPENDED",
  }

  _NAMES_TO_VALUES = {
    "ALIVE": 0,
    "DELETED": 1,
    "SUSPENDED": 2,
  }

class CommitMessageResultCode:
  DELIVERED = 0
  DELIVERY_SKIPPED = 1
  DELIVERY_RESTRICTED = 2

  _VALUES_TO_NAMES = {
    0: "DELIVERED",
    1: "DELIVERY_SKIPPED",
    2: "DELIVERY_RESTRICTED",
  }

  _NAMES_TO_VALUES = {
    "DELIVERED": 0,
    "DELIVERY_SKIPPED": 1,
    "DELIVERY_RESTRICTED": 2,
  }

class ErrorCode:
  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
  EXPIRED_REVISION = 52
  NOT_YET_PHONE_NUMBER = 54
  BAD_CALL_NUMBER = 55
  UNAVAILABLE_CALL_NUMBER = 56
  NOT_SUPPORT_CALL_SERVICE = 57
  CONGESTION_CONTROL = 58
  NO_BALANCE = 59
  NOT_PERMITTED_CALLER_ID = 60
  NO_CALLER_ID_LIMIT_EXCEEDED = 61
  CALLER_ID_VERIFICATION_REQUIRED = 62
  NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED = 63
  MESSAGE_NOT_FOUND = 64
  INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT = 65
  ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED = 66
  ACCOUNT_MIGRATION_PINCODE_BLOCKED = 67
  INVALID_PASSWORD_FORMAT = 69
  FEATURE_RESTRICTED = 70
  MESSAGE_NOT_DESTRUCTIBLE = 71
  PAID_CALL_REDEEM_FAILED = 72
  PREVENTED_JOIN_BY_TICKET = 73
  SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT = 75
  SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY = 76
  SECURITY_CENTER_NOT_VERIFIED = 77
  SECURITY_CENTER_BLOCKED_BY_SETTING = 78
  SECURITY_CENTER_BLOCKED = 79
  TALK_PROXY_EXCEPTION = 80
  E2EE_INVALID_PROTOCOL = 81
  E2EE_RETRY_ENCRYPT = 82
  E2EE_UPDATE_SENDER_KEY = 83
  E2EE_UPDATE_RECEIVER_KEY = 84
  E2EE_INVALID_ARGUMENT = 85
  E2EE_INVALID_VERSION = 86
  E2EE_SENDER_DISABLED = 87
  E2EE_RECEIVER_DISABLED = 88
  E2EE_SENDER_NOT_ALLOWED = 89
  E2EE_RECEIVER_NOT_ALLOWED = 90
  E2EE_RESEND_FAIL = 91
  E2EE_RESEND_OK = 92
  HITOKOTO_BACKUP_NO_AVAILABLE_DATA = 93
  E2EE_UPDATE_PRIMARY_DEVICE = 94
  SUCCESS = 95
  CANCEL = 96
  E2EE_PRIMARY_NOT_SUPPORT = 97
  E2EE_RETRY_PLAIN = 98
  E2EE_RECREATE_GROUP_KEY = 99
  E2EE_GROUP_TOO_MANY_MEMBERS = 100
  SERVER_BUSY = 101
  NOT_ALLOWED_ADD_FOLLOW = 102
  INCOMING_FRIEND_REQUEST_LIMIT = 103
  OUTGOING_FRIEND_REQUEST_LIMIT = 104
  OUTGOING_FRIEND_REQUEST_QUOTA = 105
  DUPLICATED = 106
  BANNED = 107

  _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",
    52: "EXPIRED_REVISION",
    54: "NOT_YET_PHONE_NUMBER",
    55: "BAD_CALL_NUMBER",
    56: "UNAVAILABLE_CALL_NUMBER",
    57: "NOT_SUPPORT_CALL_SERVICE",
    58: "CONGESTION_CONTROL",
    59: "NO_BALANCE",
    60: "NOT_PERMITTED_CALLER_ID",
    61: "NO_CALLER_ID_LIMIT_EXCEEDED",
    62: "CALLER_ID_VERIFICATION_REQUIRED",
    63: "NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED",
    64: "MESSAGE_NOT_FOUND",
    65: "INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT",
    66: "ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED",
    67: "ACCOUNT_MIGRATION_PINCODE_BLOCKED",
    69: "INVALID_PASSWORD_FORMAT",
    70: "FEATURE_RESTRICTED",
    71: "MESSAGE_NOT_DESTRUCTIBLE",
    72: "PAID_CALL_REDEEM_FAILED",
    73: "PREVENTED_JOIN_BY_TICKET",
    75: "SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT",
    76: "SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY",
    77: "SECURITY_CENTER_NOT_VERIFIED",
    78: "SECURITY_CENTER_BLOCKED_BY_SETTING",
    79: "SECURITY_CENTER_BLOCKED",
    80: "TALK_PROXY_EXCEPTION",
    81: "E2EE_INVALID_PROTOCOL",
    82: "E2EE_RETRY_ENCRYPT",
    83: "E2EE_UPDATE_SENDER_KEY",
    84: "E2EE_UPDATE_RECEIVER_KEY",
    85: "E2EE_INVALID_ARGUMENT",
    86: "E2EE_INVALID_VERSION",
    87: "E2EE_SENDER_DISABLED",
    88: "E2EE_RECEIVER_DISABLED",
    89: "E2EE_SENDER_NOT_ALLOWED",
    90: "E2EE_RECEIVER_NOT_ALLOWED",
    91: "E2EE_RESEND_FAIL",
    92: "E2EE_RESEND_OK",
    93: "HITOKOTO_BACKUP_NO_AVAILABLE_DATA",
    94: "E2EE_UPDATE_PRIMARY_DEVICE",
    95: "SUCCESS",
    96: "CANCEL",
    97: "E2EE_PRIMARY_NOT_SUPPORT",
    98: "E2EE_RETRY_PLAIN",
    99: "E2EE_RECREATE_GROUP_KEY",
    100: "E2EE_GROUP_TOO_MANY_MEMBERS",
    101: "SERVER_BUSY",
    102: "NOT_ALLOWED_ADD_FOLLOW",
    103: "INCOMING_FRIEND_REQUEST_LIMIT",
    104: "OUTGOING_FRIEND_REQUEST_LIMIT",
    105: "OUTGOING_FRIEND_REQUEST_QUOTA",
    106: "DUPLICATED",
    107: "BANNED",
  }

  _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,
    "EXPIRED_REVISION": 52,
    "NOT_YET_PHONE_NUMBER": 54,
    "BAD_CALL_NUMBER": 55,
    "UNAVAILABLE_CALL_NUMBER": 56,
    "NOT_SUPPORT_CALL_SERVICE": 57,
    "CONGESTION_CONTROL": 58,
    "NO_BALANCE": 59,
    "NOT_PERMITTED_CALLER_ID": 60,
    "NO_CALLER_ID_LIMIT_EXCEEDED": 61,
    "CALLER_ID_VERIFICATION_REQUIRED": 62,
    "NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED": 63,
    "MESSAGE_NOT_FOUND": 64,
    "INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT": 65,
    "ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED": 66,
    "ACCOUNT_MIGRATION_PINCODE_BLOCKED": 67,
    "INVALID_PASSWORD_FORMAT": 69,
    "FEATURE_RESTRICTED": 70,
    "MESSAGE_NOT_DESTRUCTIBLE": 71,
    "PAID_CALL_REDEEM_FAILED": 72,
    "PREVENTED_JOIN_BY_TICKET": 73,
    "SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT": 75,
    "SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY": 76,
    "SECURITY_CENTER_NOT_VERIFIED": 77,
    "SECURITY_CENTER_BLOCKED_BY_SETTING": 78,
    "SECURITY_CENTER_BLOCKED": 79,
    "TALK_PROXY_EXCEPTION": 80,
    "E2EE_INVALID_PROTOCOL": 81,
    "E2EE_RETRY_ENCRYPT": 82,
    "E2EE_UPDATE_SENDER_KEY": 83,
    "E2EE_UPDATE_RECEIVER_KEY": 84,
    "E2EE_INVALID_ARGUMENT": 85,
    "E2EE_INVALID_VERSION": 86,
    "E2EE_SENDER_DISABLED": 87,
    "E2EE_RECEIVER_DISABLED": 88,
    "E2EE_SENDER_NOT_ALLOWED": 89,
    "E2EE_RECEIVER_NOT_ALLOWED": 90,
    "E2EE_RESEND_FAIL": 91,
    "E2EE_RESEND_OK": 92,
    "HITOKOTO_BACKUP_NO_AVAILABLE_DATA": 93,
    "E2EE_UPDATE_PRIMARY_DEVICE": 94,
    "SUCCESS": 95,
    "CANCEL": 96,
    "E2EE_PRIMARY_NOT_SUPPORT": 97,
    "E2EE_RETRY_PLAIN": 98,
    "E2EE_RECREATE_GROUP_KEY": 99,
    "E2EE_GROUP_TOO_MANY_MEMBERS": 100,
    "SERVER_BUSY": 101,
    "NOT_ALLOWED_ADD_FOLLOW": 102,
    "INCOMING_FRIEND_REQUEST_LIMIT": 103,
    "OUTGOING_FRIEND_REQUEST_LIMIT": 104,
    "OUTGOING_FRIEND_REQUEST_QUOTA": 105,
    "DUPLICATED": 106,
    "BANNED": 107,
  }

class FeatureType:
  OBS_VIDEO = 1
  OBS_GENERAL = 2

  _VALUES_TO_NAMES = {
    1: "OBS_VIDEO",
    2: "OBS_GENERAL",
  }

  _NAMES_TO_VALUES = {
    "OBS_VIDEO": 1,
    "OBS_GENERAL": 2,
  }

class GroupAttribute:
  NAME = 1
  PICTURE_STATUS = 2
  ALL = 255
  PREVENTED_JOIN_BY_TICKET = 4
  NOTIFICATION_SETTING = 8

  _VALUES_TO_NAMES = {
    1: "NAME",
    2: "PICTURE_STATUS",
    255: "ALL",
    4: "PREVENTED_JOIN_BY_TICKET",
    8: "NOTIFICATION_SETTING",
  }

  _NAMES_TO_VALUES = {
    "NAME": 1,
    "PICTURE_STATUS": 2,
    "ALL": 255,
    "PREVENTED_JOIN_BY_TICKET": 4,
    "NOTIFICATION_SETTING": 8,
  }

class IdentityProvider:
  UNKNOWN = 0
  LINE = 1
  NAVER_KR = 2
  LINE_PHONE = 3

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

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

class LoginResultType:
  SUCCESS = 1
  REQUIRE_QRCODE = 2
  REQUIRE_DEVICE_CONFIRM = 3
  REQUIRE_SMS_CONFIRM = 4

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

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

class MessageOperationType:
  SEND_MESSAGE = 1
  RECEIVE_MESSAGE = 2
  READ_MESSAGE = 3
  NOTIFIED_READ_MESSAGE = 4
  NOTIFIED_JOIN_CHAT = 5
  FAILED_SEND_MESSAGE = 6
  SEND_CONTENT = 7
  SEND_CONTENT_RECEIPT = 8
  SEND_CHAT_REMOVED = 9
  REMOVE_ALL_MESSAGES = 10

  _VALUES_TO_NAMES = {
    1: "SEND_MESSAGE",
    2: "RECEIVE_MESSAGE",
    3: "READ_MESSAGE",
    4: "NOTIFIED_READ_MESSAGE",
    5: "NOTIFIED_JOIN_CHAT",
    6: "FAILED_SEND_MESSAGE",
    7: "SEND_CONTENT",
    8: "SEND_CONTENT_RECEIPT",
    9: "SEND_CHAT_REMOVED",
    10: "REMOVE_ALL_MESSAGES",
  }

  _NAMES_TO_VALUES = {
    "SEND_MESSAGE": 1,
    "RECEIVE_MESSAGE": 2,
    "READ_MESSAGE": 3,
    "NOTIFIED_READ_MESSAGE": 4,
    "NOTIFIED_JOIN_CHAT": 5,
    "FAILED_SEND_MESSAGE": 6,
    "SEND_CONTENT": 7,
    "SEND_CONTENT_RECEIPT": 8,
    "SEND_CHAT_REMOVED": 9,
    "REMOVE_ALL_MESSAGES": 10,
  }

class MIDType:
  USER = 0
  ROOM = 1
  GROUP = 2
  SQUARE = 3
  SQUARE_CHAT = 4
  SQUARE_MEMBER = 5
  BOT = 6

  _VALUES_TO_NAMES = {
    0: "USER",
    1: "ROOM",
    2: "GROUP",
    3: "SQUARE",
    4: "SQUARE_CHAT",
    5: "SQUARE_MEMBER",
    6: "BOT",
  }

  _NAMES_TO_VALUES = {
    "USER": 0,
    "ROOM": 1,
    "GROUP": 2,
    "SQUARE": 3,
    "SQUARE_CHAT": 4,
    "SQUARE_MEMBER": 5,
    "BOT": 6,
  }

class ServiceCode:
  UNKNOWN = 0
  TALK = 1
  SQUARE = 2

  _VALUES_TO_NAMES = {
    0: "UNKNOWN",
    1: "TALK",
    2: "SQUARE",
  }

  _NAMES_TO_VALUES = {
    "UNKNOWN": 0,
    "TALK": 1,
    "SQUARE": 2,
  }

class FriendRequestDirection:
  INCOMING = 1
  OUTGOING = 2

  _VALUES_TO_NAMES = {
    1: "INCOMING",
    2: "OUTGOING",
  }

  _NAMES_TO_VALUES = {
    "INCOMING": 1,
    "OUTGOING": 2,
  }

class FriendRequestMethod:
  TIMELINE = 1
  NEARBY = 2
  SQUARE = 3

  _VALUES_TO_NAMES = {
    1: "TIMELINE",
    2: "NEARBY",
    3: "SQUARE",
  }

  _NAMES_TO_VALUES = {
    "TIMELINE": 1,
    "NEARBY": 2,
    "SQUARE": 3,
  }

class FriendRequestStatus:
  NONE = 0
  AVAILABLE = 1
  ALREADY_REQUESTED = 2
  UNAVAILABLE = 3

  _VALUES_TO_NAMES = {
    0: "NONE",
    1: "AVAILABLE",
    2: "ALREADY_REQUESTED",
    3: "UNAVAILABLE",
  }

  _NAMES_TO_VALUES = {
    "NONE": 0,
    "AVAILABLE": 1,
    "ALREADY_REQUESTED": 2,
    "UNAVAILABLE": 3,
  }

class ModificationType:
  ADD = 0
  REMOVE = 1
  MODIFY = 2

  _VALUES_TO_NAMES = {
    0: "ADD",
    1: "REMOVE",
    2: "MODIFY",
  }

  _NAMES_TO_VALUES = {
    "ADD": 0,
    "REMOVE": 1,
    "MODIFY": 2,
  }

class NotificationItemFetchMode:
  ALL = 0
  APPEND = 1

  _VALUES_TO_NAMES = {
    0: "ALL",
    1: "APPEND",
  }

  _NAMES_TO_VALUES = {
    "ALL": 0,
    "APPEND": 1,
  }

class NotificationQueueType:
  GLOBAL = 1
  MESSAGE = 2
  PRIMARY = 3

  _VALUES_TO_NAMES = {
    1: "GLOBAL",
    2: "MESSAGE",
    3: "PRIMARY",
  }

  _NAMES_TO_VALUES = {
    "GLOBAL": 1,
    "MESSAGE": 2,
    "PRIMARY": 3,
  }

class GroupCallMediaType:
  AUDIO = 1
  VIDEO = 2

  _VALUES_TO_NAMES = {
    1: "AUDIO",
    2: "VIDEO",
  }

  _NAMES_TO_VALUES = {
    "AUDIO": 1,
    "VIDEO": 2,
  }

class PersonalInfo:
  EMAIL = 0
  PHONE = 1
  BIRTHDAY = 2
  RAW_BIRTHDAY = 3

  _VALUES_TO_NAMES = {
    0: "EMAIL",
    1: "PHONE",
    2: "BIRTHDAY",
    3: "RAW_BIRTHDAY",
  }

  _NAMES_TO_VALUES = {
    "EMAIL": 0,
    "PHONE": 1,
    "BIRTHDAY": 2,
    "RAW_BIRTHDAY": 3,
  }

class NotificationStatus:
  NOTIFICATION_ITEM_EXIST = 1
  TIMELINE_ITEM_EXIST = 2
  NOTE_GROUP_NEW_ITEM_EXIST = 4
  TIMELINE_BUDDYGROUP_CHANGED = 8
  NOTE_ONE_TO_ONE_NEW_ITEM_EXIST = 16
  ALBUM_ITEM_EXIST = 32
  TIMELINE_ITEM_DELETED = 64
  OTOGROUP_ITEM_EXIST = 128
  GROUPHOME_NEW_ITEM_EXIST = 256
  GROUPHOME_HIDDEN_ITEM_CHANGED = 512
  NOTIFICATION_ITEM_CHANGED = 1024
  BEAD_ITEM_HIDE = 2048
  BEAD_ITEM_SHOW = 4096

  _VALUES_TO_NAMES = {
    1: "NOTIFICATION_ITEM_EXIST",
    2: "TIMELINE_ITEM_EXIST",
    4: "NOTE_GROUP_NEW_ITEM_EXIST",
    8: "TIMELINE_BUDDYGROUP_CHANGED",
    16: "NOTE_ONE_TO_ONE_NEW_ITEM_EXIST",
    32: "ALBUM_ITEM_EXIST",
    64: "TIMELINE_ITEM_DELETED",
    128: "OTOGROUP_ITEM_EXIST",
    256: "GROUPHOME_NEW_ITEM_EXIST",
    512: "GROUPHOME_HIDDEN_ITEM_CHANGED",
    1024: "NOTIFICATION_ITEM_CHANGED",
    2048: "BEAD_ITEM_HIDE",
    4096: "BEAD_ITEM_SHOW",
  }

  _NAMES_TO_VALUES = {
    "NOTIFICATION_ITEM_EXIST": 1,
    "TIMELINE_ITEM_EXIST": 2,
    "NOTE_GROUP_NEW_ITEM_EXIST": 4,
    "TIMELINE_BUDDYGROUP_CHANGED": 8,
    "NOTE_ONE_TO_ONE_NEW_ITEM_EXIST": 16,
    "ALBUM_ITEM_EXIST": 32,
    "TIMELINE_ITEM_DELETED": 64,
    "OTOGROUP_ITEM_EXIST": 128,
    "GROUPHOME_NEW_ITEM_EXIST": 256,
    "GROUPHOME_HIDDEN_ITEM_CHANGED": 512,
    "NOTIFICATION_ITEM_CHANGED": 1024,
    "BEAD_ITEM_HIDE": 2048,
    "BEAD_ITEM_SHOW": 4096,
  }

class NotificationType:
  APPLE_APNS = 1
  GOOGLE_C2DM = 2
  NHN_NNI = 3
  SKT_AOM = 4
  MS_MPNS = 5
  RIM_BIS = 6
  GOOGLE_GCM = 7
  NOKIA_NNAPI = 8
  TIZEN = 9
  LINE_BOT = 17
  LINE_WAP = 18
  APPLE_APNS_VOIP = 19
  MS_WNS = 20
  GOOGLE_FCM = 21

  _VALUES_TO_NAMES = {
    1: "APPLE_APNS",
    2: "GOOGLE_C2DM",
    3: "NHN_NNI",
    4: "SKT_AOM",
    5: "MS_MPNS",
    6: "RIM_BIS",
    7: "GOOGLE_GCM",
    8: "NOKIA_NNAPI",
    9: "TIZEN",
    17: "LINE_BOT",
    18: "LINE_WAP",
    19: "APPLE_APNS_VOIP",
    20: "MS_WNS",
    21: "GOOGLE_FCM",
  }

  _NAMES_TO_VALUES = {
    "APPLE_APNS": 1,
    "GOOGLE_C2DM": 2,
    "NHN_NNI": 3,
    "SKT_AOM": 4,
    "MS_MPNS": 5,
    "RIM_BIS": 6,
    "GOOGLE_GCM": 7,
    "NOKIA_NNAPI": 8,
    "TIZEN": 9,
    "LINE_BOT": 17,
    "LINE_WAP": 18,
    "APPLE_APNS_VOIP": 19,
    "MS_WNS": 20,
    "GOOGLE_FCM": 21,
  }

class OpStatus:
  NORMAL = 0
  ALERT_DISABLED = 1
  ALWAYS = 2

  _VALUES_TO_NAMES = {
    0: "NORMAL",
    1: "ALERT_DISABLED",
    2: "ALWAYS",
  }

  _NAMES_TO_VALUES = {
    "NORMAL": 0,
    "ALERT_DISABLED": 1,
    "ALWAYS": 2,
  }

class OpType:
  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
  RECEIVE_ANNOUNCEMENT = 30
  NOTIFIED_UNREGISTER_USER = 33
  INVITE_VIA_EMAIL = 38
  NOTIFIED_REGISTER_USER = 37
  NOTIFIED_REQUEST_RECOVERY = 39
  SEND_CHAT_CHECKED = 40
  SEND_CHAT_REMOVED = 41
  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_CHAT_CONTENT = 58
  NOTIFIED_PUSH_NOTICENTER_ITEM = 59
  NOTIFIED_JOIN_CHAT = 60
  NOTIFIED_LEAVE_CHAT = 61
  NOTIFIED_TYPING = 62
  FRIEND_REQUEST_ACCEPTED = 63
  DESTROY_MESSAGE = 64
  NOTIFIED_DESTROY_MESSAGE = 65
  UPDATE_PUBLICKEYCHAIN = 66
  NOTIFIED_UPDATE_PUBLICKEYCHAIN = 67
  NOTIFIED_BLOCK_CONTACT = 68
  NOTIFIED_UNBLOCK_CONTACT = 69
  UPDATE_GROUPPREFERENCE = 70
  NOTIFIED_PAYMENT_EVENT = 71
  REGISTER_E2EE_PUBLICKEY = 72
  NOTIFIED_E2EE_KEY_EXCHANGE_REQ = 73
  NOTIFIED_E2EE_KEY_EXCHANGE_RESP = 74
  NOTIFIED_E2EE_MESSAGE_RESEND_REQ = 75
  NOTIFIED_E2EE_MESSAGE_RESEND_RESP = 76
  NOTIFIED_E2EE_KEY_UPDATE = 77
  NOTIFIED_BUDDY_UPDATE_PROFILE = 78
  NOTIFIED_UPDATE_LINEAT_TABS = 79
  UPDATE_ROOM = 80
  NOTIFIED_BEACON_DETECTED = 81
  UPDATE_EXTENDED_PROFILE = 82
  ADD_FOLLOW = 83
  NOTIFIED_ADD_FOLLOW = 84
  DELETE_FOLLOW = 85
  NOTIFIED_DELETE_FOLLOW = 86
  UPDATE_TIMELINE_SETTINGS = 87
  NOTIFIED_FRIEND_REQUEST = 88
  UPDATE_RINGBACK_TONE = 89
  NOTIFIED_POSTBACK = 90
  RECEIVE_READ_WATERMARK = 91
  NOTIFIED_MESSAGE_DELIVERED = 92
  NOTIFIED_UPDATE_CHAT_BAR = 93
  NOTIFIED_CHATAPP_INSTALLED = 94
  NOTIFIED_CHATAPP_UPDATED = 95
  NOTIFIED_CHATAPP_NEW_MARK = 96
  NOTIFIED_CHATAPP_DELETED = 97
  NOTIFIED_CHATAPP_SYNC = 98
  NOTIFIED_UPDATE_MESSAGE = 99

  _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",
    30: "RECEIVE_ANNOUNCEMENT",
    33: "NOTIFIED_UNREGISTER_USER",
    38: "INVITE_VIA_EMAIL",
    37: "NOTIFIED_REGISTER_USER",
    39: "NOTIFIED_REQUEST_RECOVERY",
    40: "SEND_CHAT_CHECKED",
    41: "SEND_CHAT_REMOVED",
    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",
    58: "NOTIFIED_CHAT_CONTENT",
    59: "NOTIFIED_PUSH_NOTICENTER_ITEM",
    60: "NOTIFIED_JOIN_CHAT",
    61: "NOTIFIED_LEAVE_CHAT",
    62: "NOTIFIED_TYPING",
    63: "FRIEND_REQUEST_ACCEPTED",
    64: "DESTROY_MESSAGE",
    65: "NOTIFIED_DESTROY_MESSAGE",
    66: "UPDATE_PUBLICKEYCHAIN",
    67: "NOTIFIED_UPDATE_PUBLICKEYCHAIN",
    68: "NOTIFIED_BLOCK_CONTACT",
    69: "NOTIFIED_UNBLOCK_CONTACT",
    70: "UPDATE_GROUPPREFERENCE",
    71: "NOTIFIED_PAYMENT_EVENT",
    72: "REGISTER_E2EE_PUBLICKEY",
    73: "NOTIFIED_E2EE_KEY_EXCHANGE_REQ",
    74: "NOTIFIED_E2EE_KEY_EXCHANGE_RESP",
    75: "NOTIFIED_E2EE_MESSAGE_RESEND_REQ",
    76: "NOTIFIED_E2EE_MESSAGE_RESEND_RESP",
    77: "NOTIFIED_E2EE_KEY_UPDATE",
    78: "NOTIFIED_BUDDY_UPDATE_PROFILE",
    79: "NOTIFIED_UPDATE_LINEAT_TABS",
    80: "UPDATE_ROOM",
    81: "NOTIFIED_BEACON_DETECTED",
    82: "UPDATE_EXTENDED_PROFILE",
    83: "ADD_FOLLOW",
    84: "NOTIFIED_ADD_FOLLOW",
    85: "DELETE_FOLLOW",
    86: "NOTIFIED_DELETE_FOLLOW",
    87: "UPDATE_TIMELINE_SETTINGS",
    88: "NOTIFIED_FRIEND_REQUEST",
    89: "UPDATE_RINGBACK_TONE",
    90: "NOTIFIED_POSTBACK",
    91: "RECEIVE_READ_WATERMARK",
    92: "NOTIFIED_MESSAGE_DELIVERED",
    93: "NOTIFIED_UPDATE_CHAT_BAR",
    94: "NOTIFIED_CHATAPP_INSTALLED",
    95: "NOTIFIED_CHATAPP_UPDATED",
    96: "NOTIFIED_CHATAPP_NEW_MARK",
    97: "NOTIFIED_CHATAPP_DELETED",
    98: "NOTIFIED_CHATAPP_SYNC",
    99: "NOTIFIED_UPDATE_MESSAGE",
  }

  _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,
    "RECEIVE_ANNOUNCEMENT": 30,
    "NOTIFIED_UNREGISTER_USER": 33,
    "INVITE_VIA_EMAIL": 38,
    "NOTIFIED_REGISTER_USER": 37,
    "NOTIFIED_REQUEST_RECOVERY": 39,
    "SEND_CHAT_CHECKED": 40,
    "SEND_CHAT_REMOVED": 41,
    "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_CHAT_CONTENT": 58,
    "NOTIFIED_PUSH_NOTICENTER_ITEM": 59,
    "NOTIFIED_JOIN_CHAT": 60,
    "NOTIFIED_LEAVE_CHAT": 61,
    "NOTIFIED_TYPING": 62,
    "FRIEND_REQUEST_ACCEPTED": 63,
    "DESTROY_MESSAGE": 64,
    "NOTIFIED_DESTROY_MESSAGE": 65,
    "UPDATE_PUBLICKEYCHAIN": 66,
    "NOTIFIED_UPDATE_PUBLICKEYCHAIN": 67,
    "NOTIFIED_BLOCK_CONTACT": 68,
    "NOTIFIED_UNBLOCK_CONTACT": 69,
    "UPDATE_GROUPPREFERENCE": 70,
    "NOTIFIED_PAYMENT_EVENT": 71,
    "REGISTER_E2EE_PUBLICKEY": 72,
    "NOTIFIED_E2EE_KEY_EXCHANGE_REQ": 73,
    "NOTIFIED_E2EE_KEY_EXCHANGE_RESP": 74,
    "NOTIFIED_E2EE_MESSAGE_RESEND_REQ": 75,
    "NOTIFIED_E2EE_MESSAGE_RESEND_RESP": 76,
    "NOTIFIED_E2EE_KEY_UPDATE": 77,
    "NOTIFIED_BUDDY_UPDATE_PROFILE": 78,
    "NOTIFIED_UPDATE_LINEAT_TABS": 79,
    "UPDATE_ROOM": 80,
    "NOTIFIED_BEACON_DETECTED": 81,
    "UPDATE_EXTENDED_PROFILE": 82,
    "ADD_FOLLOW": 83,
    "NOTIFIED_ADD_FOLLOW": 84,
    "DELETE_FOLLOW": 85,
    "NOTIFIED_DELETE_FOLLOW": 86,
    "UPDATE_TIMELINE_SETTINGS": 87,
    "NOTIFIED_FRIEND_REQUEST": 88,
    "UPDATE_RINGBACK_TONE": 89,
    "NOTIFIED_POSTBACK": 90,
    "RECEIVE_READ_WATERMARK": 91,
    "NOTIFIED_MESSAGE_DELIVERED": 92,
    "NOTIFIED_UPDATE_CHAT_BAR": 93,
    "NOTIFIED_CHATAPP_INSTALLED": 94,
    "NOTIFIED_CHATAPP_UPDATED": 95,
    "NOTIFIED_CHATAPP_NEW_MARK": 96,
    "NOTIFIED_CHATAPP_DELETED": 97,
    "NOTIFIED_CHATAPP_SYNC": 98,
    "NOTIFIED_UPDATE_MESSAGE": 99,
  }

class PayloadType:
  PAYLOAD_BUY = 101
  PAYLOAD_CS = 111
  PAYLOAD_BONUS = 121
  PAYLOAD_EVENT = 131

  _VALUES_TO_NAMES = {
    101: "PAYLOAD_BUY",
    111: "PAYLOAD_CS",
    121: "PAYLOAD_BONUS",
    131: "PAYLOAD_EVENT",
  }

  _NAMES_TO_VALUES = {
    "PAYLOAD_BUY": 101,
    "PAYLOAD_CS": 111,
    "PAYLOAD_BONUS": 121,
    "PAYLOAD_EVENT": 131,
  }

class PaymentPgType:
  PAYMENT_PG_NONE = 0
  PAYMENT_PG_AU = 1
  PAYMENT_PG_AL = 2

  _VALUES_TO_NAMES = {
    0: "PAYMENT_PG_NONE",
    1: "PAYMENT_PG_AU",
    2: "PAYMENT_PG_AL",
  }

  _NAMES_TO_VALUES = {
    "PAYMENT_PG_NONE": 0,
    "PAYMENT_PG_AU": 1,
    "PAYMENT_PG_AL": 2,
  }

class PaymentType:
  PAYMENT_APPLE = 1
  PAYMENT_GOOGLE = 2

  _VALUES_TO_NAMES = {
    1: "PAYMENT_APPLE",
    2: "PAYMENT_GOOGLE",
  }

  _NAMES_TO_VALUES = {
    "PAYMENT_APPLE": 1,
    "PAYMENT_GOOGLE": 2,
  }

class ProductBannerLinkType:
  BANNER_LINK_NONE = 0
  BANNER_LINK_ITEM = 1
  BANNER_LINK_URL = 2
  BANNER_LINK_CATEGORY = 3

  _VALUES_TO_NAMES = {
    0: "BANNER_LINK_NONE",
    1: "BANNER_LINK_ITEM",
    2: "BANNER_LINK_URL",
    3: "BANNER_LINK_CATEGORY",
  }

  _NAMES_TO_VALUES = {
    "BANNER_LINK_NONE": 0,
    "BANNER_LINK_ITEM": 1,
    "BANNER_LINK_URL": 2,
    "BANNER_LINK_CATEGORY": 3,
  }

class ProductEventType:
  NO_EVENT = 0
  CARRIER_ANY = 65537
  BUDDY_ANY = 131073
  INSTALL_IOS = 196609
  INSTALL_ANDROID = 196610
  MISSION_ANY = 262145
  MUSTBUY_ANY = 327681

  _VALUES_TO_NAMES = {
    0: "NO_EVENT",
    65537: "CARRIER_ANY",
    131073: "BUDDY_ANY",
    196609: "INSTALL_IOS",
    196610: "INSTALL_ANDROID",
    262145: "MISSION_ANY",
    327681: "MUSTBUY_ANY",
  }

  _NAMES_TO_VALUES = {
    "NO_EVENT": 0,
    "CARRIER_ANY": 65537,
    "BUDDY_ANY": 131073,
    "INSTALL_IOS": 196609,
    "INSTALL_ANDROID": 196610,
    "MISSION_ANY": 262145,
    "MUSTBUY_ANY": 327681,
  }

class StickerResourceType:
  STATIC = 1
  ANIMATION = 2
  SOUND = 3
  ANIMATION_SOUND = 4
  POPUP = 5
  POPUP_SOUND = 6

  _VALUES_TO_NAMES = {
    1: "STATIC",
    2: "ANIMATION",
    3: "SOUND",
    4: "ANIMATION_SOUND",
    5: "POPUP",
    6: "POPUP_SOUND",
  }

  _NAMES_TO_VALUES = {
    "STATIC": 1,
    "ANIMATION": 2,
    "SOUND": 3,
    "ANIMATION_SOUND": 4,
    "POPUP": 5,
    "POPUP_SOUND": 6,
  }

class PlaceSearchProvider:
  GOOGLE = 0
  BAIDU = 1

  _VALUES_TO_NAMES = {
    0: "GOOGLE",
    1: "BAIDU",
  }

  _NAMES_TO_VALUES = {
    "GOOGLE": 0,
    "BAIDU": 1,
  }

class PointErrorCode:
  REQUEST_DUPLICATION = 3001
  INVALID_PARAMETER = 3002
  NOT_ENOUGH_BALANCE = 3003
  AUTHENTICATION_FAIL = 3004
  API_ACCESS_FORBIDDEN = 3005
  MEMBER_ACCOUNT_NOT_FOUND = 3006
  SERVICE_ACCOUNT_NOT_FOUND = 3007
  TRANSACTION_NOT_FOUND = 3008
  ALREADY_REVERSED_TRANSACTION = 3009
  MESSAGE_NOT_READABLE = 3010
  HTTP_REQUEST_METHOD_NOT_SUPPORTED = 3011
  HTTP_MEDIA_TYPE_NOT_SUPPORTED = 3012
  NOT_ALLOWED_TO_DEPOSIT = 3013
  NOT_ALLOWED_TO_PAY = 3014
  TRANSACTION_ACCESS_FORBIDDEN = 3015
  INVALID_SERVICE_CONFIGURATION = 4001
  DCS_COMMUNICATION_FAIL = 5004
  UPDATE_BALANCE_FAIL = 5007
  SYSTEM_ERROR = 5999
  SYSTEM_MAINTENANCE = 5888

  _VALUES_TO_NAMES = {
    3001: "REQUEST_DUPLICATION",
    3002: "INVALID_PARAMETER",
    3003: "NOT_ENOUGH_BALANCE",
    3004: "AUTHENTICATION_FAIL",
    3005: "API_ACCESS_FORBIDDEN",
    3006: "MEMBER_ACCOUNT_NOT_FOUND",
    3007: "SERVICE_ACCOUNT_NOT_FOUND",
    3008: "TRANSACTION_NOT_FOUND",
    3009: "ALREADY_REVERSED_TRANSACTION",
    3010: "MESSAGE_NOT_READABLE",
    3011: "HTTP_REQUEST_METHOD_NOT_SUPPORTED",
    3012: "HTTP_MEDIA_TYPE_NOT_SUPPORTED",
    3013: "NOT_ALLOWED_TO_DEPOSIT",
    3014: "NOT_ALLOWED_TO_PAY",
    3015: "TRANSACTION_ACCESS_FORBIDDEN",
    4001: "INVALID_SERVICE_CONFIGURATION",
    5004: "DCS_COMMUNICATION_FAIL",
    5007: "UPDATE_BALANCE_FAIL",
    5999: "SYSTEM_ERROR",
    5888: "SYSTEM_MAINTENANCE",
  }

  _NAMES_TO_VALUES = {
    "REQUEST_DUPLICATION": 3001,
    "INVALID_PARAMETER": 3002,
    "NOT_ENOUGH_BALANCE": 3003,
    "AUTHENTICATION_FAIL": 3004,
    "API_ACCESS_FORBIDDEN": 3005,
    "MEMBER_ACCOUNT_NOT_FOUND": 3006,
    "SERVICE_ACCOUNT_NOT_FOUND": 3007,
    "TRANSACTION_NOT_FOUND": 3008,
    "ALREADY_REVERSED_TRANSACTION": 3009,
    "MESSAGE_NOT_READABLE": 3010,
    "HTTP_REQUEST_METHOD_NOT_SUPPORTED": 3011,
    "HTTP_MEDIA_TYPE_NOT_SUPPORTED": 3012,
    "NOT_ALLOWED_TO_DEPOSIT": 3013,
    "NOT_ALLOWED_TO_PAY": 3014,
    "TRANSACTION_ACCESS_FORBIDDEN": 3015,
    "INVALID_SERVICE_CONFIGURATION": 4001,
    "DCS_COMMUNICATION_FAIL": 5004,
    "UPDATE_BALANCE_FAIL": 5007,
    "SYSTEM_ERROR": 5999,
    "SYSTEM_MAINTENANCE": 5888,
  }

class ProfileAttribute:
  ALL = 511
  EMAIL = 1
  DISPLAY_NAME = 2
  PHONETIC_NAME = 4
  PICTURE = 8
  STATUS_MESSAGE = 16
  ALLOW_SEARCH_BY_USERID = 32
  ALLOW_SEARCH_BY_EMAIL = 64
  BUDDY_STATUS = 128
  MUSIC_PROFILE = 256

  _VALUES_TO_NAMES = {
    511: "ALL",
    1: "EMAIL",
    2: "DISPLAY_NAME",
    4: "PHONETIC_NAME",
    8: "PICTURE",
    16: "STATUS_MESSAGE",
    32: "ALLOW_SEARCH_BY_USERID",
    64: "ALLOW_SEARCH_BY_EMAIL",
    128: "BUDDY_STATUS",
    256: "MUSIC_PROFILE",
  }

  _NAMES_TO_VALUES = {
    "ALL": 511,
    "EMAIL": 1,
    "DISPLAY_NAME": 2,
    "PHONETIC_NAME": 4,
    "PICTURE": 8,
    "STATUS_MESSAGE": 16,
    "ALLOW_SEARCH_BY_USERID": 32,
    "ALLOW_SEARCH_BY_EMAIL": 64,
    "BUDDY_STATUS": 128,
    "MUSIC_PROFILE": 256,
  }

class PublicType:
  HIDDEN = 0
  PUBLIC = 1000

  _VALUES_TO_NAMES = {
    0: "HIDDEN",
    1000: "PUBLIC",
  }

  _NAMES_TO_VALUES = {
    "HIDDEN": 0,
    "PUBLIC": 1000,
  }

class RedirectType:
  NONE = 0
  EXPIRE_SECOND = 1

  _VALUES_TO_NAMES = {
    0: "NONE",
    1: "EXPIRE_SECOND",
  }

  _NAMES_TO_VALUES = {
    "NONE": 0,
    "EXPIRE_SECOND": 1,
  }

class RegistrationType:
  PHONE = 0
  EMAIL_WAP = 1
  FACEBOOK = 2305
  SINA = 2306
  RENREN = 2307
  FEIXIN = 2308

  _VALUES_TO_NAMES = {
    0: "PHONE",
    1: "EMAIL_WAP",
    2305: "FACEBOOK",
    2306: "SINA",
    2307: "RENREN",
    2308: "FEIXIN",
  }

  _NAMES_TO_VALUES = {
    "PHONE": 0,
    "EMAIL_WAP": 1,
    "FACEBOOK": 2305,
    "SINA": 2306,
    "RENREN": 2307,
    "FEIXIN": 2308,
  }

class ChatRoomAnnouncementType:
  MESSAGE = 0
  NOTE = 1

  _VALUES_TO_NAMES = {
    0: "MESSAGE",
    1: "NOTE",
  }

  _NAMES_TO_VALUES = {
    "MESSAGE": 0,
    "NOTE": 1,
  }

class SettingsAttribute:
  ALL = 2147483647
  NOTIFICATION_ENABLE = 1
  NOTIFICATION_MUTE_EXPIRATION = 2
  NOTIFICATION_NEW_MESSAGE = 4
  NOTIFICATION_GROUP_INVITATION = 8
  NOTIFICATION_SHOW_MESSAGE = 16
  NOTIFICATION_INCOMING_CALL = 32
  NOTIFICATION_SOUND_MESSAGE = 256
  NOTIFICATION_SOUND_GROUP = 512
  NOTIFICATION_DISABLED_WITH_SUB = 65536
  NOTIFICATION_PAYMENT = 131072
  PRIVACY_SYNC_CONTACTS = 64
  PRIVACY_SEARCH_BY_PHONE_NUMBER = 128
  PRIVACY_SEARCH_BY_USERID = 8192
  PRIVACY_SEARCH_BY_EMAIL = 16384
  PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN = 2097152
  PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME = 8388608
  PRIVACY_ALLOW_FRIEND_REQUEST = 1073741824
  PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND = 33554432
  PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL = 67108864
  PRIVACY_AGREE_USE_PAIDCALL = 134217728
  CONTACT_MY_TICKET = 1024
  IDENTITY_PROVIDER = 2048
  IDENTITY_IDENTIFIER = 4096
  SNS_ACCOUNT = 524288
  PHONE_REGISTRATION = 1048576
  PREFERENCE_LOCALE = 32768
  CUSTOM_MODE = 4194304
  EMAIL_CONFIRMATION_STATUS = 16777216
  ACCOUNT_MIGRATION_PINCODE = 268435456
  ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE = 536870912
  SECURITY_CENTER_SETTINGS = 262144

  _VALUES_TO_NAMES = {
    2147483647: "ALL",
    1: "NOTIFICATION_ENABLE",
    2: "NOTIFICATION_MUTE_EXPIRATION",
    4: "NOTIFICATION_NEW_MESSAGE",
    8: "NOTIFICATION_GROUP_INVITATION",
    16: "NOTIFICATION_SHOW_MESSAGE",
    32: "NOTIFICATION_INCOMING_CALL",
    256: "NOTIFICATION_SOUND_MESSAGE",
    512: "NOTIFICATION_SOUND_GROUP",
    65536: "NOTIFICATION_DISABLED_WITH_SUB",
    131072: "NOTIFICATION_PAYMENT",
    64: "PRIVACY_SYNC_CONTACTS",
    128: "PRIVACY_SEARCH_BY_PHONE_NUMBER",
    8192: "PRIVACY_SEARCH_BY_USERID",
    16384: "PRIVACY_SEARCH_BY_EMAIL",
    2097152: "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN",
    8388608: "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME",
    1073741824: "PRIVACY_ALLOW_FRIEND_REQUEST",
    33554432: "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND",
    67108864: "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL",
    134217728: "PRIVACY_AGREE_USE_PAIDCALL",
    1024: "CONTACT_MY_TICKET",
    2048: "IDENTITY_PROVIDER",
    4096: "IDENTITY_IDENTIFIER",
    524288: "SNS_ACCOUNT",
    1048576: "PHONE_REGISTRATION",
    32768: "PREFERENCE_LOCALE",
    4194304: "CUSTOM_MODE",
    16777216: "EMAIL_CONFIRMATION_STATUS",
    268435456: "ACCOUNT_MIGRATION_PINCODE",
    536870912: "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE",
    262144: "SECURITY_CENTER_SETTINGS",
  }

  _NAMES_TO_VALUES = {
    "ALL": 2147483647,
    "NOTIFICATION_ENABLE": 1,
    "NOTIFICATION_MUTE_EXPIRATION": 2,
    "NOTIFICATION_NEW_MESSAGE": 4,
    "NOTIFICATION_GROUP_INVITATION": 8,
    "NOTIFICATION_SHOW_MESSAGE": 16,
    "NOTIFICATION_INCOMING_CALL": 32,
    "NOTIFICATION_SOUND_MESSAGE": 256,
    "NOTIFICATION_SOUND_GROUP": 512,
    "NOTIFICATION_DISABLED_WITH_SUB": 65536,
    "NOTIFICATION_PAYMENT": 131072,
    "PRIVACY_SYNC_CONTACTS": 64,
    "PRIVACY_SEARCH_BY_PHONE_NUMBER": 128,
    "PRIVACY_SEARCH_BY_USERID": 8192,
    "PRIVACY_SEARCH_BY_EMAIL": 16384,
    "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN": 2097152,
    "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME": 8388608,
    "PRIVACY_ALLOW_FRIEND_REQUEST": 1073741824,
    "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND": 33554432,
    "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL": 67108864,
    "PRIVACY_AGREE_USE_PAIDCALL": 134217728,
    "CONTACT_MY_TICKET": 1024,
    "IDENTITY_PROVIDER": 2048,
    "IDENTITY_IDENTIFIER": 4096,
    "SNS_ACCOUNT": 524288,
    "PHONE_REGISTRATION": 1048576,
    "PREFERENCE_LOCALE": 32768,
    "CUSTOM_MODE": 4194304,
    "EMAIL_CONFIRMATION_STATUS": 16777216,
    "ACCOUNT_MIGRATION_PINCODE": 268435456,
    "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE": 536870912,
    "SECURITY_CENTER_SETTINGS": 262144,
  }

class SettingsAttributeEx:
  NOTIFICATION_ENABLE = 0
  NOTIFICATION_MUTE_EXPIRATION = 1
  NOTIFICATION_NEW_MESSAGE = 2
  NOTIFICATION_GROUP_INVITATION = 3
  NOTIFICATION_SHOW_MESSAGE = 4
  NOTIFICATION_INCOMING_CALL = 5
  NOTIFICATION_SOUND_MESSAGE = 8
  NOTIFICATION_SOUND_GROUP = 9
  NOTIFICATION_DISABLED_WITH_SUB = 16
  NOTIFICATION_PAYMENT = 17
  NOTIFICATION_MENTION = 40
  NOTIFICATION_THUMBNAIL = 45
  PRIVACY_SYNC_CONTACTS = 6
  PRIVACY_SEARCH_BY_PHONE_NUMBER = 7
  PRIVACY_SEARCH_BY_USERID = 13
  PRIVACY_SEARCH_BY_EMAIL = 14
  PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN = 21
  PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME = 23
  PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME = 35
  PRIVACY_ALLOW_FRIEND_REQUEST = 30
  PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND = 25
  PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL = 26
  PRIVACY_AGREE_USE_PAIDCALL = 27
  CONTACT_MY_TICKET = 10
  IDENTITY_PROVIDER = 11
  IDENTITY_IDENTIFIER = 12
  SNS_ACCOUNT = 19
  PHONE_REGISTRATION = 20
  PREFERENCE_LOCALE = 15
  CUSTOM_MODE = 22
  EMAIL_CONFIRMATION_STATUS = 24
  ACCOUNT_MIGRATION_PINCODE = 28
  ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE = 29
  SECURITY_CENTER_SETTINGS = 18
  E2EE_ENABLE = 33
  ENABLE_SOUND_TO_TEXT = 47
  HITOKOTO_BACKUP_REQUESTED = 34
  CONTACT_ALLOW_FOLLOWING = 36
  PRIVACY_ALLOW_NEARBY = 37
  AGREEMENT_NEARBY = 38
  AGREEMENT_SQUARE = 39
  ALLOW_UNREGISTRATION_SECONDARY_DEVICE = 41
  AGREEMENT_BOT_USE = 42
  AGREEMENT_SHAKE_FUNCTION = 43
  AGREEMENT_MOBILE_CONTACT_NAME = 44
  AGREEMENT_SOUND_TO_TEXT = 46

  _VALUES_TO_NAMES = {
    0: "NOTIFICATION_ENABLE",
    1: "NOTIFICATION_MUTE_EXPIRATION",
    2: "NOTIFICATION_NEW_MESSAGE",
    3: "NOTIFICATION_GROUP_INVITATION",
    4: "NOTIFICATION_SHOW_MESSAGE",
    5: "NOTIFICATION_INCOMING_CALL",
    8: "NOTIFICATION_SOUND_MESSAGE",
    9: "NOTIFICATION_SOUND_GROUP",
    16: "NOTIFICATION_DISABLED_WITH_SUB",
    17: "NOTIFICATION_PAYMENT",
    40: "NOTIFICATION_MENTION",
    45: "NOTIFICATION_THUMBNAIL",
    6: "PRIVACY_SYNC_CONTACTS",
    7: "PRIVACY_SEARCH_BY_PHONE_NUMBER",
    13: "PRIVACY_SEARCH_BY_USERID",
    14: "PRIVACY_SEARCH_BY_EMAIL",
    21: "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN",
    23: "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME",
    35: "PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME",
    30: "PRIVACY_ALLOW_FRIEND_REQUEST",
    25: "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND",
    26: "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL",
    27: "PRIVACY_AGREE_USE_PAIDCALL",
    10: "CONTACT_MY_TICKET",
    11: "IDENTITY_PROVIDER",
    12: "IDENTITY_IDENTIFIER",
    19: "SNS_ACCOUNT",
    20: "PHONE_REGISTRATION",
    15: "PREFERENCE_LOCALE",
    22: "CUSTOM_MODE",
    24: "EMAIL_CONFIRMATION_STATUS",
    28: "ACCOUNT_MIGRATION_PINCODE",
    29: "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE",
    18: "SECURITY_CENTER_SETTINGS",
    33: "E2EE_ENABLE",
    47: "ENABLE_SOUND_TO_TEXT",
    34: "HITOKOTO_BACKUP_REQUESTED",
    36: "CONTACT_ALLOW_FOLLOWING",
    37: "PRIVACY_ALLOW_NEARBY",
    38: "AGREEMENT_NEARBY",
    39: "AGREEMENT_SQUARE",
    41: "ALLOW_UNREGISTRATION_SECONDARY_DEVICE",
    42: "AGREEMENT_BOT_USE",
    43: "AGREEMENT_SHAKE_FUNCTION",
    44: "AGREEMENT_MOBILE_CONTACT_NAME",
    46: "AGREEMENT_SOUND_TO_TEXT",
  }

  _NAMES_TO_VALUES = {
    "NOTIFICATION_ENABLE": 0,
    "NOTIFICATION_MUTE_EXPIRATION": 1,
    "NOTIFICATION_NEW_MESSAGE": 2,
    "NOTIFICATION_GROUP_INVITATION": 3,
    "NOTIFICATION_SHOW_MESSAGE": 4,
    "NOTIFICATION_INCOMING_CALL": 5,
    "NOTIFICATION_SOUND_MESSAGE": 8,
    "NOTIFICATION_SOUND_GROUP": 9,
    "NOTIFICATION_DISABLED_WITH_SUB": 16,
    "NOTIFICATION_PAYMENT": 17,
    "NOTIFICATION_MENTION": 40,
    "NOTIFICATION_THUMBNAIL": 45,
    "PRIVACY_SYNC_CONTACTS": 6,
    "PRIVACY_SEARCH_BY_PHONE_NUMBER": 7,
    "PRIVACY_SEARCH_BY_USERID": 13,
    "PRIVACY_SEARCH_BY_EMAIL": 14,
    "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN": 21,
    "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME": 23,
    "PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME": 35,
    "PRIVACY_ALLOW_FRIEND_REQUEST": 30,
    "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND": 25,
    "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL": 26,
    "PRIVACY_AGREE_USE_PAIDCALL": 27,
    "CONTACT_MY_TICKET": 10,
    "IDENTITY_PROVIDER": 11,
    "IDENTITY_IDENTIFIER": 12,
    "SNS_ACCOUNT": 19,
    "PHONE_REGISTRATION": 20,
    "PREFERENCE_LOCALE": 15,
    "CUSTOM_MODE": 22,
    "EMAIL_CONFIRMATION_STATUS": 24,
    "ACCOUNT_MIGRATION_PINCODE": 28,
    "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE": 29,
    "SECURITY_CENTER_SETTINGS": 18,
    "E2EE_ENABLE": 33,
    "ENABLE_SOUND_TO_TEXT": 47,
    "HITOKOTO_BACKUP_REQUESTED": 34,
    "CONTACT_ALLOW_FOLLOWING": 36,
    "PRIVACY_ALLOW_NEARBY": 37,
    "AGREEMENT_NEARBY": 38,
    "AGREEMENT_SQUARE": 39,
    "ALLOW_UNREGISTRATION_SECONDARY_DEVICE": 41,
    "AGREEMENT_BOT_USE": 42,
    "AGREEMENT_SHAKE_FUNCTION": 43,
    "AGREEMENT_MOBILE_CONTACT_NAME": 44,
    "AGREEMENT_SOUND_TO_TEXT": 46,
  }

class SnsIdType:
  FACEBOOK = 1
  SINA = 2
  RENREN = 3
  FEIXIN = 4
  BBM = 5

  _VALUES_TO_NAMES = {
    1: "FACEBOOK",
    2: "SINA",
    3: "RENREN",
    4: "FEIXIN",
    5: "BBM",
  }

  _NAMES_TO_VALUES = {
    "FACEBOOK": 1,
    "SINA": 2,
    "RENREN": 3,
    "FEIXIN": 4,
    "BBM": 5,
  }

class SpammerReason:
  OTHER = 0
  ADVERTISING = 1
  GENDER_HARASSMENT = 2
  HARASSMENT = 3

  _VALUES_TO_NAMES = {
    0: "OTHER",
    1: "ADVERTISING",
    2: "GENDER_HARASSMENT",
    3: "HARASSMENT",
  }

  _NAMES_TO_VALUES = {
    "OTHER": 0,
    "ADVERTISING": 1,
    "GENDER_HARASSMENT": 2,
    "HARASSMENT": 3,
  }

class SyncActionType:
  SYNC = 0
  REPORT = 1

  _VALUES_TO_NAMES = {
    0: "SYNC",
    1: "REPORT",
  }

  _NAMES_TO_VALUES = {
    "SYNC": 0,
    "REPORT": 1,
  }

class SpotCategory:
  UNKNOWN = 0
  GOURMET = 1
  BEAUTY = 2
  TRAVEL = 3
  SHOPPING = 4
  ENTERTAINMENT = 5
  SPORTS = 6
  TRANSPORT = 7
  LIFE = 8
  HOSPITAL = 9
  FINANCE = 10
  EDUCATION = 11
  OTHER = 12
  ALL = 10000

  _VALUES_TO_NAMES = {
    0: "UNKNOWN",
    1: "GOURMET",
    2: "BEAUTY",
    3: "TRAVEL",
    4: "SHOPPING",
    5: "ENTERTAINMENT",
    6: "SPORTS",
    7: "TRANSPORT",
    8: "LIFE",
    9: "HOSPITAL",
    10: "FINANCE",
    11: "EDUCATION",
    12: "OTHER",
    10000: "ALL",
  }

  _NAMES_TO_VALUES = {
    "UNKNOWN": 0,
    "GOURMET": 1,
    "BEAUTY": 2,
    "TRAVEL": 3,
    "SHOPPING": 4,
    "ENTERTAINMENT": 5,
    "SPORTS": 6,
    "TRANSPORT": 7,
    "LIFE": 8,
    "HOSPITAL": 9,
    "FINANCE": 10,
    "EDUCATION": 11,
    "OTHER": 12,
    "ALL": 10000,
  }

class SyncCategory:
  PROFILE = 0
  SETTINGS = 1
  OPS = 2
  CONTACT = 3
  RECOMMEND = 4
  BLOCK = 5
  GROUP = 6
  ROOM = 7
  NOTIFICATION = 8
  ADDRESS_BOOK = 9

  _VALUES_TO_NAMES = {
    0: "PROFILE",
    1: "SETTINGS",
    2: "OPS",
    3: "CONTACT",
    4: "RECOMMEND",
    5: "BLOCK",
    6: "GROUP",
    7: "ROOM",
    8: "NOTIFICATION",
    9: "ADDRESS_BOOK",
  }

  _NAMES_TO_VALUES = {
    "PROFILE": 0,
    "SETTINGS": 1,
    "OPS": 2,
    "CONTACT": 3,
    "RECOMMEND": 4,
    "BLOCK": 5,
    "GROUP": 6,
    "ROOM": 7,
    "NOTIFICATION": 8,
    "ADDRESS_BOOK": 9,
  }

class TMessageBoxStatus:
  ACTIVATED = 1
  UNREAD = 2

  _VALUES_TO_NAMES = {
    1: "ACTIVATED",
    2: "UNREAD",
  }

  _NAMES_TO_VALUES = {
    "ACTIVATED": 1,
    "UNREAD": 2,
  }

class UniversalNotificationServiceErrorCode:
  INTERNAL_ERROR = 0
  INVALID_KEY = 1
  ILLEGAL_ARGUMENT = 2
  TOO_MANY_REQUEST = 3
  AUTHENTICATION_FAILED = 4
  NO_WRITE_PERMISSION = 5

  _VALUES_TO_NAMES = {
    0: "INTERNAL_ERROR",
    1: "INVALID_KEY",
    2: "ILLEGAL_ARGUMENT",
    3: "TOO_MANY_REQUEST",
    4: "AUTHENTICATION_FAILED",
    5: "NO_WRITE_PERMISSION",
  }

  _NAMES_TO_VALUES = {
    "INTERNAL_ERROR": 0,
    "INVALID_KEY": 1,
    "ILLEGAL_ARGUMENT": 2,
    "TOO_MANY_REQUEST": 3,
    "AUTHENTICATION_FAILED": 4,
    "NO_WRITE_PERMISSION": 5,
  }

class UnregistrationReason:
  UNREGISTRATION_REASON_UNREGISTER_USER = 1
  UNREGISTRATION_REASON_UNBIND_DEVICE = 2

  _VALUES_TO_NAMES = {
    1: "UNREGISTRATION_REASON_UNREGISTER_USER",
    2: "UNREGISTRATION_REASON_UNBIND_DEVICE",
  }

  _NAMES_TO_VALUES = {
    "UNREGISTRATION_REASON_UNREGISTER_USER": 1,
    "UNREGISTRATION_REASON_UNBIND_DEVICE": 2,
  }

class UserAgeType:
  OVER = 1
  UNDER = 2
  UNDEFINED = 3

  _VALUES_TO_NAMES = {
    1: "OVER",
    2: "UNDER",
    3: "UNDEFINED",
  }

  _NAMES_TO_VALUES = {
    "OVER": 1,
    "UNDER": 2,
    "UNDEFINED": 3,
  }

class VerificationMethod:
  NO_AVAILABLE = 0
  PIN_VIA_SMS = 1
  CALLERID_INDIGO = 2
  PIN_VIA_TTS = 4
  SKIP = 10

  _VALUES_TO_NAMES = {
    0: "NO_AVAILABLE",
    1: "PIN_VIA_SMS",
    2: "CALLERID_INDIGO",
    4: "PIN_VIA_TTS",
    10: "SKIP",
  }

  _NAMES_TO_VALUES = {
    "NO_AVAILABLE": 0,
    "PIN_VIA_SMS": 1,
    "CALLERID_INDIGO": 2,
    "PIN_VIA_TTS": 4,
    "SKIP": 10,
  }

class VerificationResult:
  FAILED = 0
  OK_NOT_REGISTERED_YET = 1
  OK_REGISTERED_WITH_SAME_DEVICE = 2
  OK_REGISTERED_WITH_ANOTHER_DEVICE = 3

  _VALUES_TO_NAMES = {
    0: "FAILED",
    1: "OK_NOT_REGISTERED_YET",
    2: "OK_REGISTERED_WITH_SAME_DEVICE",
    3: "OK_REGISTERED_WITH_ANOTHER_DEVICE",
  }

  _NAMES_TO_VALUES = {
    "FAILED": 0,
    "OK_NOT_REGISTERED_YET": 1,
    "OK_REGISTERED_WITH_SAME_DEVICE": 2,
    "OK_REGISTERED_WITH_ANOTHER_DEVICE": 3,
  }

class WapInvitationType:
  REGISTRATION = 1
  CHAT = 2

  _VALUES_TO_NAMES = {
    1: "REGISTRATION",
    2: "CHAT",
  }

  _NAMES_TO_VALUES = {
    "REGISTRATION": 1,
    "CHAT": 2,
  }

class MediaType:
  AUDIO = 1
  VIDEO = 2

  _VALUES_TO_NAMES = {
    1: "AUDIO",
    2: "VIDEO",
  }

  _NAMES_TO_VALUES = {
    "AUDIO": 1,
    "VIDEO": 2,
  }

class SQErrorCode:
  UNKNOWN = 0
  ILLEGAL_ARGUMENT = 400
  AUTHENTICATION_FAILURE = 401
  FORBIDDEN = 403
  NOT_FOUND = 404
  REVISION_MISMATCH = 409
  PRECONDITION_FAILED = 410
  INTERNAL_ERROR = 500
  NOT_IMPLEMENTED = 501
  TRY_AGAIN_LATER = 505

  _VALUES_TO_NAMES = {
    0: "UNKNOWN",
    400: "ILLEGAL_ARGUMENT",
    401: "AUTHENTICATION_FAILURE",
    403: "FORBIDDEN",
    404: "NOT_FOUND",
    409: "REVISION_MISMATCH",
    410: "PRECONDITION_FAILED",
    500: "INTERNAL_ERROR",
    501: "NOT_IMPLEMENTED",
    505: "TRY_AGAIN_LATER",
  }

  _NAMES_TO_VALUES = {
    "UNKNOWN": 0,
    "ILLEGAL_ARGUMENT": 400,
    "AUTHENTICATION_FAILURE": 401,
    "FORBIDDEN": 403,
    "NOT_FOUND": 404,
    "REVISION_MISMATCH": 409,
    "PRECONDITION_FAILED": 410,
    "INTERNAL_ERROR": 500,
    "NOT_IMPLEMENTED": 501,
    "TRY_AGAIN_LATER": 505,
  }

class SquareEventType:
  RECEIVE_MESSAGE = 0
  SEND_MESSAGE = 1
  NOTIFIED_JOIN_SQUARE_CHAT = 2
  NOTIFIED_INVITE_INTO_SQUARE_CHAT = 3
  NOTIFIED_LEAVE_SQUARE_CHAT = 4
  NOTIFIED_DESTROY_MESSAGE = 5
  NOTIFIED_MARK_AS_READ = 6
  NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE = 7
  NOTIFIED_KICKOUT_FROM_SQUARE = 19
  NOTIFIED_SHUTDOWN_SQUARE = 18
  NOTIFIED_DELETE_SQUARE_CHAT = 20
  NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME = 30
  NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE = 31
  NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT = 37
  NOTIFIED_ADD_BOT = 33
  NOTIFIED_REMOVE_BOT = 34
  NOTIFIED_UPDATE_SQUARE = 8
  NOTIFIED_UPDATE_SQUARE_STATUS = 9
  NOTIFIED_UPDATE_SQUARE_AUTHORITY = 10
  NOTIFIED_UPDATE_SQUARE_MEMBER = 11
  NOTIFIED_UPDATE_SQUARE_CHAT = 12
  NOTIFIED_UPDATE_SQUARE_CHAT_STATUS = 13
  NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER = 14
  NOTIFIED_CREATE_SQUARE_MEMBER = 15
  NOTIFIED_CREATE_SQUARE_CHAT_MEMBER = 16
  NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION = 17
  NOTIFIED_UPDATE_SQUARE_FEATURE_SET = 32
  NOTIFIED_UPDATE_SQUARE_NOTE_STATUS = 36
  NOTIFICATION_JOIN_REQUEST = 21
  NOTIFICATION_JOINED = 22
  NOTIFICATION_PROMOTED_COADMIN = 23
  NOTIFICATION_PROMOTED_ADMIN = 24
  NOTIFICATION_DEMOTED_MEMBER = 25
  NOTIFICATION_KICKED_OUT = 26
  NOTIFICATION_SQUARE_DELETE = 27
  NOTIFICATION_SQUARE_CHAT_DELETE = 28
  NOTIFICATION_MESSAGE = 29

  _VALUES_TO_NAMES = {
    0: "RECEIVE_MESSAGE",
    1: "SEND_MESSAGE",
    2: "NOTIFIED_JOIN_SQUARE_CHAT",
    3: "NOTIFIED_INVITE_INTO_SQUARE_CHAT",
    4: "NOTIFIED_LEAVE_SQUARE_CHAT",
    5: "NOTIFIED_DESTROY_MESSAGE",
    6: "NOTIFIED_MARK_AS_READ",
    7: "NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE",
    19: "NOTIFIED_KICKOUT_FROM_SQUARE",
    18: "NOTIFIED_SHUTDOWN_SQUARE",
    20: "NOTIFIED_DELETE_SQUARE_CHAT",
    30: "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME",
    31: "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE",
    37: "NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT",
    33: "NOTIFIED_ADD_BOT",
    34: "NOTIFIED_REMOVE_BOT",
    8: "NOTIFIED_UPDATE_SQUARE",
    9: "NOTIFIED_UPDATE_SQUARE_STATUS",
    10: "NOTIFIED_UPDATE_SQUARE_AUTHORITY",
    11: "NOTIFIED_UPDATE_SQUARE_MEMBER",
    12: "NOTIFIED_UPDATE_SQUARE_CHAT",
    13: "NOTIFIED_UPDATE_SQUARE_CHAT_STATUS",
    14: "NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER",
    15: "NOTIFIED_CREATE_SQUARE_MEMBER",
    16: "NOTIFIED_CREATE_SQUARE_CHAT_MEMBER",
    17: "NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION",
    32: "NOTIFIED_UPDATE_SQUARE_FEATURE_SET",
    36: "NOTIFIED_UPDATE_SQUARE_NOTE_STATUS",
    21: "NOTIFICATION_JOIN_REQUEST",
    22: "NOTIFICATION_JOINED",
    23: "NOTIFICATION_PROMOTED_COADMIN",
    24: "NOTIFICATION_PROMOTED_ADMIN",
    25: "NOTIFICATION_DEMOTED_MEMBER",
    26: "NOTIFICATION_KICKED_OUT",
    27: "NOTIFICATION_SQUARE_DELETE",
    28: "NOTIFICATION_SQUARE_CHAT_DELETE",
    29: "NOTIFICATION_MESSAGE",
  }

  _NAMES_TO_VALUES = {
    "RECEIVE_MESSAGE": 0,
    "SEND_MESSAGE": 1,
    "NOTIFIED_JOIN_SQUARE_CHAT": 2,
    "NOTIFIED_INVITE_INTO_SQUARE_CHAT": 3,
    "NOTIFIED_LEAVE_SQUARE_CHAT": 4,
    "NOTIFIED_DESTROY_MESSAGE": 5,
    "NOTIFIED_MARK_AS_READ": 6,
    "NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE": 7,
    "NOTIFIED_KICKOUT_FROM_SQUARE": 19,
    "NOTIFIED_SHUTDOWN_SQUARE": 18,
    "NOTIFIED_DELETE_SQUARE_CHAT": 20,
    "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME": 30,
    "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE": 31,
    "NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT": 37,
    "NOTIFIED_ADD_BOT": 33,
    "NOTIFIED_REMOVE_BOT": 34,
    "NOTIFIED_UPDATE_SQUARE": 8,
    "NOTIFIED_UPDATE_SQUARE_STATUS": 9,
    "NOTIFIED_UPDATE_SQUARE_AUTHORITY": 10,
    "NOTIFIED_UPDATE_SQUARE_MEMBER": 11,
    "NOTIFIED_UPDATE_SQUARE_CHAT": 12,
    "NOTIFIED_UPDATE_SQUARE_CHAT_STATUS": 13,
    "NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER": 14,
    "NOTIFIED_CREATE_SQUARE_MEMBER": 15,
    "NOTIFIED_CREATE_SQUARE_CHAT_MEMBER": 16,
    "NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION": 17,
    "NOTIFIED_UPDATE_SQUARE_FEATURE_SET": 32,
    "NOTIFIED_UPDATE_SQUARE_NOTE_STATUS": 36,
    "NOTIFICATION_JOIN_REQUEST": 21,
    "NOTIFICATION_JOINED": 22,
    "NOTIFICATION_PROMOTED_COADMIN": 23,
    "NOTIFICATION_PROMOTED_ADMIN": 24,
    "NOTIFICATION_DEMOTED_MEMBER": 25,
    "NOTIFICATION_KICKED_OUT": 26,
    "NOTIFICATION_SQUARE_DELETE": 27,
    "NOTIFICATION_SQUARE_CHAT_DELETE": 28,
    "NOTIFICATION_MESSAGE": 29,
  }

class SquareMemberRelationState:
  NONE = 1
  BLOCKED = 2

  _VALUES_TO_NAMES = {
    1: "NONE",
    2: "BLOCKED",
  }

  _NAMES_TO_VALUES = {
    "NONE": 1,
    "BLOCKED": 2,
  }

class SquareFeatureControlState:
  DISABLED = 1
  ENABLED = 2

  _VALUES_TO_NAMES = {
    1: "DISABLED",
    2: "ENABLED",
  }

  _NAMES_TO_VALUES = {
    "DISABLED": 1,
    "ENABLED": 2,
  }

class BooleanState:
  NONE = 0
  OFF = 1
  ON = 2

  _VALUES_TO_NAMES = {
    0: "NONE",
    1: "OFF",
    2: "ON",
  }

  _NAMES_TO_VALUES = {
    "NONE": 0,
    "OFF": 1,
    "ON": 2,
  }

class SquareType:
  CLOSED = 0
  OPEN = 1

  _VALUES_TO_NAMES = {
    0: "CLOSED",
    1: "OPEN",
  }

  _NAMES_TO_VALUES = {
    "CLOSED": 0,
    "OPEN": 1,
  }

class SquareChatType:
  OPEN = 1
  SECRET = 2
  ONE_ON_ONE = 3
  SQUARE_DEFAULT = 4

  _VALUES_TO_NAMES = {
    1: "OPEN",
    2: "SECRET",
    3: "ONE_ON_ONE",
    4: "SQUARE_DEFAULT",
  }

  _NAMES_TO_VALUES = {
    "OPEN": 1,
    "SECRET": 2,
    "ONE_ON_ONE": 3,
    "SQUARE_DEFAULT": 4,
  }

class SquareErrorCode:
  UNKNOWN = 0
  INTERNAL_ERROR = 500
  NOT_IMPLEMENTED = 501
  TRY_AGAIN_LATER = 503
  MAINTENANCE = 505
  ILLEGAL_ARGUMENT = 400
  AUTHENTICATION_FAILURE = 401
  FORBIDDEN = 403
  NOT_FOUND = 404
  REVISION_MISMATCH = 409
  PRECONDITION_FAILED = 410

  _VALUES_TO_NAMES = {
    0: "UNKNOWN",
    500: "INTERNAL_ERROR",
    501: "NOT_IMPLEMENTED",
    503: "TRY_AGAIN_LATER",
    505: "MAINTENANCE",
    400: "ILLEGAL_ARGUMENT",
    401: "AUTHENTICATION_FAILURE",
    403: "FORBIDDEN",
    404: "NOT_FOUND",
    409: "REVISION_MISMATCH",
    410: "PRECONDITION_FAILED",
  }

  _NAMES_TO_VALUES = {
    "UNKNOWN": 0,
    "INTERNAL_ERROR": 500,
    "NOT_IMPLEMENTED": 501,
    "TRY_AGAIN_LATER": 503,
    "MAINTENANCE": 505,
    "ILLEGAL_ARGUMENT": 400,
    "AUTHENTICATION_FAILURE": 401,
    "FORBIDDEN": 403,
    "NOT_FOUND": 404,
    "REVISION_MISMATCH": 409,
    "PRECONDITION_FAILED": 410,
  }

class SquareChatState:
  ALIVE = 0
  DELETED = 1
  SUSPENDED = 2

  _VALUES_TO_NAMES = {
    0: "ALIVE",
    1: "DELETED",
    2: "SUSPENDED",
  }

  _NAMES_TO_VALUES = {
    "ALIVE": 0,
    "DELETED": 1,
    "SUSPENDED": 2,
  }

class SquareFeatureSetAttribute:
  CREATING_SECRET_SQUARE_CHAT = 1
  INVITING_INTO_OPEN_SQUARE_CHAT = 2

  _VALUES_TO_NAMES = {
    1: "CREATING_SECRET_SQUARE_CHAT",
    2: "INVITING_INTO_OPEN_SQUARE_CHAT",
  }

  _NAMES_TO_VALUES = {
    "CREATING_SECRET_SQUARE_CHAT": 1,
    "INVITING_INTO_OPEN_SQUARE_CHAT": 2,
  }

class SquareMembershipState:
  JOIN_REQUESTED = 1
  JOINED = 2
  REJECTED = 3
  LEFT = 4
  KICK_OUT = 5
  BANNED = 6
  DELETED = 7

  _VALUES_TO_NAMES = {
    1: "JOIN_REQUESTED",
    2: "JOINED",
    3: "REJECTED",
    4: "LEFT",
    5: "KICK_OUT",
    6: "BANNED",
    7: "DELETED",
  }

  _NAMES_TO_VALUES = {
    "JOIN_REQUESTED": 1,
    "JOINED": 2,
    "REJECTED": 3,
    "LEFT": 4,
    "KICK_OUT": 5,
    "BANNED": 6,
    "DELETED": 7,
  }

class SquareChatMemberAttribute:
  MEMBERSHIP_STATE = 4
  NOTIFICATION_MESSAGE = 6

  _VALUES_TO_NAMES = {
    4: "MEMBERSHIP_STATE",
    6: "NOTIFICATION_MESSAGE",
  }

  _NAMES_TO_VALUES = {
    "MEMBERSHIP_STATE": 4,
    "NOTIFICATION_MESSAGE": 6,
  }

class SquareMemberRole:
  ADMIN = 1
  CO_ADMIN = 2
  MEMBER = 10

  _VALUES_TO_NAMES = {
    1: "ADMIN",
    2: "CO_ADMIN",
    10: "MEMBER",
  }

  _NAMES_TO_VALUES = {
    "ADMIN": 1,
    "CO_ADMIN": 2,
    "MEMBER": 10,
  }

class PreconditionFailedExtraInfo:
  DUPLICATED_DISPLAY_NAME = 0

  _VALUES_TO_NAMES = {
    0: "DUPLICATED_DISPLAY_NAME",
  }

  _NAMES_TO_VALUES = {
    "DUPLICATED_DISPLAY_NAME": 0,
  }

class SquareChatMembershipState:
  JOINED = 1
  LEFT = 2

  _VALUES_TO_NAMES = {
    1: "JOINED",
    2: "LEFT",
  }

  _NAMES_TO_VALUES = {
    "JOINED": 1,
    "LEFT": 2,
  }

class FetchDirection:
  FORWARD = 1
  BACKWARD = 2

  _VALUES_TO_NAMES = {
    1: "FORWARD",
    2: "BACKWARD",
  }

  _NAMES_TO_VALUES = {
    "FORWARD": 1,
    "BACKWARD": 2,
  }

class SquareAttribute:
  NAME = 1
  WELCOME_MESSAGE = 2
  PROFILE_IMAGE = 3
  DESCRIPTION = 4
  SEARCHABLE = 6
  CATEGORY = 7
  INVITATION_URL = 8
  ABLE_TO_USE_INVITATION_URL = 9
  STATE = 10

  _VALUES_TO_NAMES = {
    1: "NAME",
    2: "WELCOME_MESSAGE",
    3: "PROFILE_IMAGE",
    4: "DESCRIPTION",
    6: "SEARCHABLE",
    7: "CATEGORY",
    8: "INVITATION_URL",
    9: "ABLE_TO_USE_INVITATION_URL",
    10: "STATE",
  }

  _NAMES_TO_VALUES = {
    "NAME": 1,
    "WELCOME_MESSAGE": 2,
    "PROFILE_IMAGE": 3,
    "DESCRIPTION": 4,
    "SEARCHABLE": 6,
    "CATEGORY": 7,
    "INVITATION_URL": 8,
    "ABLE_TO_USE_INVITATION_URL": 9,
    "STATE": 10,
  }

class SquareAuthorityAttribute:
  UPDATE_SQUARE_PROFILE = 1
  INVITE_NEW_MEMBER = 2
  APPROVE_JOIN_REQUEST = 3
  CREATE_POST = 4
  CREATE_OPEN_SQUARE_CHAT = 5
  DELETE_SQUARE_CHAT_OR_POST = 6
  REMOVE_SQUARE_MEMBER = 7
  GRANT_ROLE = 8
  ENABLE_INVITATION_TICKET = 9
  CREATE_CHAT_ANNOUNCEMENT = 10

  _VALUES_TO_NAMES = {
    1: "UPDATE_SQUARE_PROFILE",
    2: "INVITE_NEW_MEMBER",
    3: "APPROVE_JOIN_REQUEST",
    4: "CREATE_POST",
    5: "CREATE_OPEN_SQUARE_CHAT",
    6: "DELETE_SQUARE_CHAT_OR_POST",
    7: "REMOVE_SQUARE_MEMBER",
    8: "GRANT_ROLE",
    9: "ENABLE_INVITATION_TICKET",
    10: "CREATE_CHAT_ANNOUNCEMENT",
  }

  _NAMES_TO_VALUES = {
    "UPDATE_SQUARE_PROFILE": 1,
    "INVITE_NEW_MEMBER": 2,
    "APPROVE_JOIN_REQUEST": 3,
    "CREATE_POST": 4,
    "CREATE_OPEN_SQUARE_CHAT": 5,
    "DELETE_SQUARE_CHAT_OR_POST": 6,
    "REMOVE_SQUARE_MEMBER": 7,
    "GRANT_ROLE": 8,
    "ENABLE_INVITATION_TICKET": 9,
    "CREATE_CHAT_ANNOUNCEMENT": 10,
  }

class SquareEventStatus:
  NORMAL = 1
  ALERT_DISABLED = 2

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

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

class SuggestDictionaryIncrementStatus:
  SUCCESS = 0
  INVALID_REVISION = 1
  TOO_LARGE_DATA = 2
  SCHEME_CHANGED = 3
  RETRY = 4
  FAIL = 5
  TOO_OLD_DATA = 6

  _VALUES_TO_NAMES = {
    0: "SUCCESS",
    1: "INVALID_REVISION",
    2: "TOO_LARGE_DATA",
    3: "SCHEME_CHANGED",
    4: "RETRY",
    5: "FAIL",
    6: "TOO_OLD_DATA",
  }

  _NAMES_TO_VALUES = {
    "SUCCESS": 0,
    "INVALID_REVISION": 1,
    "TOO_LARGE_DATA": 2,
    "SCHEME_CHANGED": 3,
    "RETRY": 4,
    "FAIL": 5,
    "TOO_OLD_DATA": 6,
  }


class Location:
  """
  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 __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.title)
    value = (value * 31) ^ hash(self.address)
    value = (value * 31) ^ hash(self.latitude)
    value = (value * 31) ^ hash(self.longitude)
    value = (value * 31) ^ hash(self.phone)
    return value

  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 MessageBoxV2MessageId:
  """
  Attributes:
   - deliveredTime
   - messageId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'deliveredTime', None, None, ), # 1
    (2, TType.I64, 'messageId', None, None, ), # 2
  )

  def __init__(self, deliveredTime=None, messageId=None,):
    self.deliveredTime = deliveredTime
    self.messageId = messageId

  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.deliveredTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.messageId = iprot.readI64()
        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('MessageBoxV2MessageId')
    if self.deliveredTime is not None:
      oprot.writeFieldBegin('deliveredTime', TType.I64, 1)
      oprot.writeI64(self.deliveredTime)
      oprot.writeFieldEnd()
    if self.messageId is not None:
      oprot.writeFieldBegin('messageId', TType.I64, 2)
      oprot.writeI64(self.messageId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.deliveredTime)
    value = (value * 31) ^ hash(self.messageId)
    return value

  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 MessageCommitResult:
  """
  Attributes:
   - requestId
   - state
   - messageStoreRequestId
   - messageIds
   - receiverCount
   - successCount
   - failCount
   - blockCount
   - unregisteredCount
   - unrelatedCount
   - errorDescription
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'requestId', None, None, ), # 1
    (2, TType.I32, 'state', None, None, ), # 2
    (3, TType.STRING, 'messageStoreRequestId', None, None, ), # 3
    (4, TType.LIST, 'messageIds', (TType.STRING,None), None, ), # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.I64, 'receiverCount', None, None, ), # 11
    (12, TType.I64, 'successCount', None, None, ), # 12
    (13, TType.I64, 'failCount', None, None, ), # 13
    (14, TType.I64, 'blockCount', None, None, ), # 14
    (15, TType.I64, 'unregisteredCount', None, None, ), # 15
    (16, TType.I64, 'unrelatedCount', None, None, ), # 16
    None, # 17
    None, # 18
    None, # 19
    None, # 20
    (21, TType.STRING, 'errorDescription', None, None, ), # 21
  )

  def __init__(self, requestId=None, state=None, messageStoreRequestId=None, messageIds=None, receiverCount=None, successCount=None, failCount=None, blockCount=None, unregisteredCount=None, unrelatedCount=None, errorDescription=None,):
    self.requestId = requestId
    self.state = state
    self.messageStoreRequestId = messageStoreRequestId
    self.messageIds = messageIds
    self.receiverCount = receiverCount
    self.successCount = successCount
    self.failCount = failCount
    self.blockCount = blockCount
    self.unregisteredCount = unregisteredCount
    self.unrelatedCount = unrelatedCount
    self.errorDescription = errorDescription

  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.requestId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.state = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.messageStoreRequestId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.messageIds = []
          (_etype3, _size0) = iprot.readListBegin()
          for _i4 in xrange(_size0):
            _elem5 = iprot.readString()
            self.messageIds.append(_elem5)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.receiverCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I64:
          self.successCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.I64:
          self.failCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.I64:
          self.blockCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.I64:
          self.unregisteredCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.I64:
          self.unrelatedCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.STRING:
          self.errorDescription = 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('MessageCommitResult')
    if self.requestId is not None:
      oprot.writeFieldBegin('requestId', TType.STRING, 1)
      oprot.writeString(self.requestId)
      oprot.writeFieldEnd()
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.I32, 2)
      oprot.writeI32(self.state)
      oprot.writeFieldEnd()
    if self.messageStoreRequestId is not None:
      oprot.writeFieldBegin('messageStoreRequestId', TType.STRING, 3)
      oprot.writeString(self.messageStoreRequestId)
      oprot.writeFieldEnd()
    if self.messageIds is not None:
      oprot.writeFieldBegin('messageIds', TType.LIST, 4)
      oprot.writeListBegin(TType.STRING, len(self.messageIds))
      for iter6 in self.messageIds:
        oprot.writeString(iter6)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.receiverCount is not None:
      oprot.writeFieldBegin('receiverCount', TType.I64, 11)
      oprot.writeI64(self.receiverCount)
      oprot.writeFieldEnd()
    if self.successCount is not None:
      oprot.writeFieldBegin('successCount', TType.I64, 12)
      oprot.writeI64(self.successCount)
      oprot.writeFieldEnd()
    if self.failCount is not None:
      oprot.writeFieldBegin('failCount', TType.I64, 13)
      oprot.writeI64(self.failCount)
      oprot.writeFieldEnd()
    if self.blockCount is not None:
      oprot.writeFieldBegin('blockCount', TType.I64, 14)
      oprot.writeI64(self.blockCount)
      oprot.writeFieldEnd()
    if self.unregisteredCount is not None:
      oprot.writeFieldBegin('unregisteredCount', TType.I64, 15)
      oprot.writeI64(self.unregisteredCount)
      oprot.writeFieldEnd()
    if self.unrelatedCount is not None:
      oprot.writeFieldBegin('unrelatedCount', TType.I64, 16)
      oprot.writeI64(self.unrelatedCount)
      oprot.writeFieldEnd()
    if self.errorDescription is not None:
      oprot.writeFieldBegin('errorDescription', TType.STRING, 21)
      oprot.writeString(self.errorDescription)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.requestId)
    value = (value * 31) ^ hash(self.state)
    value = (value * 31) ^ hash(self.messageStoreRequestId)
    value = (value * 31) ^ hash(self.messageIds)
    value = (value * 31) ^ hash(self.receiverCount)
    value = (value * 31) ^ hash(self.successCount)
    value = (value * 31) ^ hash(self.failCount)
    value = (value * 31) ^ hash(self.blockCount)
    value = (value * 31) ^ hash(self.unregisteredCount)
    value = (value * 31) ^ hash(self.unrelatedCount)
    value = (value * 31) ^ hash(self.errorDescription)
    return value

  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 CallHost:
  """
  Attributes:
   - host
   - port
   - zone
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'host', None, None, ), # 1
    (2, TType.I32, 'port', None, None, ), # 2
    (3, TType.STRING, 'zone', None, None, ), # 3
  )

  def __init__(self, host=None, port=None, zone=None,):
    self.host = host
    self.port = port
    self.zone = zone

  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.host = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.port = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.zone = 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('CallHost')
    if self.host is not None:
      oprot.writeFieldBegin('host', TType.STRING, 1)
      oprot.writeString(self.host)
      oprot.writeFieldEnd()
    if self.port is not None:
      oprot.writeFieldBegin('port', TType.I32, 2)
      oprot.writeI32(self.port)
      oprot.writeFieldEnd()
    if self.zone is not None:
      oprot.writeFieldBegin('zone', TType.STRING, 3)
      oprot.writeString(self.zone)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.host)
    value = (value * 31) ^ hash(self.port)
    value = (value * 31) ^ hash(self.zone)
    return value

  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 AgeCheckDocomoResult:
  """
  Attributes:
   - authUrl
   - userAgeType
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'authUrl', None, None, ), # 1
    (2, TType.I32, 'userAgeType', None, None, ), # 2
  )

  def __init__(self, authUrl=None, userAgeType=None,):
    self.authUrl = authUrl
    self.userAgeType = userAgeType

  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.authUrl = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.userAgeType = 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('AgeCheckDocomoResult')
    if self.authUrl is not None:
      oprot.writeFieldBegin('authUrl', TType.STRING, 1)
      oprot.writeString(self.authUrl)
      oprot.writeFieldEnd()
    if self.userAgeType is not None:
      oprot.writeFieldBegin('userAgeType', TType.I32, 2)
      oprot.writeI32(self.userAgeType)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.authUrl)
    value = (value * 31) ^ hash(self.userAgeType)
    return value

  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 AgeCheckRequestResult:
  """
  Attributes:
   - authUrl
   - sessionId
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'authUrl', None, None, ), # 1
    (2, TType.STRING, 'sessionId', None, None, ), # 2
  )

  def __init__(self, authUrl=None, sessionId=None,):
    self.authUrl = authUrl
    self.sessionId = sessionId

  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.authUrl = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.sessionId = 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('AgeCheckRequestResult')
    if self.authUrl is not None:
      oprot.writeFieldBegin('authUrl', TType.STRING, 1)
      oprot.writeString(self.authUrl)
      oprot.writeFieldEnd()
    if self.sessionId is not None:
      oprot.writeFieldBegin('sessionId', TType.STRING, 2)
      oprot.writeString(self.sessionId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.authUrl)
    value = (value * 31) ^ hash(self.sessionId)
    return value

  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 TextMessageAnnouncementContents:
  """
  Attributes:
   - messageId
   - text
   - senderSquareMemberMid
   - createdAt
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'messageId', None, None, ), # 1
    (2, TType.STRING, 'text', None, None, ), # 2
    (3, TType.STRING, 'senderSquareMemberMid', None, None, ), # 3
    (4, TType.I64, 'createdAt', None, None, ), # 4
  )

  def __init__(self, messageId=None, text=None, senderSquareMemberMid=None, createdAt=None,):
    self.messageId = messageId
    self.text = text
    self.senderSquareMemberMid = senderSquareMemberMid
    self.createdAt = createdAt

  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.messageId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.text = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.senderSquareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.createdAt = iprot.readI64()
        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('TextMessageAnnouncementContents')
    if self.messageId is not None:
      oprot.writeFieldBegin('messageId', TType.STRING, 1)
      oprot.writeString(self.messageId)
      oprot.writeFieldEnd()
    if self.text is not None:
      oprot.writeFieldBegin('text', TType.STRING, 2)
      oprot.writeString(self.text)
      oprot.writeFieldEnd()
    if self.senderSquareMemberMid is not None:
      oprot.writeFieldBegin('senderSquareMemberMid', TType.STRING, 3)
      oprot.writeString(self.senderSquareMemberMid)
      oprot.writeFieldEnd()
    if self.createdAt is not None:
      oprot.writeFieldBegin('createdAt', TType.I64, 4)
      oprot.writeI64(self.createdAt)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.messageId)
    value = (value * 31) ^ hash(self.text)
    value = (value * 31) ^ hash(self.senderSquareMemberMid)
    value = (value * 31) ^ hash(self.createdAt)
    return value

  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 SquareChatAnnouncementContents:
  """
  Attributes:
   - textMessageAnnouncementContents
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'textMessageAnnouncementContents', (TextMessageAnnouncementContents, TextMessageAnnouncementContents.thrift_spec), None, ), # 1
  )

  def __init__(self, textMessageAnnouncementContents=None,):
    self.textMessageAnnouncementContents = textMessageAnnouncementContents

  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.textMessageAnnouncementContents = TextMessageAnnouncementContents()
          self.textMessageAnnouncementContents.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('SquareChatAnnouncementContents')
    if self.textMessageAnnouncementContents is not None:
      oprot.writeFieldBegin('textMessageAnnouncementContents', TType.STRUCT, 1)
      self.textMessageAnnouncementContents.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.textMessageAnnouncementContents)
    return value

  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 SquareChatAnnouncement:
  """
  Attributes:
   - announcementSeq
   - type
   - contents
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'announcementSeq', None, None, ), # 1
    (2, TType.I32, 'type', None, None, ), # 2
    (3, TType.STRUCT, 'contents', (SquareChatAnnouncementContents, SquareChatAnnouncementContents.thrift_spec), None, ), # 3
  )

  def __init__(self, announcementSeq=None, type=None, contents=None,):
    self.announcementSeq = announcementSeq
    self.type = type
    self.contents = contents

  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.announcementSeq = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.type = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.contents = SquareChatAnnouncementContents()
          self.contents.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('SquareChatAnnouncement')
    if self.announcementSeq is not None:
      oprot.writeFieldBegin('announcementSeq', TType.I64, 1)
      oprot.writeI64(self.announcementSeq)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 2)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.contents is not None:
      oprot.writeFieldBegin('contents', TType.STRUCT, 3)
      self.contents.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.announcementSeq)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.contents)
    return value

  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 Announcement:
  """
  Attributes:
   - index
   - forceUpdate
   - title
   - text
   - createdTime
   - pictureUrl
   - thumbnailUrl
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'index', None, None, ), # 1
    None, # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.BOOL, 'forceUpdate', None, None, ), # 10
    (11, TType.STRING, 'title', None, None, ), # 11
    (12, TType.STRING, 'text', None, None, ), # 12
    (13, TType.I64, 'createdTime', None, None, ), # 13
    (14, TType.STRING, 'pictureUrl', None, None, ), # 14
    (15, TType.STRING, 'thumbnailUrl', None, None, ), # 15
  )

  def __init__(self, index=None, forceUpdate=None, title=None, text=None, createdTime=None, pictureUrl=None, thumbnailUrl=None,):
    self.index = index
    self.forceUpdate = forceUpdate
    self.title = title
    self.text = text
    self.createdTime = createdTime
    self.pictureUrl = pictureUrl
    self.thumbnailUrl = thumbnailUrl

  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.index = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.BOOL:
          self.forceUpdate = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.title = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.text = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.STRING:
          self.pictureUrl = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.STRING:
          self.thumbnailUrl = 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('Announcement')
    if self.index is not None:
      oprot.writeFieldBegin('index', TType.I32, 1)
      oprot.writeI32(self.index)
      oprot.writeFieldEnd()
    if self.forceUpdate is not None:
      oprot.writeFieldBegin('forceUpdate', TType.BOOL, 10)
      oprot.writeBool(self.forceUpdate)
      oprot.writeFieldEnd()
    if self.title is not None:
      oprot.writeFieldBegin('title', TType.STRING, 11)
      oprot.writeString(self.title)
      oprot.writeFieldEnd()
    if self.text is not None:
      oprot.writeFieldBegin('text', TType.STRING, 12)
      oprot.writeString(self.text)
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 13)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    if self.pictureUrl is not None:
      oprot.writeFieldBegin('pictureUrl', TType.STRING, 14)
      oprot.writeString(self.pictureUrl)
      oprot.writeFieldEnd()
    if self.thumbnailUrl is not None:
      oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 15)
      oprot.writeString(self.thumbnailUrl)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.index)
    value = (value * 31) ^ hash(self.forceUpdate)
    value = (value * 31) ^ hash(self.title)
    value = (value * 31) ^ hash(self.text)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.pictureUrl)
    value = (value * 31) ^ hash(self.thumbnailUrl)
    return value

  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 ChannelProvider:
  """
  Attributes:
   - name
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'name', None, None, ), # 1
  )

  def __init__(self, name=None,):
    self.name = name

  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.name = 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('ChannelProvider')
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 1)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.name)
    return value

  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 E2EEPublicKey:
  """
  Attributes:
   - version
   - keyId
   - keyData
   - createdTime
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'version', None, None, ), # 1
    (2, TType.I32, 'keyId', None, None, ), # 2
    None, # 3
    (4, TType.STRING, 'keyData', None, None, ), # 4
    (5, TType.I64, 'createdTime', None, None, ), # 5
  )

  def __init__(self, version=None, keyId=None, keyData=None, createdTime=None,):
    self.version = version
    self.keyId = keyId
    self.keyData = keyData
    self.createdTime = createdTime

  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.version = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.keyId = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.keyData = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64()
        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('E2EEPublicKey')
    if self.version is not None:
      oprot.writeFieldBegin('version', TType.I32, 1)
      oprot.writeI32(self.version)
      oprot.writeFieldEnd()
    if self.keyId is not None:
      oprot.writeFieldBegin('keyId', TType.I32, 2)
      oprot.writeI32(self.keyId)
      oprot.writeFieldEnd()
    if self.keyData is not None:
      oprot.writeFieldBegin('keyData', TType.STRING, 4)
      oprot.writeString(self.keyData)
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 5)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.version)
    value = (value * 31) ^ hash(self.keyId)
    value = (value * 31) ^ hash(self.keyData)
    value = (value * 31) ^ hash(self.createdTime)
    return value

  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 ChannelDomain:
  """
  Attributes:
   - host
   - removed
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'host', None, None, ), # 1
    (2, TType.BOOL, 'removed', None, None, ), # 2
  )

  def __init__(self, host=None, removed=None,):
    self.host = host
    self.removed = removed

  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.host = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.removed = 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('ChannelDomain')
    if self.host is not None:
      oprot.writeFieldBegin('host', TType.STRING, 1)
      oprot.writeString(self.host)
      oprot.writeFieldEnd()
    if self.removed is not None:
      oprot.writeFieldBegin('removed', TType.BOOL, 2)
      oprot.writeBool(self.removed)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.host)
    value = (value * 31) ^ hash(self.removed)
    return value

  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 E2EENegotiationResult:
  """
  Attributes:
   - allowedTypes
   - publicKey
  """

  thrift_spec = (
    None, # 0
    (1, TType.SET, 'allowedTypes', (TType.I32,None), None, ), # 1
    (2, TType.STRUCT, 'publicKey', (E2EEPublicKey, E2EEPublicKey.thrift_spec), None, ), # 2
  )

  def __init__(self, allowedTypes=None, publicKey=None,):
    self.allowedTypes = allowedTypes
    self.publicKey = publicKey

  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.SET:
          self.allowedTypes = set()
          (_etype10, _size7) = iprot.readSetBegin()
          for _i11 in xrange(_size7):
            _elem12 = iprot.readI32()
            self.allowedTypes.add(_elem12)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.publicKey = E2EEPublicKey()
          self.publicKey.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('E2EENegotiationResult')
    if self.allowedTypes is not None:
      oprot.writeFieldBegin('allowedTypes', TType.SET, 1)
      oprot.writeSetBegin(TType.I32, len(self.allowedTypes))
      for iter13 in self.allowedTypes:
        oprot.writeI32(iter13)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.publicKey is not None:
      oprot.writeFieldBegin('publicKey', TType.STRUCT, 2)
      self.publicKey.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.allowedTypes)
    value = (value * 31) ^ hash(self.publicKey)
    return value

  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 OTPResult:
  """
  Attributes:
   - otpId
   - otp
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'otpId', None, None, ), # 1
    (2, TType.STRING, 'otp', None, None, ), # 2
  )

  def __init__(self, otpId=None, otp=None,):
    self.otpId = otpId
    self.otp = otp

  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.otpId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.otp = 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('OTPResult')
    if self.otpId is not None:
      oprot.writeFieldBegin('otpId', TType.STRING, 1)
      oprot.writeString(self.otpId)
      oprot.writeFieldEnd()
    if self.otp is not None:
      oprot.writeFieldBegin('otp', TType.STRING, 2)
      oprot.writeString(self.otp)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.otpId)
    value = (value * 31) ^ hash(self.otp)
    return value

  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 Square:
  """
  Attributes:
   - mid
   - name
   - welcomeMessage
   - profileImageObsHash
   - desc
   - searchable
   - type
   - categoryID
   - invitationURL
   - revision
   - ableToUseInvitationTicket
   - state
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
    (3, TType.STRING, 'welcomeMessage', None, None, ), # 3
    (4, TType.STRING, 'profileImageObsHash', None, None, ), # 4
    (5, TType.STRING, 'desc', None, None, ), # 5
    (6, TType.BOOL, 'searchable', None, None, ), # 6
    (7, TType.I32, 'type', None, None, ), # 7
    (8, TType.I32, 'categoryID', None, None, ), # 8
    (9, TType.STRING, 'invitationURL', None, None, ), # 9
    (10, TType.I64, 'revision', None, None, ), # 10
    (11, TType.BOOL, 'ableToUseInvitationTicket', None, None, ), # 11
    (12, TType.I32, 'state', None, None, ), # 12
  )

  def __init__(self, mid=None, name=None, welcomeMessage=None, profileImageObsHash=None, desc=None, searchable=None, type=None, categoryID=None, invitationURL=None, revision=None, ableToUseInvitationTicket=None, state=None,):
    self.mid = mid
    self.name = name
    self.welcomeMessage = welcomeMessage
    self.profileImageObsHash = profileImageObsHash
    self.desc = desc
    self.searchable = searchable
    self.type = type
    self.categoryID = categoryID
    self.invitationURL = invitationURL
    self.revision = revision
    self.ableToUseInvitationTicket = ableToUseInvitationTicket
    self.state = state

  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.STRING:
          self.name = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.welcomeMessage = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.profileImageObsHash = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.desc = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.BOOL:
          self.searchable = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.type = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I32:
          self.categoryID = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.invitationURL = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.BOOL:
          self.ableToUseInvitationTicket = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I32:
          self.state = 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('Square')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.welcomeMessage is not None:
      oprot.writeFieldBegin('welcomeMessage', TType.STRING, 3)
      oprot.writeString(self.welcomeMessage)
      oprot.writeFieldEnd()
    if self.profileImageObsHash is not None:
      oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 4)
      oprot.writeString(self.profileImageObsHash)
      oprot.writeFieldEnd()
    if self.desc is not None:
      oprot.writeFieldBegin('desc', TType.STRING, 5)
      oprot.writeString(self.desc)
      oprot.writeFieldEnd()
    if self.searchable is not None:
      oprot.writeFieldBegin('searchable', TType.BOOL, 6)
      oprot.writeBool(self.searchable)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 7)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.categoryID is not None:
      oprot.writeFieldBegin('categoryID', TType.I32, 8)
      oprot.writeI32(self.categoryID)
      oprot.writeFieldEnd()
    if self.invitationURL is not None:
      oprot.writeFieldBegin('invitationURL', TType.STRING, 9)
      oprot.writeString(self.invitationURL)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 10)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.ableToUseInvitationTicket is not None:
      oprot.writeFieldBegin('ableToUseInvitationTicket', TType.BOOL, 11)
      oprot.writeBool(self.ableToUseInvitationTicket)
      oprot.writeFieldEnd()
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.I32, 12)
      oprot.writeI32(self.state)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.welcomeMessage)
    value = (value * 31) ^ hash(self.profileImageObsHash)
    value = (value * 31) ^ hash(self.desc)
    value = (value * 31) ^ hash(self.searchable)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.categoryID)
    value = (value * 31) ^ hash(self.invitationURL)
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.ableToUseInvitationTicket)
    value = (value * 31) ^ hash(self.state)
    return value

  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 SquareAuthority:
  """
  Attributes:
   - squareMid
   - updateSquareProfile
   - inviteNewMember
   - approveJoinRequest
   - createPost
   - createOpenSquareChat
   - deleteSquareChatOrPost
   - removeSquareMember
   - grantRole
   - enableInvitationTicket
   - revision
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.I32, 'updateSquareProfile', None, None, ), # 2
    (3, TType.I32, 'inviteNewMember', None, None, ), # 3
    (4, TType.I32, 'approveJoinRequest', None, None, ), # 4
    (5, TType.I32, 'createPost', None, None, ), # 5
    (6, TType.I32, 'createOpenSquareChat', None, None, ), # 6
    (7, TType.I32, 'deleteSquareChatOrPost', None, None, ), # 7
    (8, TType.I32, 'removeSquareMember', None, None, ), # 8
    (9, TType.I32, 'grantRole', None, None, ), # 9
    (10, TType.I32, 'enableInvitationTicket', None, None, ), # 10
    (11, TType.I64, 'revision', None, None, ), # 11
  )

  def __init__(self, squareMid=None, updateSquareProfile=None, inviteNewMember=None, approveJoinRequest=None, createPost=None, createOpenSquareChat=None, deleteSquareChatOrPost=None, removeSquareMember=None, grantRole=None, enableInvitationTicket=None, revision=None,):
    self.squareMid = squareMid
    self.updateSquareProfile = updateSquareProfile
    self.inviteNewMember = inviteNewMember
    self.approveJoinRequest = approveJoinRequest
    self.createPost = createPost
    self.createOpenSquareChat = createOpenSquareChat
    self.deleteSquareChatOrPost = deleteSquareChatOrPost
    self.removeSquareMember = removeSquareMember
    self.grantRole = grantRole
    self.enableInvitationTicket = enableInvitationTicket
    self.revision = revision

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.updateSquareProfile = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.inviteNewMember = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.approveJoinRequest = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.createPost = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.createOpenSquareChat = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.deleteSquareChatOrPost = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I32:
          self.removeSquareMember = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I32:
          self.grantRole = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I32:
          self.enableInvitationTicket = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        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('SquareAuthority')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.updateSquareProfile is not None:
      oprot.writeFieldBegin('updateSquareProfile', TType.I32, 2)
      oprot.writeI32(self.updateSquareProfile)
      oprot.writeFieldEnd()
    if self.inviteNewMember is not None:
      oprot.writeFieldBegin('inviteNewMember', TType.I32, 3)
      oprot.writeI32(self.inviteNewMember)
      oprot.writeFieldEnd()
    if self.approveJoinRequest is not None:
      oprot.writeFieldBegin('approveJoinRequest', TType.I32, 4)
      oprot.writeI32(self.approveJoinRequest)
      oprot.writeFieldEnd()
    if self.createPost is not None:
      oprot.writeFieldBegin('createPost', TType.I32, 5)
      oprot.writeI32(self.createPost)
      oprot.writeFieldEnd()
    if self.createOpenSquareChat is not None:
      oprot.writeFieldBegin('createOpenSquareChat', TType.I32, 6)
      oprot.writeI32(self.createOpenSquareChat)
      oprot.writeFieldEnd()
    if self.deleteSquareChatOrPost is not None:
      oprot.writeFieldBegin('deleteSquareChatOrPost', TType.I32, 7)
      oprot.writeI32(self.deleteSquareChatOrPost)
      oprot.writeFieldEnd()
    if self.removeSquareMember is not None:
      oprot.writeFieldBegin('removeSquareMember', TType.I32, 8)
      oprot.writeI32(self.removeSquareMember)
      oprot.writeFieldEnd()
    if self.grantRole is not None:
      oprot.writeFieldBegin('grantRole', TType.I32, 9)
      oprot.writeI32(self.grantRole)
      oprot.writeFieldEnd()
    if self.enableInvitationTicket is not None:
      oprot.writeFieldBegin('enableInvitationTicket', TType.I32, 10)
      oprot.writeI32(self.enableInvitationTicket)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 11)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.updateSquareProfile)
    value = (value * 31) ^ hash(self.inviteNewMember)
    value = (value * 31) ^ hash(self.approveJoinRequest)
    value = (value * 31) ^ hash(self.createPost)
    value = (value * 31) ^ hash(self.createOpenSquareChat)
    value = (value * 31) ^ hash(self.deleteSquareChatOrPost)
    value = (value * 31) ^ hash(self.removeSquareMember)
    value = (value * 31) ^ hash(self.grantRole)
    value = (value * 31) ^ hash(self.enableInvitationTicket)
    value = (value * 31) ^ hash(self.revision)
    return value

  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 SquarePreference:
  """
  Attributes:
   - favoriteTimestamp
   - notiForNewJoinRequest
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'favoriteTimestamp', None, None, ), # 1
    (2, TType.BOOL, 'notiForNewJoinRequest', None, None, ), # 2
  )

  def __init__(self, favoriteTimestamp=None, notiForNewJoinRequest=None,):
    self.favoriteTimestamp = favoriteTimestamp
    self.notiForNewJoinRequest = notiForNewJoinRequest

  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.favoriteTimestamp = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.notiForNewJoinRequest = 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('SquarePreference')
    if self.favoriteTimestamp is not None:
      oprot.writeFieldBegin('favoriteTimestamp', TType.I64, 1)
      oprot.writeI64(self.favoriteTimestamp)
      oprot.writeFieldEnd()
    if self.notiForNewJoinRequest is not None:
      oprot.writeFieldBegin('notiForNewJoinRequest', TType.BOOL, 2)
      oprot.writeBool(self.notiForNewJoinRequest)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.favoriteTimestamp)
    value = (value * 31) ^ hash(self.notiForNewJoinRequest)
    return value

  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 SquareMember:
  """
  Attributes:
   - squareMemberMid
   - squareMid
   - displayName
   - profileImageObsHash
   - ableToReceiveMessage
   - membershipState
   - role
   - revision
   - preference
   - joinMessage
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMemberMid', None, None, ), # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.STRING, 'displayName', None, None, ), # 3
    (4, TType.STRING, 'profileImageObsHash', None, None, ), # 4
    (5, TType.BOOL, 'ableToReceiveMessage', None, None, ), # 5
    None, # 6
    (7, TType.I32, 'membershipState', None, None, ), # 7
    (8, TType.I32, 'role', None, None, ), # 8
    (9, TType.I64, 'revision', None, None, ), # 9
    (10, TType.STRUCT, 'preference', (SquarePreference, SquarePreference.thrift_spec), None, ), # 10
    (11, TType.STRING, 'joinMessage', None, None, ), # 11
  )

  def __init__(self, squareMemberMid=None, squareMid=None, displayName=None, profileImageObsHash=None, ableToReceiveMessage=None, membershipState=None, role=None, revision=None, preference=None, joinMessage=None,):
    self.squareMemberMid = squareMemberMid
    self.squareMid = squareMid
    self.displayName = displayName
    self.profileImageObsHash = profileImageObsHash
    self.ableToReceiveMessage = ableToReceiveMessage
    self.membershipState = membershipState
    self.role = role
    self.revision = revision
    self.preference = preference
    self.joinMessage = joinMessage

  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.squareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.displayName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.profileImageObsHash = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.ableToReceiveMessage = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.membershipState = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I32:
          self.role = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRUCT:
          self.preference = SquarePreference()
          self.preference.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.joinMessage = 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('SquareMember')
    if self.squareMemberMid is not None:
      oprot.writeFieldBegin('squareMemberMid', TType.STRING, 1)
      oprot.writeString(self.squareMemberMid)
      oprot.writeFieldEnd()
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 3)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.profileImageObsHash is not None:
      oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 4)
      oprot.writeString(self.profileImageObsHash)
      oprot.writeFieldEnd()
    if self.ableToReceiveMessage is not None:
      oprot.writeFieldBegin('ableToReceiveMessage', TType.BOOL, 5)
      oprot.writeBool(self.ableToReceiveMessage)
      oprot.writeFieldEnd()
    if self.membershipState is not None:
      oprot.writeFieldBegin('membershipState', TType.I32, 7)
      oprot.writeI32(self.membershipState)
      oprot.writeFieldEnd()
    if self.role is not None:
      oprot.writeFieldBegin('role', TType.I32, 8)
      oprot.writeI32(self.role)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 9)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.preference is not None:
      oprot.writeFieldBegin('preference', TType.STRUCT, 10)
      self.preference.write(oprot)
      oprot.writeFieldEnd()
    if self.joinMessage is not None:
      oprot.writeFieldBegin('joinMessage', TType.STRING, 11)
      oprot.writeString(self.joinMessage)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMemberMid)
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.displayName)
    value = (value * 31) ^ hash(self.profileImageObsHash)
    value = (value * 31) ^ hash(self.ableToReceiveMessage)
    value = (value * 31) ^ hash(self.membershipState)
    value = (value * 31) ^ hash(self.role)
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.preference)
    value = (value * 31) ^ hash(self.joinMessage)
    return value

  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 SquareMemberRelation:
  """
  Attributes:
   - state
   - revision
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'state', None, None, ), # 1
    (2, TType.I64, 'revision', None, None, ), # 2
  )

  def __init__(self, state=None, revision=None,):
    self.state = state
    self.revision = revision

  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.state = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        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('SquareMemberRelation')
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.I32, 1)
      oprot.writeI32(self.state)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 2)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.state)
    value = (value * 31) ^ hash(self.revision)
    return value

  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 SquareFeature:
  """
  Attributes:
   - controlState
   - booleanValue
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'controlState', None, None, ), # 1
    (2, TType.I32, 'booleanValue', None, None, ), # 2
  )

  def __init__(self, controlState=None, booleanValue=None,):
    self.controlState = controlState
    self.booleanValue = booleanValue

  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.controlState = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.booleanValue = 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('SquareFeature')
    if self.controlState is not None:
      oprot.writeFieldBegin('controlState', TType.I32, 1)
      oprot.writeI32(self.controlState)
      oprot.writeFieldEnd()
    if self.booleanValue is not None:
      oprot.writeFieldBegin('booleanValue', TType.I32, 2)
      oprot.writeI32(self.booleanValue)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.controlState)
    value = (value * 31) ^ hash(self.booleanValue)
    return value

  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 SquareFeatureSet:
  """
  Attributes:
   - squareMid
   - revision
   - creatingSecretSquareChat
   - invitingIntoOpenSquareChat
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.I64, 'revision', None, None, ), # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.STRUCT, 'creatingSecretSquareChat', (SquareFeature, SquareFeature.thrift_spec), None, ), # 11
    (12, TType.STRUCT, 'invitingIntoOpenSquareChat', (SquareFeature, SquareFeature.thrift_spec), None, ), # 12
  )

  def __init__(self, squareMid=None, revision=None, creatingSecretSquareChat=None, invitingIntoOpenSquareChat=None,):
    self.squareMid = squareMid
    self.revision = revision
    self.creatingSecretSquareChat = creatingSecretSquareChat
    self.invitingIntoOpenSquareChat = invitingIntoOpenSquareChat

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRUCT:
          self.creatingSecretSquareChat = SquareFeature()
          self.creatingSecretSquareChat.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRUCT:
          self.invitingIntoOpenSquareChat = SquareFeature()
          self.invitingIntoOpenSquareChat.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('SquareFeatureSet')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 2)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.creatingSecretSquareChat is not None:
      oprot.writeFieldBegin('creatingSecretSquareChat', TType.STRUCT, 11)
      self.creatingSecretSquareChat.write(oprot)
      oprot.writeFieldEnd()
    if self.invitingIntoOpenSquareChat is not None:
      oprot.writeFieldBegin('invitingIntoOpenSquareChat', TType.STRUCT, 12)
      self.invitingIntoOpenSquareChat.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.creatingSecretSquareChat)
    value = (value * 31) ^ hash(self.invitingIntoOpenSquareChat)
    return value

  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 SquareStatus:
  """
  Attributes:
   - memberCount
   - joinRequestCount
   - lastJoinRequestAt
   - openChatCount
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'memberCount', None, None, ), # 1
    (2, TType.I32, 'joinRequestCount', None, None, ), # 2
    (3, TType.I64, 'lastJoinRequestAt', None, None, ), # 3
    (4, TType.I32, 'openChatCount', None, None, ), # 4
  )

  def __init__(self, memberCount=None, joinRequestCount=None, lastJoinRequestAt=None, openChatCount=None,):
    self.memberCount = memberCount
    self.joinRequestCount = joinRequestCount
    self.lastJoinRequestAt = lastJoinRequestAt
    self.openChatCount = openChatCount

  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.memberCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.joinRequestCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.lastJoinRequestAt = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.openChatCount = 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('SquareStatus')
    if self.memberCount is not None:
      oprot.writeFieldBegin('memberCount', TType.I32, 1)
      oprot.writeI32(self.memberCount)
      oprot.writeFieldEnd()
    if self.joinRequestCount is not None:
      oprot.writeFieldBegin('joinRequestCount', TType.I32, 2)
      oprot.writeI32(self.joinRequestCount)
      oprot.writeFieldEnd()
    if self.lastJoinRequestAt is not None:
      oprot.writeFieldBegin('lastJoinRequestAt', TType.I64, 3)
      oprot.writeI64(self.lastJoinRequestAt)
      oprot.writeFieldEnd()
    if self.openChatCount is not None:
      oprot.writeFieldBegin('openChatCount', TType.I32, 4)
      oprot.writeI32(self.openChatCount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.memberCount)
    value = (value * 31) ^ hash(self.joinRequestCount)
    value = (value * 31) ^ hash(self.lastJoinRequestAt)
    value = (value * 31) ^ hash(self.openChatCount)
    return value

  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 SquareChat:
  """
  Attributes:
   - squareChatMid
   - squareMid
   - type
   - name
   - chatImageObsHash
   - squareChatRevision
   - maxMemberCount
   - state
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.I32, 'type', None, None, ), # 3
    (4, TType.STRING, 'name', None, None, ), # 4
    (5, TType.STRING, 'chatImageObsHash', None, None, ), # 5
    (6, TType.I64, 'squareChatRevision', None, None, ), # 6
    (7, TType.I32, 'maxMemberCount', None, None, ), # 7
    (8, TType.I32, 'state', None, None, ), # 8
  )

  def __init__(self, squareChatMid=None, squareMid=None, type=None, name=None, chatImageObsHash=None, squareChatRevision=None, maxMemberCount=None, state=None,):
    self.squareChatMid = squareChatMid
    self.squareMid = squareMid
    self.type = type
    self.name = name
    self.chatImageObsHash = chatImageObsHash
    self.squareChatRevision = squareChatRevision
    self.maxMemberCount = maxMemberCount
    self.state = state

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        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.STRING:
          self.name = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.chatImageObsHash = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.squareChatRevision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.maxMemberCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I32:
          self.state = 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('SquareChat')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 3)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 4)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.chatImageObsHash is not None:
      oprot.writeFieldBegin('chatImageObsHash', TType.STRING, 5)
      oprot.writeString(self.chatImageObsHash)
      oprot.writeFieldEnd()
    if self.squareChatRevision is not None:
      oprot.writeFieldBegin('squareChatRevision', TType.I64, 6)
      oprot.writeI64(self.squareChatRevision)
      oprot.writeFieldEnd()
    if self.maxMemberCount is not None:
      oprot.writeFieldBegin('maxMemberCount', TType.I32, 7)
      oprot.writeI32(self.maxMemberCount)
      oprot.writeFieldEnd()
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.I32, 8)
      oprot.writeI32(self.state)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.chatImageObsHash)
    value = (value * 31) ^ hash(self.squareChatRevision)
    value = (value * 31) ^ hash(self.maxMemberCount)
    value = (value * 31) ^ hash(self.state)
    return value

  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 NoteStatus:
  """
  Attributes:
   - noteCount
   - latestCreatedAt
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'noteCount', None, None, ), # 1
    (2, TType.I64, 'latestCreatedAt', None, None, ), # 2
  )

  def __init__(self, noteCount=None, latestCreatedAt=None,):
    self.noteCount = noteCount
    self.latestCreatedAt = latestCreatedAt

  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.noteCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.latestCreatedAt = iprot.readI64()
        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('NoteStatus')
    if self.noteCount is not None:
      oprot.writeFieldBegin('noteCount', TType.I32, 1)
      oprot.writeI32(self.noteCount)
      oprot.writeFieldEnd()
    if self.latestCreatedAt is not None:
      oprot.writeFieldBegin('latestCreatedAt', TType.I64, 2)
      oprot.writeI64(self.latestCreatedAt)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.noteCount)
    value = (value * 31) ^ hash(self.latestCreatedAt)
    return value

  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 SquareInfo:
  """
  Attributes:
   - square
   - squareStatus
   - squareNoteStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'squareStatus', (SquareStatus, SquareStatus.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'squareNoteStatus', (NoteStatus, NoteStatus.thrift_spec), None, ), # 3
  )

  def __init__(self, square=None, squareStatus=None, squareNoteStatus=None,):
    self.square = square
    self.squareStatus = squareStatus
    self.squareNoteStatus = squareNoteStatus

  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.square = Square()
          self.square.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareStatus = SquareStatus()
          self.squareStatus.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareNoteStatus = NoteStatus()
          self.squareNoteStatus.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('SquareInfo')
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 1)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    if self.squareStatus is not None:
      oprot.writeFieldBegin('squareStatus', TType.STRUCT, 2)
      self.squareStatus.write(oprot)
      oprot.writeFieldEnd()
    if self.squareNoteStatus is not None:
      oprot.writeFieldBegin('squareNoteStatus', TType.STRUCT, 3)
      self.squareNoteStatus.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.square)
    value = (value * 31) ^ hash(self.squareStatus)
    value = (value * 31) ^ hash(self.squareNoteStatus)
    return value

  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 BotUseInfo:
  """
  Attributes:
   - botUseAgreementAccepted
   - botInFriends
   - primaryApplication
   - locale
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'botUseAgreementAccepted', None, None, ), # 1
    (2, TType.BOOL, 'botInFriends', None, None, ), # 2
    (3, TType.STRING, 'primaryApplication', None, None, ), # 3
    (4, TType.STRING, 'locale', None, None, ), # 4
  )

  def __init__(self, botUseAgreementAccepted=None, botInFriends=None, primaryApplication=None, locale=None,):
    self.botUseAgreementAccepted = botUseAgreementAccepted
    self.botInFriends = botInFriends
    self.primaryApplication = primaryApplication
    self.locale = locale

  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.BOOL:
          self.botUseAgreementAccepted = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.botInFriends = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.primaryApplication = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.locale = 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('BotUseInfo')
    if self.botUseAgreementAccepted is not None:
      oprot.writeFieldBegin('botUseAgreementAccepted', TType.BOOL, 1)
      oprot.writeBool(self.botUseAgreementAccepted)
      oprot.writeFieldEnd()
    if self.botInFriends is not None:
      oprot.writeFieldBegin('botInFriends', TType.BOOL, 2)
      oprot.writeBool(self.botInFriends)
      oprot.writeFieldEnd()
    if self.primaryApplication is not None:
      oprot.writeFieldBegin('primaryApplication', TType.STRING, 3)
      oprot.writeString(self.primaryApplication)
      oprot.writeFieldEnd()
    if self.locale is not None:
      oprot.writeFieldBegin('locale', TType.STRING, 4)
      oprot.writeString(self.locale)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.botUseAgreementAccepted)
    value = (value * 31) ^ hash(self.botInFriends)
    value = (value * 31) ^ hash(self.primaryApplication)
    value = (value * 31) ^ hash(self.locale)
    return value

  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 PaidCallAdCountry:
  """
  Attributes:
   - countryCode
   - rateDivision
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'countryCode', None, None, ), # 1
    (2, TType.STRING, 'rateDivision', None, None, ), # 2
  )

  def __init__(self, countryCode=None, rateDivision=None,):
    self.countryCode = countryCode
    self.rateDivision = rateDivision

  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.countryCode = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.rateDivision = 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('PaidCallAdCountry')
    if self.countryCode is not None:
      oprot.writeFieldBegin('countryCode', TType.STRING, 1)
      oprot.writeString(self.countryCode)
      oprot.writeFieldEnd()
    if self.rateDivision is not None:
      oprot.writeFieldBegin('rateDivision', TType.STRING, 2)
      oprot.writeString(self.rateDivision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.countryCode)
    value = (value * 31) ^ hash(self.rateDivision)
    return value

  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 PaidCallAdResult:
  """
  Attributes:
   - adRemains
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'adRemains', None, None, ), # 1
  )

  def __init__(self, adRemains=None,):
    self.adRemains = adRemains

  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.adRemains = 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('PaidCallAdResult')
    if self.adRemains is not None:
      oprot.writeFieldBegin('adRemains', TType.I32, 1)
      oprot.writeI32(self.adRemains)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.adRemains)
    return value

  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 PaidCallBalance:
  """
  Attributes:
   - productType
   - productName
   - unit
   - limitedPaidBalance
   - limitedFreeBalance
   - unlimitedPaidBalance
   - unlimitedFreeBalance
   - startTime
   - endTime
   - autopayEnabled
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'productType', None, None, ), # 1
    (2, TType.STRING, 'productName', None, None, ), # 2
    (3, TType.STRING, 'unit', None, None, ), # 3
    (4, TType.I32, 'limitedPaidBalance', None, None, ), # 4
    (5, TType.I32, 'limitedFreeBalance', None, None, ), # 5
    (6, TType.I32, 'unlimitedPaidBalance', None, None, ), # 6
    (7, TType.I32, 'unlimitedFreeBalance', None, None, ), # 7
    (8, TType.I64, 'startTime', None, None, ), # 8
    (9, TType.I64, 'endTime', None, None, ), # 9
    (10, TType.BOOL, 'autopayEnabled', None, None, ), # 10
  )

  def __init__(self, productType=None, productName=None, unit=None, limitedPaidBalance=None, limitedFreeBalance=None, unlimitedPaidBalance=None, unlimitedFreeBalance=None, startTime=None, endTime=None, autopayEnabled=None,):
    self.productType = productType
    self.productName = productName
    self.unit = unit
    self.limitedPaidBalance = limitedPaidBalance
    self.limitedFreeBalance = limitedFreeBalance
    self.unlimitedPaidBalance = unlimitedPaidBalance
    self.unlimitedFreeBalance = unlimitedFreeBalance
    self.startTime = startTime
    self.endTime = endTime
    self.autopayEnabled = autopayEnabled

  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.productType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.productName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.unit = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.limitedPaidBalance = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.limitedFreeBalance = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.unlimitedPaidBalance = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.unlimitedFreeBalance = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I64:
          self.startTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I64:
          self.endTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.BOOL:
          self.autopayEnabled = 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('PaidCallBalance')
    if self.productType is not None:
      oprot.writeFieldBegin('productType', TType.I32, 1)
      oprot.writeI32(self.productType)
      oprot.writeFieldEnd()
    if self.productName is not None:
      oprot.writeFieldBegin('productName', TType.STRING, 2)
      oprot.writeString(self.productName)
      oprot.writeFieldEnd()
    if self.unit is not None:
      oprot.writeFieldBegin('unit', TType.STRING, 3)
      oprot.writeString(self.unit)
      oprot.writeFieldEnd()
    if self.limitedPaidBalance is not None:
      oprot.writeFieldBegin('limitedPaidBalance', TType.I32, 4)
      oprot.writeI32(self.limitedPaidBalance)
      oprot.writeFieldEnd()
    if self.limitedFreeBalance is not None:
      oprot.writeFieldBegin('limitedFreeBalance', TType.I32, 5)
      oprot.writeI32(self.limitedFreeBalance)
      oprot.writeFieldEnd()
    if self.unlimitedPaidBalance is not None:
      oprot.writeFieldBegin('unlimitedPaidBalance', TType.I32, 6)
      oprot.writeI32(self.unlimitedPaidBalance)
      oprot.writeFieldEnd()
    if self.unlimitedFreeBalance is not None:
      oprot.writeFieldBegin('unlimitedFreeBalance', TType.I32, 7)
      oprot.writeI32(self.unlimitedFreeBalance)
      oprot.writeFieldEnd()
    if self.startTime is not None:
      oprot.writeFieldBegin('startTime', TType.I64, 8)
      oprot.writeI64(self.startTime)
      oprot.writeFieldEnd()
    if self.endTime is not None:
      oprot.writeFieldBegin('endTime', TType.I64, 9)
      oprot.writeI64(self.endTime)
      oprot.writeFieldEnd()
    if self.autopayEnabled is not None:
      oprot.writeFieldBegin('autopayEnabled', TType.BOOL, 10)
      oprot.writeBool(self.autopayEnabled)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.productType)
    value = (value * 31) ^ hash(self.productName)
    value = (value * 31) ^ hash(self.unit)
    value = (value * 31) ^ hash(self.limitedPaidBalance)
    value = (value * 31) ^ hash(self.limitedFreeBalance)
    value = (value * 31) ^ hash(self.unlimitedPaidBalance)
    value = (value * 31) ^ hash(self.unlimitedFreeBalance)
    value = (value * 31) ^ hash(self.startTime)
    value = (value * 31) ^ hash(self.endTime)
    value = (value * 31) ^ hash(self.autopayEnabled)
    return value

  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 PaidCallCurrencyExchangeRate:
  """
  Attributes:
   - currencyCode
   - currencyName
   - currencySign
   - preferred
   - coinRate
   - creditRate
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'currencyCode', None, None, ), # 1
    (2, TType.STRING, 'currencyName', None, None, ), # 2
    (3, TType.STRING, 'currencySign', None, None, ), # 3
    (4, TType.BOOL, 'preferred', None, None, ), # 4
    (5, TType.STRING, 'coinRate', None, None, ), # 5
    (6, TType.STRING, 'creditRate', None, None, ), # 6
  )

  def __init__(self, currencyCode=None, currencyName=None, currencySign=None, preferred=None, coinRate=None, creditRate=None,):
    self.currencyCode = currencyCode
    self.currencyName = currencyName
    self.currencySign = currencySign
    self.preferred = preferred
    self.coinRate = coinRate
    self.creditRate = creditRate

  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.currencyCode = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.currencyName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.currencySign = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.preferred = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.coinRate = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.creditRate = 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('PaidCallCurrencyExchangeRate')
    if self.currencyCode is not None:
      oprot.writeFieldBegin('currencyCode', TType.STRING, 1)
      oprot.writeString(self.currencyCode)
      oprot.writeFieldEnd()
    if self.currencyName is not None:
      oprot.writeFieldBegin('currencyName', TType.STRING, 2)
      oprot.writeString(self.currencyName)
      oprot.writeFieldEnd()
    if self.currencySign is not None:
      oprot.writeFieldBegin('currencySign', TType.STRING, 3)
      oprot.writeString(self.currencySign)
      oprot.writeFieldEnd()
    if self.preferred is not None:
      oprot.writeFieldBegin('preferred', TType.BOOL, 4)
      oprot.writeBool(self.preferred)
      oprot.writeFieldEnd()
    if self.coinRate is not None:
      oprot.writeFieldBegin('coinRate', TType.STRING, 5)
      oprot.writeString(self.coinRate)
      oprot.writeFieldEnd()
    if self.creditRate is not None:
      oprot.writeFieldBegin('creditRate', TType.STRING, 6)
      oprot.writeString(self.creditRate)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.currencyCode)
    value = (value * 31) ^ hash(self.currencyName)
    value = (value * 31) ^ hash(self.currencySign)
    value = (value * 31) ^ hash(self.preferred)
    value = (value * 31) ^ hash(self.coinRate)
    value = (value * 31) ^ hash(self.creditRate)
    return value

  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 ExtendedProfileBirthday:
  """
  Attributes:
   - year
   - yearPrivacyLevelType
   - yearEnabled
   - day
   - dayPrivacyLevelType
   - dayEnabled
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'year', None, None, ), # 1
    (2, TType.I32, 'yearPrivacyLevelType', None, None, ), # 2
    (3, TType.BOOL, 'yearEnabled', None, None, ), # 3
    None, # 4
    (5, TType.STRING, 'day', None, None, ), # 5
    (6, TType.I32, 'dayPrivacyLevelType', None, None, ), # 6
    (7, TType.BOOL, 'dayEnabled', None, None, ), # 7
  )

  def __init__(self, year=None, yearPrivacyLevelType=None, yearEnabled=None, day=None, dayPrivacyLevelType=None, dayEnabled=None,):
    self.year = year
    self.yearPrivacyLevelType = yearPrivacyLevelType
    self.yearEnabled = yearEnabled
    self.day = day
    self.dayPrivacyLevelType = dayPrivacyLevelType
    self.dayEnabled = dayEnabled

  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.year = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.yearPrivacyLevelType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.yearEnabled = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.day = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.dayPrivacyLevelType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.BOOL:
          self.dayEnabled = 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('ExtendedProfileBirthday')
    if self.year is not None:
      oprot.writeFieldBegin('year', TType.STRING, 1)
      oprot.writeString(self.year)
      oprot.writeFieldEnd()
    if self.yearPrivacyLevelType is not None:
      oprot.writeFieldBegin('yearPrivacyLevelType', TType.I32, 2)
      oprot.writeI32(self.yearPrivacyLevelType)
      oprot.writeFieldEnd()
    if self.yearEnabled is not None:
      oprot.writeFieldBegin('yearEnabled', TType.BOOL, 3)
      oprot.writeBool(self.yearEnabled)
      oprot.writeFieldEnd()
    if self.day is not None:
      oprot.writeFieldBegin('day', TType.STRING, 5)
      oprot.writeString(self.day)
      oprot.writeFieldEnd()
    if self.dayPrivacyLevelType is not None:
      oprot.writeFieldBegin('dayPrivacyLevelType', TType.I32, 6)
      oprot.writeI32(self.dayPrivacyLevelType)
      oprot.writeFieldEnd()
    if self.dayEnabled is not None:
      oprot.writeFieldBegin('dayEnabled', TType.BOOL, 7)
      oprot.writeBool(self.dayEnabled)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.year)
    value = (value * 31) ^ hash(self.yearPrivacyLevelType)
    value = (value * 31) ^ hash(self.yearEnabled)
    value = (value * 31) ^ hash(self.day)
    value = (value * 31) ^ hash(self.dayPrivacyLevelType)
    value = (value * 31) ^ hash(self.dayEnabled)
    return value

  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 ExtendedProfile:
  """
  Attributes:
   - birthday
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'birthday', (ExtendedProfileBirthday, ExtendedProfileBirthday.thrift_spec), None, ), # 1
  )

  def __init__(self, birthday=None,):
    self.birthday = birthday

  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.birthday = ExtendedProfileBirthday()
          self.birthday.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('ExtendedProfile')
    if self.birthday is not None:
      oprot.writeFieldBegin('birthday', TType.STRUCT, 1)
      self.birthday.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.birthday)
    return value

  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 PaidCallDialing:
  """
  Attributes:
   - type
   - dialedNumber
   - serviceDomain
   - productType
   - productName
   - multipleProduct
   - callerIdStatus
   - balance
   - unit
   - rate
   - displayCode
   - calledNumber
   - calleeNationalNumber
   - calleeCallingCode
   - rateDivision
   - adMaxMin
   - adRemains
   - adSessionId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'type', None, None, ), # 1
    (2, TType.STRING, 'dialedNumber', None, None, ), # 2
    (3, TType.STRING, 'serviceDomain', None, None, ), # 3
    (4, TType.I32, 'productType', None, None, ), # 4
    (5, TType.STRING, 'productName', None, None, ), # 5
    (6, TType.BOOL, 'multipleProduct', None, None, ), # 6
    (7, TType.I32, 'callerIdStatus', None, None, ), # 7
    None, # 8
    None, # 9
    (10, TType.I32, 'balance', None, None, ), # 10
    (11, TType.STRING, 'unit', None, None, ), # 11
    (12, TType.I32, 'rate', None, None, ), # 12
    (13, TType.STRING, 'displayCode', None, None, ), # 13
    (14, TType.STRING, 'calledNumber', None, None, ), # 14
    (15, TType.STRING, 'calleeNationalNumber', None, None, ), # 15
    (16, TType.STRING, 'calleeCallingCode', None, None, ), # 16
    (17, TType.STRING, 'rateDivision', None, None, ), # 17
    None, # 18
    None, # 19
    (20, TType.I32, 'adMaxMin', None, None, ), # 20
    (21, TType.I32, 'adRemains', None, None, ), # 21
    (22, TType.STRING, 'adSessionId', None, None, ), # 22
  )

  def __init__(self, type=None, dialedNumber=None, serviceDomain=None, productType=None, productName=None, multipleProduct=None, callerIdStatus=None, balance=None, unit=None, rate=None, displayCode=None, calledNumber=None, calleeNationalNumber=None, calleeCallingCode=None, rateDivision=None, adMaxMin=None, adRemains=None, adSessionId=None,):
    self.type = type
    self.dialedNumber = dialedNumber
    self.serviceDomain = serviceDomain
    self.productType = productType
    self.productName = productName
    self.multipleProduct = multipleProduct
    self.callerIdStatus = callerIdStatus
    self.balance = balance
    self.unit = unit
    self.rate = rate
    self.displayCode = displayCode
    self.calledNumber = calledNumber
    self.calleeNationalNumber = calleeNationalNumber
    self.calleeCallingCode = calleeCallingCode
    self.rateDivision = rateDivision
    self.adMaxMin = adMaxMin
    self.adRemains = adRemains
    self.adSessionId = adSessionId

  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.type = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.dialedNumber = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.serviceDomain = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.productType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.productName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.BOOL:
          self.multipleProduct = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.callerIdStatus = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I32:
          self.balance = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.unit = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I32:
          self.rate = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.STRING:
          self.displayCode = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.STRING:
          self.calledNumber = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.STRING:
          self.calleeNationalNumber = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.STRING:
          self.calleeCallingCode = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.STRING:
          self.rateDivision = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.I32:
          self.adMaxMin = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.I32:
          self.adRemains = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRING:
          self.adSessionId = 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('PaidCallDialing')
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 1)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.dialedNumber is not None:
      oprot.writeFieldBegin('dialedNumber', TType.STRING, 2)
      oprot.writeString(self.dialedNumber)
      oprot.writeFieldEnd()
    if self.serviceDomain is not None:
      oprot.writeFieldBegin('serviceDomain', TType.STRING, 3)
      oprot.writeString(self.serviceDomain)
      oprot.writeFieldEnd()
    if self.productType is not None:
      oprot.writeFieldBegin('productType', TType.I32, 4)
      oprot.writeI32(self.productType)
      oprot.writeFieldEnd()
    if self.productName is not None:
      oprot.writeFieldBegin('productName', TType.STRING, 5)
      oprot.writeString(self.productName)
      oprot.writeFieldEnd()
    if self.multipleProduct is not None:
      oprot.writeFieldBegin('multipleProduct', TType.BOOL, 6)
      oprot.writeBool(self.multipleProduct)
      oprot.writeFieldEnd()
    if self.callerIdStatus is not None:
      oprot.writeFieldBegin('callerIdStatus', TType.I32, 7)
      oprot.writeI32(self.callerIdStatus)
      oprot.writeFieldEnd()
    if self.balance is not None:
      oprot.writeFieldBegin('balance', TType.I32, 10)
      oprot.writeI32(self.balance)
      oprot.writeFieldEnd()
    if self.unit is not None:
      oprot.writeFieldBegin('unit', TType.STRING, 11)
      oprot.writeString(self.unit)
      oprot.writeFieldEnd()
    if self.rate is not None:
      oprot.writeFieldBegin('rate', TType.I32, 12)
      oprot.writeI32(self.rate)
      oprot.writeFieldEnd()
    if self.displayCode is not None:
      oprot.writeFieldBegin('displayCode', TType.STRING, 13)
      oprot.writeString(self.displayCode)
      oprot.writeFieldEnd()
    if self.calledNumber is not None:
      oprot.writeFieldBegin('calledNumber', TType.STRING, 14)
      oprot.writeString(self.calledNumber)
      oprot.writeFieldEnd()
    if self.calleeNationalNumber is not None:
      oprot.writeFieldBegin('calleeNationalNumber', TType.STRING, 15)
      oprot.writeString(self.calleeNationalNumber)
      oprot.writeFieldEnd()
    if self.calleeCallingCode is not None:
      oprot.writeFieldBegin('calleeCallingCode', TType.STRING, 16)
      oprot.writeString(self.calleeCallingCode)
      oprot.writeFieldEnd()
    if self.rateDivision is not None:
      oprot.writeFieldBegin('rateDivision', TType.STRING, 17)
      oprot.writeString(self.rateDivision)
      oprot.writeFieldEnd()
    if self.adMaxMin is not None:
      oprot.writeFieldBegin('adMaxMin', TType.I32, 20)
      oprot.writeI32(self.adMaxMin)
      oprot.writeFieldEnd()
    if self.adRemains is not None:
      oprot.writeFieldBegin('adRemains', TType.I32, 21)
      oprot.writeI32(self.adRemains)
      oprot.writeFieldEnd()
    if self.adSessionId is not None:
      oprot.writeFieldBegin('adSessionId', TType.STRING, 22)
      oprot.writeString(self.adSessionId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.dialedNumber)
    value = (value * 31) ^ hash(self.serviceDomain)
    value = (value * 31) ^ hash(self.productType)
    value = (value * 31) ^ hash(self.productName)
    value = (value * 31) ^ hash(self.multipleProduct)
    value = (value * 31) ^ hash(self.callerIdStatus)
    value = (value * 31) ^ hash(self.balance)
    value = (value * 31) ^ hash(self.unit)
    value = (value * 31) ^ hash(self.rate)
    value = (value * 31) ^ hash(self.displayCode)
    value = (value * 31) ^ hash(self.calledNumber)
    value = (value * 31) ^ hash(self.calleeNationalNumber)
    value = (value * 31) ^ hash(self.calleeCallingCode)
    value = (value * 31) ^ hash(self.rateDivision)
    value = (value * 31) ^ hash(self.adMaxMin)
    value = (value * 31) ^ hash(self.adRemains)
    value = (value * 31) ^ hash(self.adSessionId)
    return value

  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 SpotItem:
  """
  Attributes:
   - name
   - phone
   - category
   - mid
   - countryAreaCode
   - freePhoneCallable
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'name', None, None, ), # 2
    (3, TType.STRING, 'phone', None, None, ), # 3
    (4, TType.I32, 'category', None, None, ), # 4
    (5, TType.STRING, 'mid', None, None, ), # 5
    (6, TType.STRING, 'countryAreaCode', None, None, ), # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.BOOL, 'freePhoneCallable', None, None, ), # 10
  )

  def __init__(self, name=None, phone=None, category=None, mid=None, countryAreaCode=None, freePhoneCallable=None,):
    self.name = name
    self.phone = phone
    self.category = category
    self.mid = mid
    self.countryAreaCode = countryAreaCode
    self.freePhoneCallable = freePhoneCallable

  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 == 2:
        if ftype == TType.STRING:
          self.name = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.phone = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.category = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.mid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.countryAreaCode = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.BOOL:
          self.freePhoneCallable = 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('SpotItem')
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.phone is not None:
      oprot.writeFieldBegin('phone', TType.STRING, 3)
      oprot.writeString(self.phone)
      oprot.writeFieldEnd()
    if self.category is not None:
      oprot.writeFieldBegin('category', TType.I32, 4)
      oprot.writeI32(self.category)
      oprot.writeFieldEnd()
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 5)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.countryAreaCode is not None:
      oprot.writeFieldBegin('countryAreaCode', TType.STRING, 6)
      oprot.writeString(self.countryAreaCode)
      oprot.writeFieldEnd()
    if self.freePhoneCallable is not None:
      oprot.writeFieldBegin('freePhoneCallable', TType.BOOL, 10)
      oprot.writeBool(self.freePhoneCallable)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.phone)
    value = (value * 31) ^ hash(self.category)
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.countryAreaCode)
    value = (value * 31) ^ hash(self.freePhoneCallable)
    return value

  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 SpotNearbyItem:
  """
  Attributes:
   - spotItem
   - location
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRUCT, 'spotItem', (SpotItem, SpotItem.thrift_spec), None, ), # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.STRUCT, 'location', (Location, Location.thrift_spec), None, ), # 11
  )

  def __init__(self, spotItem=None, location=None,):
    self.spotItem = spotItem
    self.location = location

  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 == 2:
        if ftype == TType.STRUCT:
          self.spotItem = SpotItem()
          self.spotItem.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRUCT:
          self.location = Location()
          self.location.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('SpotNearbyItem')
    if self.spotItem is not None:
      oprot.writeFieldBegin('spotItem', TType.STRUCT, 2)
      self.spotItem.write(oprot)
      oprot.writeFieldEnd()
    if self.location is not None:
      oprot.writeFieldBegin('location', TType.STRUCT, 11)
      self.location.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.spotItem)
    value = (value * 31) ^ hash(self.location)
    return value

  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 SpotNearbyResponse:
  """
  Attributes:
   - spotNearbyItems
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'spotNearbyItems', (TType.STRUCT,(SpotNearbyItem, SpotNearbyItem.thrift_spec)), None, ), # 1
  )

  def __init__(self, spotNearbyItems=None,):
    self.spotNearbyItems = spotNearbyItems

  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.spotNearbyItems = []
          (_etype17, _size14) = iprot.readListBegin()
          for _i18 in xrange(_size14):
            _elem19 = SpotNearbyItem()
            _elem19.read(iprot)
            self.spotNearbyItems.append(_elem19)
          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('SpotNearbyResponse')
    if self.spotNearbyItems is not None:
      oprot.writeFieldBegin('spotNearbyItems', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.spotNearbyItems))
      for iter20 in self.spotNearbyItems:
        iter20.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.spotNearbyItems)
    return value

  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 SpotPhoneNumberResponse:
  """
  Attributes:
   - spotItems
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'spotItems', (TType.STRUCT,(SpotItem, SpotItem.thrift_spec)), None, ), # 1
  )

  def __init__(self, spotItems=None,):
    self.spotItems = spotItems

  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.spotItems = []
          (_etype24, _size21) = iprot.readListBegin()
          for _i25 in xrange(_size21):
            _elem26 = SpotItem()
            _elem26.read(iprot)
            self.spotItems.append(_elem26)
          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('SpotPhoneNumberResponse')
    if self.spotItems is not None:
      oprot.writeFieldBegin('spotItems', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.spotItems))
      for iter27 in self.spotItems:
        iter27.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.spotItems)
    return value

  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 PaidCallHistory:
  """
  Attributes:
   - seq
   - type
   - dialedNumber
   - calledNumber
   - toMid
   - toName
   - setupTime
   - startTime
   - endTime
   - duration
   - terminate
   - productType
   - charge
   - unit
   - result
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'seq', None, None, ), # 1
    (2, TType.I32, 'type', None, None, ), # 2
    (3, TType.STRING, 'dialedNumber', None, None, ), # 3
    (4, TType.STRING, 'calledNumber', None, None, ), # 4
    (5, TType.STRING, 'toMid', None, None, ), # 5
    (6, TType.STRING, 'toName', None, None, ), # 6
    (7, TType.I64, 'setupTime', None, None, ), # 7
    (8, TType.I64, 'startTime', None, None, ), # 8
    (9, TType.I64, 'endTime', None, None, ), # 9
    (10, TType.I64, 'duration', None, None, ), # 10
    (11, TType.I32, 'terminate', None, None, ), # 11
    (12, TType.I32, 'productType', None, None, ), # 12
    (13, TType.I32, 'charge', None, None, ), # 13
    (14, TType.STRING, 'unit', None, None, ), # 14
    (15, TType.STRING, 'result', None, None, ), # 15
  )

  def __init__(self, seq=None, type=None, dialedNumber=None, calledNumber=None, toMid=None, toName=None, setupTime=None, startTime=None, endTime=None, duration=None, terminate=None, productType=None, charge=None, unit=None, result=None,):
    self.seq = seq
    self.type = type
    self.dialedNumber = dialedNumber
    self.calledNumber = calledNumber
    self.toMid = toMid
    self.toName = toName
    self.setupTime = setupTime
    self.startTime = startTime
    self.endTime = endTime
    self.duration = duration
    self.terminate = terminate
    self.productType = productType
    self.charge = charge
    self.unit = unit
    self.result = result

  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.seq = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.type = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.dialedNumber = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.calledNumber = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.toMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.toName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I64:
          self.setupTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I64:
          self.startTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I64:
          self.endTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I64:
          self.duration = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I32:
          self.terminate = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I32:
          self.productType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.I32:
          self.charge = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.STRING:
          self.unit = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.STRING:
          self.result = 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('PaidCallHistory')
    if self.seq is not None:
      oprot.writeFieldBegin('seq', TType.I64, 1)
      oprot.writeI64(self.seq)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 2)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.dialedNumber is not None:
      oprot.writeFieldBegin('dialedNumber', TType.STRING, 3)
      oprot.writeString(self.dialedNumber)
      oprot.writeFieldEnd()
    if self.calledNumber is not None:
      oprot.writeFieldBegin('calledNumber', TType.STRING, 4)
      oprot.writeString(self.calledNumber)
      oprot.writeFieldEnd()
    if self.toMid is not None:
      oprot.writeFieldBegin('toMid', TType.STRING, 5)
      oprot.writeString(self.toMid)
      oprot.writeFieldEnd()
    if self.toName is not None:
      oprot.writeFieldBegin('toName', TType.STRING, 6)
      oprot.writeString(self.toName)
      oprot.writeFieldEnd()
    if self.setupTime is not None:
      oprot.writeFieldBegin('setupTime', TType.I64, 7)
      oprot.writeI64(self.setupTime)
      oprot.writeFieldEnd()
    if self.startTime is not None:
      oprot.writeFieldBegin('startTime', TType.I64, 8)
      oprot.writeI64(self.startTime)
      oprot.writeFieldEnd()
    if self.endTime is not None:
      oprot.writeFieldBegin('endTime', TType.I64, 9)
      oprot.writeI64(self.endTime)
      oprot.writeFieldEnd()
    if self.duration is not None:
      oprot.writeFieldBegin('duration', TType.I64, 10)
      oprot.writeI64(self.duration)
      oprot.writeFieldEnd()
    if self.terminate is not None:
      oprot.writeFieldBegin('terminate', TType.I32, 11)
      oprot.writeI32(self.terminate)
      oprot.writeFieldEnd()
    if self.productType is not None:
      oprot.writeFieldBegin('productType', TType.I32, 12)
      oprot.writeI32(self.productType)
      oprot.writeFieldEnd()
    if self.charge is not None:
      oprot.writeFieldBegin('charge', TType.I32, 13)
      oprot.writeI32(self.charge)
      oprot.writeFieldEnd()
    if self.unit is not None:
      oprot.writeFieldBegin('unit', TType.STRING, 14)
      oprot.writeString(self.unit)
      oprot.writeFieldEnd()
    if self.result is not None:
      oprot.writeFieldBegin('result', TType.STRING, 15)
      oprot.writeString(self.result)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.seq)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.dialedNumber)
    value = (value * 31) ^ hash(self.calledNumber)
    value = (value * 31) ^ hash(self.toMid)
    value = (value * 31) ^ hash(self.toName)
    value = (value * 31) ^ hash(self.setupTime)
    value = (value * 31) ^ hash(self.startTime)
    value = (value * 31) ^ hash(self.endTime)
    value = (value * 31) ^ hash(self.duration)
    value = (value * 31) ^ hash(self.terminate)
    value = (value * 31) ^ hash(self.productType)
    value = (value * 31) ^ hash(self.charge)
    value = (value * 31) ^ hash(self.unit)
    value = (value * 31) ^ hash(self.result)
    return value

  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 PaidCallHistoryResult:
  """
  Attributes:
   - historys
   - hasNext
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'historys', (TType.STRUCT,(PaidCallHistory, PaidCallHistory.thrift_spec)), None, ), # 1
    (2, TType.BOOL, 'hasNext', None, None, ), # 2
  )

  def __init__(self, historys=None, hasNext=None,):
    self.historys = historys
    self.hasNext = hasNext

  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.historys = []
          (_etype31, _size28) = iprot.readListBegin()
          for _i32 in xrange(_size28):
            _elem33 = PaidCallHistory()
            _elem33.read(iprot)
            self.historys.append(_elem33)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.hasNext = 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('PaidCallHistoryResult')
    if self.historys is not None:
      oprot.writeFieldBegin('historys', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.historys))
      for iter34 in self.historys:
        iter34.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.hasNext is not None:
      oprot.writeFieldBegin('hasNext', TType.BOOL, 2)
      oprot.writeBool(self.hasNext)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.historys)
    value = (value * 31) ^ hash(self.hasNext)
    return value

  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 PaidCallMetadataResult:
  """
  Attributes:
   - currencyExchangeRates
   - recommendedCountryCodes
   - adCountries
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'currencyExchangeRates', (TType.STRUCT,(PaidCallCurrencyExchangeRate, PaidCallCurrencyExchangeRate.thrift_spec)), None, ), # 1
    (2, TType.LIST, 'recommendedCountryCodes', (TType.STRING,None), None, ), # 2
    (3, TType.LIST, 'adCountries', (TType.STRUCT,(PaidCallAdCountry, PaidCallAdCountry.thrift_spec)), None, ), # 3
  )

  def __init__(self, currencyExchangeRates=None, recommendedCountryCodes=None, adCountries=None,):
    self.currencyExchangeRates = currencyExchangeRates
    self.recommendedCountryCodes = recommendedCountryCodes
    self.adCountries = adCountries

  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.currencyExchangeRates = []
          (_etype38, _size35) = iprot.readListBegin()
          for _i39 in xrange(_size35):
            _elem40 = PaidCallCurrencyExchangeRate()
            _elem40.read(iprot)
            self.currencyExchangeRates.append(_elem40)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.recommendedCountryCodes = []
          (_etype44, _size41) = iprot.readListBegin()
          for _i45 in xrange(_size41):
            _elem46 = iprot.readString()
            self.recommendedCountryCodes.append(_elem46)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.adCountries = []
          (_etype50, _size47) = iprot.readListBegin()
          for _i51 in xrange(_size47):
            _elem52 = PaidCallAdCountry()
            _elem52.read(iprot)
            self.adCountries.append(_elem52)
          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('PaidCallMetadataResult')
    if self.currencyExchangeRates is not None:
      oprot.writeFieldBegin('currencyExchangeRates', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.currencyExchangeRates))
      for iter53 in self.currencyExchangeRates:
        iter53.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.recommendedCountryCodes is not None:
      oprot.writeFieldBegin('recommendedCountryCodes', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.recommendedCountryCodes))
      for iter54 in self.recommendedCountryCodes:
        oprot.writeString(iter54)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.adCountries is not None:
      oprot.writeFieldBegin('adCountries', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.adCountries))
      for iter55 in self.adCountries:
        iter55.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.currencyExchangeRates)
    value = (value * 31) ^ hash(self.recommendedCountryCodes)
    value = (value * 31) ^ hash(self.adCountries)
    return value

  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 PaidCallRedeemResult:
  """
  Attributes:
   - eventName
   - eventAmount
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'eventName', None, None, ), # 1
    (2, TType.I32, 'eventAmount', None, None, ), # 2
  )

  def __init__(self, eventName=None, eventAmount=None,):
    self.eventName = eventName
    self.eventAmount = eventAmount

  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.eventName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.eventAmount = 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('PaidCallRedeemResult')
    if self.eventName is not None:
      oprot.writeFieldBegin('eventName', TType.STRING, 1)
      oprot.writeString(self.eventName)
      oprot.writeFieldEnd()
    if self.eventAmount is not None:
      oprot.writeFieldBegin('eventAmount', TType.I32, 2)
      oprot.writeI32(self.eventAmount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.eventName)
    value = (value * 31) ^ hash(self.eventAmount)
    return value

  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 PaidCallResponse:
  """
  Attributes:
   - host
   - dialing
   - token
   - spotItems
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'host', (CallHost, CallHost.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'dialing', (PaidCallDialing, PaidCallDialing.thrift_spec), None, ), # 2
    (3, TType.STRING, 'token', None, None, ), # 3
    (4, TType.LIST, 'spotItems', (TType.STRUCT,(SpotItem, SpotItem.thrift_spec)), None, ), # 4
  )

  def __init__(self, host=None, dialing=None, token=None, spotItems=None,):
    self.host = host
    self.dialing = dialing
    self.token = token
    self.spotItems = spotItems

  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.host = CallHost()
          self.host.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.dialing = PaidCallDialing()
          self.dialing.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.token = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.spotItems = []
          (_etype59, _size56) = iprot.readListBegin()
          for _i60 in xrange(_size56):
            _elem61 = SpotItem()
            _elem61.read(iprot)
            self.spotItems.append(_elem61)
          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('PaidCallResponse')
    if self.host is not None:
      oprot.writeFieldBegin('host', TType.STRUCT, 1)
      self.host.write(oprot)
      oprot.writeFieldEnd()
    if self.dialing is not None:
      oprot.writeFieldBegin('dialing', TType.STRUCT, 2)
      self.dialing.write(oprot)
      oprot.writeFieldEnd()
    if self.token is not None:
      oprot.writeFieldBegin('token', TType.STRING, 3)
      oprot.writeString(self.token)
      oprot.writeFieldEnd()
    if self.spotItems is not None:
      oprot.writeFieldBegin('spotItems', TType.LIST, 4)
      oprot.writeListBegin(TType.STRUCT, len(self.spotItems))
      for iter62 in self.spotItems:
        iter62.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.host)
    value = (value * 31) ^ hash(self.dialing)
    value = (value * 31) ^ hash(self.token)
    value = (value * 31) ^ hash(self.spotItems)
    return value

  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 PaidCallUserRate:
  """
  Attributes:
   - countryCode
   - rate
   - rateDivision
   - rateName
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'countryCode', None, None, ), # 1
    (2, TType.I32, 'rate', None, None, ), # 2
    (3, TType.STRING, 'rateDivision', None, None, ), # 3
    (4, TType.STRING, 'rateName', None, None, ), # 4
  )

  def __init__(self, countryCode=None, rate=None, rateDivision=None, rateName=None,):
    self.countryCode = countryCode
    self.rate = rate
    self.rateDivision = rateDivision
    self.rateName = rateName

  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.countryCode = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.rate = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.rateDivision = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.rateName = 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('PaidCallUserRate')
    if self.countryCode is not None:
      oprot.writeFieldBegin('countryCode', TType.STRING, 1)
      oprot.writeString(self.countryCode)
      oprot.writeFieldEnd()
    if self.rate is not None:
      oprot.writeFieldBegin('rate', TType.I32, 2)
      oprot.writeI32(self.rate)
      oprot.writeFieldEnd()
    if self.rateDivision is not None:
      oprot.writeFieldBegin('rateDivision', TType.STRING, 3)
      oprot.writeString(self.rateDivision)
      oprot.writeFieldEnd()
    if self.rateName is not None:
      oprot.writeFieldBegin('rateName', TType.STRING, 4)
      oprot.writeString(self.rateName)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.countryCode)
    value = (value * 31) ^ hash(self.rate)
    value = (value * 31) ^ hash(self.rateDivision)
    value = (value * 31) ^ hash(self.rateName)
    return value

  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 ChannelInfo:
  """
  Attributes:
   - channelId
   - name
   - entryPageUrl
   - descriptionText
   - provider
   - publicType
   - iconImage
   - permissions
   - iconThumbnailImage
   - channelConfigurations
   - lcsAllApiUsable
   - allowedPermissions
   - channelDomains
   - updatedTimestamp
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'channelId', None, None, ), # 1
    None, # 2
    (3, TType.STRING, 'name', None, None, ), # 3
    (4, TType.STRING, 'entryPageUrl', None, None, ), # 4
    (5, TType.STRING, 'descriptionText', None, None, ), # 5
    (6, TType.STRUCT, 'provider', (ChannelProvider, ChannelProvider.thrift_spec), None, ), # 6
    (7, TType.I32, 'publicType', None, None, ), # 7
    (8, TType.STRING, 'iconImage', None, None, ), # 8
    (9, TType.LIST, 'permissions', (TType.STRING,None), None, ), # 9
    None, # 10
    (11, TType.STRING, 'iconThumbnailImage', None, None, ), # 11
    (12, TType.LIST, 'channelConfigurations', (TType.I32,None), None, ), # 12
    (13, TType.BOOL, 'lcsAllApiUsable', None, None, ), # 13
    (14, TType.SET, 'allowedPermissions', (TType.I32,None), None, ), # 14
    (15, TType.LIST, 'channelDomains', (TType.STRUCT,(ChannelDomain, ChannelDomain.thrift_spec)), None, ), # 15
    (16, TType.I64, 'updatedTimestamp', None, None, ), # 16
  )

  def __init__(self, channelId=None, name=None, entryPageUrl=None, descriptionText=None, provider=None, publicType=None, iconImage=None, permissions=None, iconThumbnailImage=None, channelConfigurations=None, lcsAllApiUsable=None, allowedPermissions=None, channelDomains=None, updatedTimestamp=None,):
    self.channelId = channelId
    self.name = name
    self.entryPageUrl = entryPageUrl
    self.descriptionText = descriptionText
    self.provider = provider
    self.publicType = publicType
    self.iconImage = iconImage
    self.permissions = permissions
    self.iconThumbnailImage = iconThumbnailImage
    self.channelConfigurations = channelConfigurations
    self.lcsAllApiUsable = lcsAllApiUsable
    self.allowedPermissions = allowedPermissions
    self.channelDomains = channelDomains
    self.updatedTimestamp = updatedTimestamp

  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.channelId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.name = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.entryPageUrl = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.descriptionText = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRUCT:
          self.provider = ChannelProvider()
          self.provider.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.publicType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.iconImage = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.LIST:
          self.permissions = []
          (_etype66, _size63) = iprot.readListBegin()
          for _i67 in xrange(_size63):
            _elem68 = iprot.readString()
            self.permissions.append(_elem68)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.iconThumbnailImage = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.LIST:
          self.channelConfigurations = []
          (_etype72, _size69) = iprot.readListBegin()
          for _i73 in xrange(_size69):
            _elem74 = iprot.readI32()
            self.channelConfigurations.append(_elem74)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.BOOL:
          self.lcsAllApiUsable = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.SET:
          self.allowedPermissions = set()
          (_etype78, _size75) = iprot.readSetBegin()
          for _i79 in xrange(_size75):
            _elem80 = iprot.readI32()
            self.allowedPermissions.add(_elem80)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.LIST:
          self.channelDomains = []
          (_etype84, _size81) = iprot.readListBegin()
          for _i85 in xrange(_size81):
            _elem86 = ChannelDomain()
            _elem86.read(iprot)
            self.channelDomains.append(_elem86)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.I64:
          self.updatedTimestamp = iprot.readI64()
        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('ChannelInfo')
    if self.channelId is not None:
      oprot.writeFieldBegin('channelId', TType.STRING, 1)
      oprot.writeString(self.channelId)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 3)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.entryPageUrl is not None:
      oprot.writeFieldBegin('entryPageUrl', TType.STRING, 4)
      oprot.writeString(self.entryPageUrl)
      oprot.writeFieldEnd()
    if self.descriptionText is not None:
      oprot.writeFieldBegin('descriptionText', TType.STRING, 5)
      oprot.writeString(self.descriptionText)
      oprot.writeFieldEnd()
    if self.provider is not None:
      oprot.writeFieldBegin('provider', TType.STRUCT, 6)
      self.provider.write(oprot)
      oprot.writeFieldEnd()
    if self.publicType is not None:
      oprot.writeFieldBegin('publicType', TType.I32, 7)
      oprot.writeI32(self.publicType)
      oprot.writeFieldEnd()
    if self.iconImage is not None:
      oprot.writeFieldBegin('iconImage', TType.STRING, 8)
      oprot.writeString(self.iconImage)
      oprot.writeFieldEnd()
    if self.permissions is not None:
      oprot.writeFieldBegin('permissions', TType.LIST, 9)
      oprot.writeListBegin(TType.STRING, len(self.permissions))
      for iter87 in self.permissions:
        oprot.writeString(iter87)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.iconThumbnailImage is not None:
      oprot.writeFieldBegin('iconThumbnailImage', TType.STRING, 11)
      oprot.writeString(self.iconThumbnailImage)
      oprot.writeFieldEnd()
    if self.channelConfigurations is not None:
      oprot.writeFieldBegin('channelConfigurations', TType.LIST, 12)
      oprot.writeListBegin(TType.I32, len(self.channelConfigurations))
      for iter88 in self.channelConfigurations:
        oprot.writeI32(iter88)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.lcsAllApiUsable is not None:
      oprot.writeFieldBegin('lcsAllApiUsable', TType.BOOL, 13)
      oprot.writeBool(self.lcsAllApiUsable)
      oprot.writeFieldEnd()
    if self.allowedPermissions is not None:
      oprot.writeFieldBegin('allowedPermissions', TType.SET, 14)
      oprot.writeSetBegin(TType.I32, len(self.allowedPermissions))
      for iter89 in self.allowedPermissions:
        oprot.writeI32(iter89)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.channelDomains is not None:
      oprot.writeFieldBegin('channelDomains', TType.LIST, 15)
      oprot.writeListBegin(TType.STRUCT, len(self.channelDomains))
      for iter90 in self.channelDomains:
        iter90.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.updatedTimestamp is not None:
      oprot.writeFieldBegin('updatedTimestamp', TType.I64, 16)
      oprot.writeI64(self.updatedTimestamp)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.channelId)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.entryPageUrl)
    value = (value * 31) ^ hash(self.descriptionText)
    value = (value * 31) ^ hash(self.provider)
    value = (value * 31) ^ hash(self.publicType)
    value = (value * 31) ^ hash(self.iconImage)
    value = (value * 31) ^ hash(self.permissions)
    value = (value * 31) ^ hash(self.iconThumbnailImage)
    value = (value * 31) ^ hash(self.channelConfigurations)
    value = (value * 31) ^ hash(self.lcsAllApiUsable)
    value = (value * 31) ^ hash(self.allowedPermissions)
    value = (value * 31) ^ hash(self.channelDomains)
    value = (value * 31) ^ hash(self.updatedTimestamp)
    return value

  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 ApprovedChannelInfo:
  """
  Attributes:
   - channelInfo
   - approvedAt
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'channelInfo', (ChannelInfo, ChannelInfo.thrift_spec), None, ), # 1
    (2, TType.I64, 'approvedAt', None, None, ), # 2
  )

  def __init__(self, channelInfo=None, approvedAt=None,):
    self.channelInfo = channelInfo
    self.approvedAt = approvedAt

  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.channelInfo = ChannelInfo()
          self.channelInfo.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.approvedAt = iprot.readI64()
        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('ApprovedChannelInfo')
    if self.channelInfo is not None:
      oprot.writeFieldBegin('channelInfo', TType.STRUCT, 1)
      self.channelInfo.write(oprot)
      oprot.writeFieldEnd()
    if self.approvedAt is not None:
      oprot.writeFieldBegin('approvedAt', TType.I64, 2)
      oprot.writeI64(self.approvedAt)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.channelInfo)
    value = (value * 31) ^ hash(self.approvedAt)
    return value

  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 ApprovedChannelInfos:
  """
  Attributes:
   - approvedChannelInfos
   - revision
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'approvedChannelInfos', (TType.STRUCT,(ApprovedChannelInfo, ApprovedChannelInfo.thrift_spec)), None, ), # 1
    (2, TType.I64, 'revision', None, None, ), # 2
  )

  def __init__(self, approvedChannelInfos=None, revision=None,):
    self.approvedChannelInfos = approvedChannelInfos
    self.revision = revision

  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.approvedChannelInfos = []
          (_etype94, _size91) = iprot.readListBegin()
          for _i95 in xrange(_size91):
            _elem96 = ApprovedChannelInfo()
            _elem96.read(iprot)
            self.approvedChannelInfos.append(_elem96)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        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('ApprovedChannelInfos')
    if self.approvedChannelInfos is not None:
      oprot.writeFieldBegin('approvedChannelInfos', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.approvedChannelInfos))
      for iter97 in self.approvedChannelInfos:
        iter97.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 2)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.approvedChannelInfos)
    value = (value * 31) ^ hash(self.revision)
    return value

  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 AuthQrcode:
  """
  Attributes:
   - qrcode
   - verifier
   - callbackUrl
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'qrcode', None, None, ), # 1
    (2, TType.STRING, 'verifier', None, None, ), # 2
    (3, TType.STRING, 'callbackUrl', None, None, ), # 3
  )

  def __init__(self, qrcode=None, verifier=None, callbackUrl=None,):
    self.qrcode = qrcode
    self.verifier = verifier
    self.callbackUrl = callbackUrl

  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.qrcode = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.verifier = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.callbackUrl = 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('AuthQrcode')
    if self.qrcode is not None:
      oprot.writeFieldBegin('qrcode', TType.STRING, 1)
      oprot.writeString(self.qrcode)
      oprot.writeFieldEnd()
    if self.verifier is not None:
      oprot.writeFieldBegin('verifier', TType.STRING, 2)
      oprot.writeString(self.verifier)
      oprot.writeFieldEnd()
    if self.callbackUrl is not None:
      oprot.writeFieldBegin('callbackUrl', TType.STRING, 3)
      oprot.writeString(self.callbackUrl)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.qrcode)
    value = (value * 31) ^ hash(self.verifier)
    value = (value * 31) ^ hash(self.callbackUrl)
    return value

  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 AnalyticsInfo:
  """
  Attributes:
   - gaSamplingRate
   - tmid
  """

  thrift_spec = (
    None, # 0
    (1, TType.DOUBLE, 'gaSamplingRate', None, None, ), # 1
    (2, TType.STRING, 'tmid', None, None, ), # 2
  )

  def __init__(self, gaSamplingRate=None, tmid=None,):
    self.gaSamplingRate = gaSamplingRate
    self.tmid = tmid

  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.DOUBLE:
          self.gaSamplingRate = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.tmid = 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('AnalyticsInfo')
    if self.gaSamplingRate is not None:
      oprot.writeFieldBegin('gaSamplingRate', TType.DOUBLE, 1)
      oprot.writeDouble(self.gaSamplingRate)
      oprot.writeFieldEnd()
    if self.tmid is not None:
      oprot.writeFieldBegin('tmid', TType.STRING, 2)
      oprot.writeString(self.tmid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.gaSamplingRate)
    value = (value * 31) ^ hash(self.tmid)
    return value

  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 ContactTransition:
  """
  Attributes:
   - ownerMid
   - targetMid
   - previousStatus
   - resultStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'ownerMid', None, None, ), # 1
    (2, TType.STRING, 'targetMid', None, None, ), # 2
    (3, TType.I32, 'previousStatus', None, None, ), # 3
    (4, TType.I32, 'resultStatus', None, None, ), # 4
  )

  def __init__(self, ownerMid=None, targetMid=None, previousStatus=None, resultStatus=None,):
    self.ownerMid = ownerMid
    self.targetMid = targetMid
    self.previousStatus = previousStatus
    self.resultStatus = resultStatus

  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.ownerMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.targetMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.previousStatus = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.resultStatus = 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('ContactTransition')
    if self.ownerMid is not None:
      oprot.writeFieldBegin('ownerMid', TType.STRING, 1)
      oprot.writeString(self.ownerMid)
      oprot.writeFieldEnd()
    if self.targetMid is not None:
      oprot.writeFieldBegin('targetMid', TType.STRING, 2)
      oprot.writeString(self.targetMid)
      oprot.writeFieldEnd()
    if self.previousStatus is not None:
      oprot.writeFieldBegin('previousStatus', TType.I32, 3)
      oprot.writeI32(self.previousStatus)
      oprot.writeFieldEnd()
    if self.resultStatus is not None:
      oprot.writeFieldBegin('resultStatus', TType.I32, 4)
      oprot.writeI32(self.resultStatus)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.ownerMid)
    value = (value * 31) ^ hash(self.targetMid)
    value = (value * 31) ^ hash(self.previousStatus)
    value = (value * 31) ^ hash(self.resultStatus)
    return value

  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 UserTicketResponse:
  """
  Attributes:
   - mid
   - userTicket
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.STRING, 'userTicket', None, None, ), # 2
  )

  def __init__(self, mid=None, userTicket=None,):
    self.mid = mid
    self.userTicket = userTicket

  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.STRING:
          self.userTicket = 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('UserTicketResponse')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.userTicket is not None:
      oprot.writeFieldBegin('userTicket', TType.STRING, 2)
      oprot.writeString(self.userTicket)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.userTicket)
    return value

  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 BuddyBanner:
  """
  Attributes:
   - buddyBannerLinkType
   - buddyBannerLink
   - buddyBannerImageUrl
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'buddyBannerLinkType', None, None, ), # 1
    (2, TType.STRING, 'buddyBannerLink', None, None, ), # 2
    (3, TType.STRING, 'buddyBannerImageUrl', None, None, ), # 3
  )

  def __init__(self, buddyBannerLinkType=None, buddyBannerLink=None, buddyBannerImageUrl=None,):
    self.buddyBannerLinkType = buddyBannerLinkType
    self.buddyBannerLink = buddyBannerLink
    self.buddyBannerImageUrl = buddyBannerImageUrl

  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.buddyBannerLinkType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.buddyBannerLink = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.buddyBannerImageUrl = 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('BuddyBanner')
    if self.buddyBannerLinkType is not None:
      oprot.writeFieldBegin('buddyBannerLinkType', TType.I32, 1)
      oprot.writeI32(self.buddyBannerLinkType)
      oprot.writeFieldEnd()
    if self.buddyBannerLink is not None:
      oprot.writeFieldBegin('buddyBannerLink', TType.STRING, 2)
      oprot.writeString(self.buddyBannerLink)
      oprot.writeFieldEnd()
    if self.buddyBannerImageUrl is not None:
      oprot.writeFieldBegin('buddyBannerImageUrl', TType.STRING, 3)
      oprot.writeString(self.buddyBannerImageUrl)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.buddyBannerLinkType)
    value = (value * 31) ^ hash(self.buddyBannerLink)
    value = (value * 31) ^ hash(self.buddyBannerImageUrl)
    return value

  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 BuddyDetail:
  """
  Attributes:
   - mid
   - memberCount
   - onAir
   - businessAccount
   - addable
   - acceptableContentTypes
   - capableMyhome
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.I64, 'memberCount', None, None, ), # 2
    (3, TType.BOOL, 'onAir', None, None, ), # 3
    (4, TType.BOOL, 'businessAccount', None, None, ), # 4
    (5, TType.BOOL, 'addable', None, None, ), # 5
    (6, TType.SET, 'acceptableContentTypes', (TType.I32,None), None, ), # 6
    (7, TType.BOOL, 'capableMyhome', None, None, ), # 7
  )

  def __init__(self, mid=None, memberCount=None, onAir=None, businessAccount=None, addable=None, acceptableContentTypes=None, capableMyhome=None,):
    self.mid = mid
    self.memberCount = memberCount
    self.onAir = onAir
    self.businessAccount = businessAccount
    self.addable = addable
    self.acceptableContentTypes = acceptableContentTypes
    self.capableMyhome = capableMyhome

  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.memberCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.onAir = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.businessAccount = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.addable = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.SET:
          self.acceptableContentTypes = set()
          (_etype101, _size98) = iprot.readSetBegin()
          for _i102 in xrange(_size98):
            _elem103 = iprot.readI32()
            self.acceptableContentTypes.add(_elem103)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.BOOL:
          self.capableMyhome = 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('BuddyDetail')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.memberCount is not None:
      oprot.writeFieldBegin('memberCount', TType.I64, 2)
      oprot.writeI64(self.memberCount)
      oprot.writeFieldEnd()
    if self.onAir is not None:
      oprot.writeFieldBegin('onAir', TType.BOOL, 3)
      oprot.writeBool(self.onAir)
      oprot.writeFieldEnd()
    if self.businessAccount is not None:
      oprot.writeFieldBegin('businessAccount', TType.BOOL, 4)
      oprot.writeBool(self.businessAccount)
      oprot.writeFieldEnd()
    if self.addable is not None:
      oprot.writeFieldBegin('addable', TType.BOOL, 5)
      oprot.writeBool(self.addable)
      oprot.writeFieldEnd()
    if self.acceptableContentTypes is not None:
      oprot.writeFieldBegin('acceptableContentTypes', TType.SET, 6)
      oprot.writeSetBegin(TType.I32, len(self.acceptableContentTypes))
      for iter104 in self.acceptableContentTypes:
        oprot.writeI32(iter104)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.capableMyhome is not None:
      oprot.writeFieldBegin('capableMyhome', TType.BOOL, 7)
      oprot.writeBool(self.capableMyhome)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.memberCount)
    value = (value * 31) ^ hash(self.onAir)
    value = (value * 31) ^ hash(self.businessAccount)
    value = (value * 31) ^ hash(self.addable)
    value = (value * 31) ^ hash(self.acceptableContentTypes)
    value = (value * 31) ^ hash(self.capableMyhome)
    return value

  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:
  """
  Attributes:
   - mid
   - createdTime
   - type
   - status
   - relation
   - displayName
   - phoneticName
   - pictureStatus
   - thumbnailUrl
   - statusMessage
   - displayNameOverridden
   - favoriteTime
   - capableVoiceCall
   - capableVideoCall
   - capableMyhome
   - capableBuddy
   - attributes
   - settings
   - picturePath
   - recommendParams
   - friendRequestStatus
   - musicProfile
   - videoProfile
  """

  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, 'favoriteTime', 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
    (38, TType.STRING, 'recommendParams', None, None, ), # 38
    (39, TType.I32, 'friendRequestStatus', None, None, ), # 39
    (40, TType.STRING, 'musicProfile', None, None, ), # 40
    None, # 41
    (42, TType.STRING, 'videoProfile', None, None, ), # 42
  )

  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, favoriteTime=None, capableVoiceCall=None, capableVideoCall=None, capableMyhome=None, capableBuddy=None, attributes=None, settings=None, picturePath=None, recommendParams=None, friendRequestStatus=None, musicProfile=None, videoProfile=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.favoriteTime = favoriteTime
    self.capableVoiceCall = capableVoiceCall
    self.capableVideoCall = capableVideoCall
    self.capableMyhome = capableMyhome
    self.capableBuddy = capableBuddy
    self.attributes = attributes
    self.settings = settings
    self.picturePath = picturePath
    self.recommendParams = recommendParams
    self.friendRequestStatus = friendRequestStatus
    self.musicProfile = musicProfile
    self.videoProfile = videoProfile

  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.favoriteTime = 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)
      elif fid == 38:
        if ftype == TType.STRING:
          self.recommendParams = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 39:
        if ftype == TType.I32:
          self.friendRequestStatus = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 40:
        if ftype == TType.STRING:
          self.musicProfile = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 42:
        if ftype == TType.STRING:
          self.videoProfile = 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.favoriteTime is not None:
      oprot.writeFieldBegin('favoriteTime', TType.I64, 28)
      oprot.writeI64(self.favoriteTime)
      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()
    if self.recommendParams is not None:
      oprot.writeFieldBegin('recommendParams', TType.STRING, 38)
      oprot.writeString(self.recommendParams)
      oprot.writeFieldEnd()
    if self.friendRequestStatus is not None:
      oprot.writeFieldBegin('friendRequestStatus', TType.I32, 39)
      oprot.writeI32(self.friendRequestStatus)
      oprot.writeFieldEnd()
    if self.musicProfile is not None:
      oprot.writeFieldBegin('musicProfile', TType.STRING, 40)
      oprot.writeString(self.musicProfile)
      oprot.writeFieldEnd()
    if self.videoProfile is not None:
      oprot.writeFieldBegin('videoProfile', TType.STRING, 42)
      oprot.writeString(self.videoProfile)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.status)
    value = (value * 31) ^ hash(self.relation)
    value = (value * 31) ^ hash(self.displayName)
    value = (value * 31) ^ hash(self.phoneticName)
    value = (value * 31) ^ hash(self.pictureStatus)
    value = (value * 31) ^ hash(self.thumbnailUrl)
    value = (value * 31) ^ hash(self.statusMessage)
    value = (value * 31) ^ hash(self.displayNameOverridden)
    value = (value * 31) ^ hash(self.favoriteTime)
    value = (value * 31) ^ hash(self.capableVoiceCall)
    value = (value * 31) ^ hash(self.capableVideoCall)
    value = (value * 31) ^ hash(self.capableMyhome)
    value = (value * 31) ^ hash(self.capableBuddy)
    value = (value * 31) ^ hash(self.attributes)
    value = (value * 31) ^ hash(self.settings)
    value = (value * 31) ^ hash(self.picturePath)
    value = (value * 31) ^ hash(self.recommendParams)
    value = (value * 31) ^ hash(self.friendRequestStatus)
    value = (value * 31) ^ hash(self.musicProfile)
    value = (value * 31) ^ hash(self.videoProfile)
    return value

  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 BuddyList:
  """
  Attributes:
   - classification
   - displayName
   - totalBuddyCount
   - popularContacts
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'classification', None, None, ), # 1
    (2, TType.STRING, 'displayName', None, None, ), # 2
    (3, TType.I32, 'totalBuddyCount', None, None, ), # 3
    (4, TType.LIST, 'popularContacts', (TType.STRUCT,(Contact, Contact.thrift_spec)), None, ), # 4
  )

  def __init__(self, classification=None, displayName=None, totalBuddyCount=None, popularContacts=None,):
    self.classification = classification
    self.displayName = displayName
    self.totalBuddyCount = totalBuddyCount
    self.popularContacts = popularContacts

  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.classification = iprot.readString()
        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.I32:
          self.totalBuddyCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.popularContacts = []
          (_etype108, _size105) = iprot.readListBegin()
          for _i109 in xrange(_size105):
            _elem110 = Contact()
            _elem110.read(iprot)
            self.popularContacts.append(_elem110)
          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('BuddyList')
    if self.classification is not None:
      oprot.writeFieldBegin('classification', TType.STRING, 1)
      oprot.writeString(self.classification)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 2)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.totalBuddyCount is not None:
      oprot.writeFieldBegin('totalBuddyCount', TType.I32, 3)
      oprot.writeI32(self.totalBuddyCount)
      oprot.writeFieldEnd()
    if self.popularContacts is not None:
      oprot.writeFieldBegin('popularContacts', TType.LIST, 4)
      oprot.writeListBegin(TType.STRUCT, len(self.popularContacts))
      for iter111 in self.popularContacts:
        iter111.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.classification)
    value = (value * 31) ^ hash(self.displayName)
    value = (value * 31) ^ hash(self.totalBuddyCount)
    value = (value * 31) ^ hash(self.popularContacts)
    return value

  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 RegisterWithPhoneNumberResult:
  """
  Attributes:
   - authToken
   - recommendEmailRegistration
   - certificate
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'authToken', None, None, ), # 1
    (2, TType.BOOL, 'recommendEmailRegistration', None, None, ), # 2
    (3, TType.STRING, 'certificate', None, None, ), # 3
  )

  def __init__(self, authToken=None, recommendEmailRegistration=None, certificate=None,):
    self.authToken = authToken
    self.recommendEmailRegistration = recommendEmailRegistration
    self.certificate = certificate

  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.BOOL:
          self.recommendEmailRegistration = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.certificate = 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('RegisterWithPhoneNumberResult')
    if self.authToken is not None:
      oprot.writeFieldBegin('authToken', TType.STRING, 1)
      oprot.writeString(self.authToken)
      oprot.writeFieldEnd()
    if self.recommendEmailRegistration is not None:
      oprot.writeFieldBegin('recommendEmailRegistration', TType.BOOL, 2)
      oprot.writeBool(self.recommendEmailRegistration)
      oprot.writeFieldEnd()
    if self.certificate is not None:
      oprot.writeFieldBegin('certificate', TType.STRING, 3)
      oprot.writeString(self.certificate)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.authToken)
    value = (value * 31) ^ hash(self.recommendEmailRegistration)
    value = (value * 31) ^ hash(self.certificate)
    return value

  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 BuddyMessageRequest:
  """
  Attributes:
   - contentType
   - text
   - location
   - content
   - contentMetadata
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'contentType', None, None, ), # 1
    (2, TType.STRING, 'text', None, None, ), # 2
    (3, TType.STRUCT, 'location', (Location, Location.thrift_spec), None, ), # 3
    (4, TType.STRING, 'content', None, None, ), # 4
    (5, TType.MAP, 'contentMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 5
  )

  def __init__(self, contentType=None, text=None, location=None, content=None, contentMetadata=None,):
    self.contentType = contentType
    self.text = text
    self.location = location
    self.content = content
    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.I32:
          self.contentType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.text = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.location = Location()
          self.location.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.content = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.MAP:
          self.contentMetadata = {}
          (_ktype113, _vtype114, _size112 ) = iprot.readMapBegin()
          for _i116 in xrange(_size112):
            _key117 = iprot.readString()
            _val118 = iprot.readString()
            self.contentMetadata[_key117] = _val118
          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('BuddyMessageRequest')
    if self.contentType is not None:
      oprot.writeFieldBegin('contentType', TType.I32, 1)
      oprot.writeI32(self.contentType)
      oprot.writeFieldEnd()
    if self.text is not None:
      oprot.writeFieldBegin('text', TType.STRING, 2)
      oprot.writeString(self.text)
      oprot.writeFieldEnd()
    if self.location is not None:
      oprot.writeFieldBegin('location', TType.STRUCT, 3)
      self.location.write(oprot)
      oprot.writeFieldEnd()
    if self.content is not None:
      oprot.writeFieldBegin('content', TType.STRING, 4)
      oprot.writeString(self.content)
      oprot.writeFieldEnd()
    if self.contentMetadata is not None:
      oprot.writeFieldBegin('contentMetadata', TType.MAP, 5)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.contentMetadata))
      for kiter119,viter120 in self.contentMetadata.items():
        oprot.writeString(kiter119)
        oprot.writeString(viter120)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.contentType)
    value = (value * 31) ^ hash(self.text)
    value = (value * 31) ^ hash(self.location)
    value = (value * 31) ^ hash(self.content)
    value = (value * 31) ^ hash(self.contentMetadata)
    return value

  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 BuddyOnAirUrls:
  """
  Attributes:
   - hls
   - smoothStreaming
  """

  thrift_spec = (
    None, # 0
    (1, TType.MAP, 'hls', (TType.STRING,None,TType.STRING,None), None, ), # 1
    (2, TType.MAP, 'smoothStreaming', (TType.STRING,None,TType.STRING,None), None, ), # 2
  )

  def __init__(self, hls=None, smoothStreaming=None,):
    self.hls = hls
    self.smoothStreaming = smoothStreaming

  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.MAP:
          self.hls = {}
          (_ktype122, _vtype123, _size121 ) = iprot.readMapBegin()
          for _i125 in xrange(_size121):
            _key126 = iprot.readString()
            _val127 = iprot.readString()
            self.hls[_key126] = _val127
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.smoothStreaming = {}
          (_ktype129, _vtype130, _size128 ) = iprot.readMapBegin()
          for _i132 in xrange(_size128):
            _key133 = iprot.readString()
            _val134 = iprot.readString()
            self.smoothStreaming[_key133] = _val134
          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('BuddyOnAirUrls')
    if self.hls is not None:
      oprot.writeFieldBegin('hls', TType.MAP, 1)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.hls))
      for kiter135,viter136 in self.hls.items():
        oprot.writeString(kiter135)
        oprot.writeString(viter136)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.smoothStreaming is not None:
      oprot.writeFieldBegin('smoothStreaming', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.smoothStreaming))
      for kiter137,viter138 in self.smoothStreaming.items():
        oprot.writeString(kiter137)
        oprot.writeString(viter138)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.hls)
    value = (value * 31) ^ hash(self.smoothStreaming)
    return value

  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 BuddyOnAir:
  """
  Attributes:
   - mid
   - freshnessLifetime
   - onAirId
   - onAir
   - text
   - viewerCount
   - targetCount
   - onAirType
   - onAirUrls
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    None, # 2
    (3, TType.I64, 'freshnessLifetime', None, None, ), # 3
    (4, TType.STRING, 'onAirId', None, None, ), # 4
    (5, TType.BOOL, 'onAir', None, None, ), # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.STRING, 'text', None, None, ), # 11
    (12, TType.I64, 'viewerCount', None, None, ), # 12
    (13, TType.I64, 'targetCount', None, 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.I32, 'onAirType', None, None, ), # 31
    (32, TType.STRUCT, 'onAirUrls', (BuddyOnAirUrls, BuddyOnAirUrls.thrift_spec), None, ), # 32
  )

  def __init__(self, mid=None, freshnessLifetime=None, onAirId=None, onAir=None, text=None, viewerCount=None, targetCount=None, onAirType=None, onAirUrls=None,):
    self.mid = mid
    self.freshnessLifetime = freshnessLifetime
    self.onAirId = onAirId
    self.onAir = onAir
    self.text = text
    self.viewerCount = viewerCount
    self.targetCount = targetCount
    self.onAirType = onAirType
    self.onAirUrls = onAirUrls

  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.I64:
          self.freshnessLifetime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.onAirId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.onAir = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.text = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I64:
          self.viewerCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.I64:
          self.targetCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 31:
        if ftype == TType.I32:
          self.onAirType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 32:
        if ftype == TType.STRUCT:
          self.onAirUrls = BuddyOnAirUrls()
          self.onAirUrls.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('BuddyOnAir')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.freshnessLifetime is not None:
      oprot.writeFieldBegin('freshnessLifetime', TType.I64, 3)
      oprot.writeI64(self.freshnessLifetime)
      oprot.writeFieldEnd()
    if self.onAirId is not None:
      oprot.writeFieldBegin('onAirId', TType.STRING, 4)
      oprot.writeString(self.onAirId)
      oprot.writeFieldEnd()
    if self.onAir is not None:
      oprot.writeFieldBegin('onAir', TType.BOOL, 5)
      oprot.writeBool(self.onAir)
      oprot.writeFieldEnd()
    if self.text is not None:
      oprot.writeFieldBegin('text', TType.STRING, 11)
      oprot.writeString(self.text)
      oprot.writeFieldEnd()
    if self.viewerCount is not None:
      oprot.writeFieldBegin('viewerCount', TType.I64, 12)
      oprot.writeI64(self.viewerCount)
      oprot.writeFieldEnd()
    if self.targetCount is not None:
      oprot.writeFieldBegin('targetCount', TType.I64, 13)
      oprot.writeI64(self.targetCount)
      oprot.writeFieldEnd()
    if self.onAirType is not None:
      oprot.writeFieldBegin('onAirType', TType.I32, 31)
      oprot.writeI32(self.onAirType)
      oprot.writeFieldEnd()
    if self.onAirUrls is not None:
      oprot.writeFieldBegin('onAirUrls', TType.STRUCT, 32)
      self.onAirUrls.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.freshnessLifetime)
    value = (value * 31) ^ hash(self.onAirId)
    value = (value * 31) ^ hash(self.onAir)
    value = (value * 31) ^ hash(self.text)
    value = (value * 31) ^ hash(self.viewerCount)
    value = (value * 31) ^ hash(self.targetCount)
    value = (value * 31) ^ hash(self.onAirType)
    value = (value * 31) ^ hash(self.onAirUrls)
    return value

  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 BuddyProfile:
  """
  Attributes:
   - buddyId
   - mid
   - searchId
   - displayName
   - statusMessage
   - contactCount
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'buddyId', None, None, ), # 1
    (2, TType.STRING, 'mid', None, None, ), # 2
    (3, TType.STRING, 'searchId', None, None, ), # 3
    (4, TType.STRING, 'displayName', None, None, ), # 4
    (5, TType.STRING, 'statusMessage', None, None, ), # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.I64, 'contactCount', None, None, ), # 11
  )

  def __init__(self, buddyId=None, mid=None, searchId=None, displayName=None, statusMessage=None, contactCount=None,):
    self.buddyId = buddyId
    self.mid = mid
    self.searchId = searchId
    self.displayName = displayName
    self.statusMessage = statusMessage
    self.contactCount = contactCount

  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.buddyId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.mid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.searchId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.displayName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.statusMessage = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.contactCount = iprot.readI64()
        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('BuddyProfile')
    if self.buddyId is not None:
      oprot.writeFieldBegin('buddyId', TType.STRING, 1)
      oprot.writeString(self.buddyId)
      oprot.writeFieldEnd()
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 2)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.searchId is not None:
      oprot.writeFieldBegin('searchId', TType.STRING, 3)
      oprot.writeString(self.searchId)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 4)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.statusMessage is not None:
      oprot.writeFieldBegin('statusMessage', TType.STRING, 5)
      oprot.writeString(self.statusMessage)
      oprot.writeFieldEnd()
    if self.contactCount is not None:
      oprot.writeFieldBegin('contactCount', TType.I64, 11)
      oprot.writeI64(self.contactCount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.buddyId)
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.searchId)
    value = (value * 31) ^ hash(self.displayName)
    value = (value * 31) ^ hash(self.statusMessage)
    value = (value * 31) ^ hash(self.contactCount)
    return value

  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 CommitMessageResult:
  """
  Attributes:
   - message
   - code
   - reason
   - successCount
   - failCount
   - unregisterCount
   - blockCount
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'message', None, None, ), # 1
    (2, TType.I32, 'code', None, None, ), # 2
    (3, TType.STRING, 'reason', None, None, ), # 3
    (4, TType.I64, 'successCount', None, None, ), # 4
    (5, TType.I64, 'failCount', None, None, ), # 5
    (6, TType.I64, 'unregisterCount', None, None, ), # 6
    (7, TType.I64, 'blockCount', None, None, ), # 7
  )

  def __init__(self, message=None, code=None, reason=None, successCount=None, failCount=None, unregisterCount=None, blockCount=None,):
    self.message = message
    self.code = code
    self.reason = reason
    self.successCount = successCount
    self.failCount = failCount
    self.unregisterCount = unregisterCount
    self.blockCount = blockCount

  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.message = Message()
          self.message.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.code = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.reason = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.successCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.failCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.unregisterCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I64:
          self.blockCount = iprot.readI64()
        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('CommitMessageResult')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRUCT, 1)
      self.message.write(oprot)
      oprot.writeFieldEnd()
    if self.code is not None:
      oprot.writeFieldBegin('code', TType.I32, 2)
      oprot.writeI32(self.code)
      oprot.writeFieldEnd()
    if self.reason is not None:
      oprot.writeFieldBegin('reason', TType.STRING, 3)
      oprot.writeString(self.reason)
      oprot.writeFieldEnd()
    if self.successCount is not None:
      oprot.writeFieldBegin('successCount', TType.I64, 4)
      oprot.writeI64(self.successCount)
      oprot.writeFieldEnd()
    if self.failCount is not None:
      oprot.writeFieldBegin('failCount', TType.I64, 5)
      oprot.writeI64(self.failCount)
      oprot.writeFieldEnd()
    if self.unregisterCount is not None:
      oprot.writeFieldBegin('unregisterCount', TType.I64, 6)
      oprot.writeI64(self.unregisterCount)
      oprot.writeFieldEnd()
    if self.blockCount is not None:
      oprot.writeFieldBegin('blockCount', TType.I64, 7)
      oprot.writeI64(self.blockCount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.message)
    value = (value * 31) ^ hash(self.code)
    value = (value * 31) ^ hash(self.reason)
    value = (value * 31) ^ hash(self.successCount)
    value = (value * 31) ^ hash(self.failCount)
    value = (value * 31) ^ hash(self.unregisterCount)
    value = (value * 31) ^ hash(self.blockCount)
    return value

  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 BuddySearchResult:
  """
  Attributes:
   - mid
   - displayName
   - pictureStatus
   - picturePath
   - statusMessage
   - businessAccount
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.STRING, 'displayName', None, None, ), # 2
    (3, TType.STRING, 'pictureStatus', None, None, ), # 3
    (4, TType.STRING, 'picturePath', None, None, ), # 4
    (5, TType.STRING, 'statusMessage', None, None, ), # 5
    (6, TType.BOOL, 'businessAccount', None, None, ), # 6
  )

  def __init__(self, mid=None, displayName=None, pictureStatus=None, picturePath=None, statusMessage=None, businessAccount=None,):
    self.mid = mid
    self.displayName = displayName
    self.pictureStatus = pictureStatus
    self.picturePath = picturePath
    self.statusMessage = statusMessage
    self.businessAccount = businessAccount

  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.STRING:
          self.displayName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.pictureStatus = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.picturePath = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.statusMessage = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.BOOL:
          self.businessAccount = 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('BuddySearchResult')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 2)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.pictureStatus is not None:
      oprot.writeFieldBegin('pictureStatus', TType.STRING, 3)
      oprot.writeString(self.pictureStatus)
      oprot.writeFieldEnd()
    if self.picturePath is not None:
      oprot.writeFieldBegin('picturePath', TType.STRING, 4)
      oprot.writeString(self.picturePath)
      oprot.writeFieldEnd()
    if self.statusMessage is not None:
      oprot.writeFieldBegin('statusMessage', TType.STRING, 5)
      oprot.writeString(self.statusMessage)
      oprot.writeFieldEnd()
    if self.businessAccount is not None:
      oprot.writeFieldBegin('businessAccount', TType.BOOL, 6)
      oprot.writeBool(self.businessAccount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.displayName)
    value = (value * 31) ^ hash(self.pictureStatus)
    value = (value * 31) ^ hash(self.picturePath)
    value = (value * 31) ^ hash(self.statusMessage)
    value = (value * 31) ^ hash(self.businessAccount)
    return value

  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 SyncParamMid:
  """
  Attributes:
   - mid
   - diff
   - revision
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.I32, 'diff', None, None, ), # 2
    (3, TType.I64, 'revision', None, None, ), # 3
  )

  def __init__(self, mid=None, diff=None, revision=None,):
    self.mid = mid
    self.diff = diff
    self.revision = revision

  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.I32:
          self.diff = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        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('SyncParamMid')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.diff is not None:
      oprot.writeFieldBegin('diff', TType.I32, 2)
      oprot.writeI32(self.diff)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 3)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.diff)
    value = (value * 31) ^ hash(self.revision)
    return value

  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 SIMInfo:
  """
  Attributes:
   - phoneNumber
   - countryCode
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'phoneNumber', None, None, ), # 1
    (2, TType.STRING, 'countryCode', None, None, ), # 2
  )

  def __init__(self, phoneNumber=None, countryCode=None,):
    self.phoneNumber = phoneNumber
    self.countryCode = countryCode

  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.phoneNumber = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.countryCode = 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('SIMInfo')
    if self.phoneNumber is not None:
      oprot.writeFieldBegin('phoneNumber', TType.STRING, 1)
      oprot.writeString(self.phoneNumber)
      oprot.writeFieldEnd()
    if self.countryCode is not None:
      oprot.writeFieldBegin('countryCode', TType.STRING, 2)
      oprot.writeString(self.countryCode)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.phoneNumber)
    value = (value * 31) ^ hash(self.countryCode)
    return value

  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 SyncParamContact:
  """
  Attributes:
   - syncParamMid
   - contactStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'syncParamMid', (SyncParamMid, SyncParamMid.thrift_spec), None, ), # 1
    (2, TType.I32, 'contactStatus', None, None, ), # 2
  )

  def __init__(self, syncParamMid=None, contactStatus=None,):
    self.syncParamMid = syncParamMid
    self.contactStatus = contactStatus

  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.syncParamMid = SyncParamMid()
          self.syncParamMid.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.contactStatus = 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('SyncParamContact')
    if self.syncParamMid is not None:
      oprot.writeFieldBegin('syncParamMid', TType.STRUCT, 1)
      self.syncParamMid.write(oprot)
      oprot.writeFieldEnd()
    if self.contactStatus is not None:
      oprot.writeFieldBegin('contactStatus', TType.I32, 2)
      oprot.writeI32(self.contactStatus)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.syncParamMid)
    value = (value * 31) ^ hash(self.contactStatus)
    return value

  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 ChannelDomains:
  """
  Attributes:
   - channelDomains
   - revision
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'channelDomains', (TType.STRUCT,(ChannelDomain, ChannelDomain.thrift_spec)), None, ), # 1
    (2, TType.I64, 'revision', None, None, ), # 2
  )

  def __init__(self, channelDomains=None, revision=None,):
    self.channelDomains = channelDomains
    self.revision = revision

  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.channelDomains = []
          (_etype142, _size139) = iprot.readListBegin()
          for _i143 in xrange(_size139):
            _elem144 = ChannelDomain()
            _elem144.read(iprot)
            self.channelDomains.append(_elem144)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        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('ChannelDomains')
    if self.channelDomains is not None:
      oprot.writeFieldBegin('channelDomains', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.channelDomains))
      for iter145 in self.channelDomains:
        iter145.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 2)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.channelDomains)
    value = (value * 31) ^ hash(self.revision)
    return value

  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 ProductCategory:
  """
  Attributes:
   - productCategoryId
   - title
   - productCount
   - newFlag
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'productCategoryId', None, None, ), # 1
    (2, TType.STRING, 'title', None, None, ), # 2
    (3, TType.I32, 'productCount', None, None, ), # 3
    (4, TType.BOOL, 'newFlag', None, None, ), # 4
  )

  def __init__(self, productCategoryId=None, title=None, productCount=None, newFlag=None,):
    self.productCategoryId = productCategoryId
    self.title = title
    self.productCount = productCount
    self.newFlag = newFlag

  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.productCategoryId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.title = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.productCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.newFlag = 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('ProductCategory')
    if self.productCategoryId is not None:
      oprot.writeFieldBegin('productCategoryId', TType.I64, 1)
      oprot.writeI64(self.productCategoryId)
      oprot.writeFieldEnd()
    if self.title is not None:
      oprot.writeFieldBegin('title', TType.STRING, 2)
      oprot.writeString(self.title)
      oprot.writeFieldEnd()
    if self.productCount is not None:
      oprot.writeFieldBegin('productCount', TType.I32, 3)
      oprot.writeI32(self.productCount)
      oprot.writeFieldEnd()
    if self.newFlag is not None:
      oprot.writeFieldBegin('newFlag', TType.BOOL, 4)
      oprot.writeBool(self.newFlag)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.productCategoryId)
    value = (value * 31) ^ hash(self.title)
    value = (value * 31) ^ hash(self.productCount)
    value = (value * 31) ^ hash(self.newFlag)
    return value

  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 ChannelInfos:
  """
  Attributes:
   - channelInfos
   - revision
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'channelInfos', (TType.STRUCT,(ChannelInfo, ChannelInfo.thrift_spec)), None, ), # 1
    (2, TType.I64, 'revision', None, None, ), # 2
  )

  def __init__(self, channelInfos=None, revision=None,):
    self.channelInfos = channelInfos
    self.revision = revision

  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.channelInfos = []
          (_etype149, _size146) = iprot.readListBegin()
          for _i150 in xrange(_size146):
            _elem151 = ChannelInfo()
            _elem151.read(iprot)
            self.channelInfos.append(_elem151)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        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('ChannelInfos')
    if self.channelInfos is not None:
      oprot.writeFieldBegin('channelInfos', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.channelInfos))
      for iter152 in self.channelInfos:
        iter152.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 2)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.channelInfos)
    value = (value * 31) ^ hash(self.revision)
    return value

  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 ChannelNotificationSetting:
  """
  Attributes:
   - channelId
   - name
   - notificationReceivable
   - messageReceivable
   - showDefault
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'channelId', None, None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
    (3, TType.BOOL, 'notificationReceivable', None, None, ), # 3
    (4, TType.BOOL, 'messageReceivable', None, None, ), # 4
    (5, TType.BOOL, 'showDefault', None, None, ), # 5
  )

  def __init__(self, channelId=None, name=None, notificationReceivable=None, messageReceivable=None, showDefault=None,):
    self.channelId = channelId
    self.name = name
    self.notificationReceivable = notificationReceivable
    self.messageReceivable = messageReceivable
    self.showDefault = showDefault

  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.channelId = iprot.readString()
        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.BOOL:
          self.notificationReceivable = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.messageReceivable = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.showDefault = 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('ChannelNotificationSetting')
    if self.channelId is not None:
      oprot.writeFieldBegin('channelId', TType.STRING, 1)
      oprot.writeString(self.channelId)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.notificationReceivable is not None:
      oprot.writeFieldBegin('notificationReceivable', TType.BOOL, 3)
      oprot.writeBool(self.notificationReceivable)
      oprot.writeFieldEnd()
    if self.messageReceivable is not None:
      oprot.writeFieldBegin('messageReceivable', TType.BOOL, 4)
      oprot.writeBool(self.messageReceivable)
      oprot.writeFieldEnd()
    if self.showDefault is not None:
      oprot.writeFieldBegin('showDefault', TType.BOOL, 5)
      oprot.writeBool(self.showDefault)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.channelId)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.notificationReceivable)
    value = (value * 31) ^ hash(self.messageReceivable)
    value = (value * 31) ^ hash(self.showDefault)
    return value

  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 ChannelSyncDatas:
  """
  Attributes:
   - channelInfos
   - channelDomains
   - revision
   - expires
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'channelInfos', (TType.STRUCT,(ChannelInfo, ChannelInfo.thrift_spec)), None, ), # 1
    (2, TType.LIST, 'channelDomains', (TType.STRUCT,(ChannelDomain, ChannelDomain.thrift_spec)), None, ), # 2
    (3, TType.I64, 'revision', None, None, ), # 3
    (4, TType.I64, 'expires', None, None, ), # 4
  )

  def __init__(self, channelInfos=None, channelDomains=None, revision=None, expires=None,):
    self.channelInfos = channelInfos
    self.channelDomains = channelDomains
    self.revision = revision
    self.expires = expires

  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.channelInfos = []
          (_etype156, _size153) = iprot.readListBegin()
          for _i157 in xrange(_size153):
            _elem158 = ChannelInfo()
            _elem158.read(iprot)
            self.channelInfos.append(_elem158)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.channelDomains = []
          (_etype162, _size159) = iprot.readListBegin()
          for _i163 in xrange(_size159):
            _elem164 = ChannelDomain()
            _elem164.read(iprot)
            self.channelDomains.append(_elem164)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.expires = iprot.readI64()
        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('ChannelSyncDatas')
    if self.channelInfos is not None:
      oprot.writeFieldBegin('channelInfos', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.channelInfos))
      for iter165 in self.channelInfos:
        iter165.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.channelDomains is not None:
      oprot.writeFieldBegin('channelDomains', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.channelDomains))
      for iter166 in self.channelDomains:
        iter166.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 3)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.expires is not None:
      oprot.writeFieldBegin('expires', TType.I64, 4)
      oprot.writeI64(self.expires)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.channelInfos)
    value = (value * 31) ^ hash(self.channelDomains)
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.expires)
    return value

  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 NotiCenterEventData:
  """
  Attributes:
   - id
   - to
   - from_
   - toChannel
   - fromChannel
   - eventType
   - createdTime
   - operationRevision
   - content
   - push
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'id', None, None, ), # 1
    (2, TType.STRING, 'to', None, None, ), # 2
    (3, TType.STRING, 'from_', None, None, ), # 3
    (4, TType.STRING, 'toChannel', None, None, ), # 4
    (5, TType.STRING, 'fromChannel', None, None, ), # 5
    (6, TType.STRING, 'eventType', None, None, ), # 6
    (7, TType.I64, 'createdTime', None, None, ), # 7
    (8, TType.I64, 'operationRevision', None, None, ), # 8
    (9, TType.MAP, 'content', (TType.STRING,None,TType.STRING,None), None, ), # 9
    (10, TType.MAP, 'push', (TType.STRING,None,TType.STRING,None), None, ), # 10
  )

  def __init__(self, id=None, to=None, from_=None, toChannel=None, fromChannel=None, eventType=None, createdTime=None, operationRevision=None, content=None, push=None,):
    self.id = id
    self.to = to
    self.from_ = from_
    self.toChannel = toChannel
    self.fromChannel = fromChannel
    self.eventType = eventType
    self.createdTime = createdTime
    self.operationRevision = operationRevision
    self.content = content
    self.push = push

  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.to = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.from_ = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.toChannel = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.fromChannel = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.eventType = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I64:
          self.operationRevision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.MAP:
          self.content = {}
          (_ktype168, _vtype169, _size167 ) = iprot.readMapBegin()
          for _i171 in xrange(_size167):
            _key172 = iprot.readString()
            _val173 = iprot.readString()
            self.content[_key172] = _val173
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.MAP:
          self.push = {}
          (_ktype175, _vtype176, _size174 ) = iprot.readMapBegin()
          for _i178 in xrange(_size174):
            _key179 = iprot.readString()
            _val180 = iprot.readString()
            self.push[_key179] = _val180
          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('NotiCenterEventData')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.STRING, 1)
      oprot.writeString(self.id)
      oprot.writeFieldEnd()
    if self.to is not None:
      oprot.writeFieldBegin('to', TType.STRING, 2)
      oprot.writeString(self.to)
      oprot.writeFieldEnd()
    if self.from_ is not None:
      oprot.writeFieldBegin('from_', TType.STRING, 3)
      oprot.writeString(self.from_)
      oprot.writeFieldEnd()
    if self.toChannel is not None:
      oprot.writeFieldBegin('toChannel', TType.STRING, 4)
      oprot.writeString(self.toChannel)
      oprot.writeFieldEnd()
    if self.fromChannel is not None:
      oprot.writeFieldBegin('fromChannel', TType.STRING, 5)
      oprot.writeString(self.fromChannel)
      oprot.writeFieldEnd()
    if self.eventType is not None:
      oprot.writeFieldBegin('eventType', TType.STRING, 6)
      oprot.writeString(self.eventType)
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 7)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    if self.operationRevision is not None:
      oprot.writeFieldBegin('operationRevision', TType.I64, 8)
      oprot.writeI64(self.operationRevision)
      oprot.writeFieldEnd()
    if self.content is not None:
      oprot.writeFieldBegin('content', TType.MAP, 9)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.content))
      for kiter181,viter182 in self.content.items():
        oprot.writeString(kiter181)
        oprot.writeString(viter182)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.push is not None:
      oprot.writeFieldBegin('push', TType.MAP, 10)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.push))
      for kiter183,viter184 in self.push.items():
        oprot.writeString(kiter183)
        oprot.writeString(viter184)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.to)
    value = (value * 31) ^ hash(self.from_)
    value = (value * 31) ^ hash(self.toChannel)
    value = (value * 31) ^ hash(self.fromChannel)
    value = (value * 31) ^ hash(self.eventType)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.operationRevision)
    value = (value * 31) ^ hash(self.content)
    value = (value * 31) ^ hash(self.push)
    return value

  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 ChannelToken:
  """
  Attributes:
   - token
   - obsToken
   - expiration
   - refreshToken
   - channelAccessToken
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'token', None, None, ), # 1
    (2, TType.STRING, 'obsToken', None, None, ), # 2
    (3, TType.I64, 'expiration', None, None, ), # 3
    (4, TType.STRING, 'refreshToken', None, None, ), # 4
    (5, TType.STRING, 'channelAccessToken', None, None, ), # 5
  )

  def __init__(self, token=None, obsToken=None, expiration=None, refreshToken=None, channelAccessToken=None,):
    self.token = token
    self.obsToken = obsToken
    self.expiration = expiration
    self.refreshToken = refreshToken
    self.channelAccessToken = channelAccessToken

  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.token = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.obsToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.expiration = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.refreshToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.channelAccessToken = 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('ChannelToken')
    if self.token is not None:
      oprot.writeFieldBegin('token', TType.STRING, 1)
      oprot.writeString(self.token)
      oprot.writeFieldEnd()
    if self.obsToken is not None:
      oprot.writeFieldBegin('obsToken', TType.STRING, 2)
      oprot.writeString(self.obsToken)
      oprot.writeFieldEnd()
    if self.expiration is not None:
      oprot.writeFieldBegin('expiration', TType.I64, 3)
      oprot.writeI64(self.expiration)
      oprot.writeFieldEnd()
    if self.refreshToken is not None:
      oprot.writeFieldBegin('refreshToken', TType.STRING, 4)
      oprot.writeString(self.refreshToken)
      oprot.writeFieldEnd()
    if self.channelAccessToken is not None:
      oprot.writeFieldBegin('channelAccessToken', TType.STRING, 5)
      oprot.writeString(self.channelAccessToken)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.token)
    value = (value * 31) ^ hash(self.obsToken)
    value = (value * 31) ^ hash(self.expiration)
    value = (value * 31) ^ hash(self.refreshToken)
    value = (value * 31) ^ hash(self.channelAccessToken)
    return value

  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 ChannelSettings:
  """
  Attributes:
   - unapprovedMessageReceivable
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'unapprovedMessageReceivable', None, None, ), # 1
  )

  def __init__(self, unapprovedMessageReceivable=None,):
    self.unapprovedMessageReceivable = unapprovedMessageReceivable

  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.BOOL:
          self.unapprovedMessageReceivable = 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('ChannelSettings')
    if self.unapprovedMessageReceivable is not None:
      oprot.writeFieldBegin('unapprovedMessageReceivable', TType.BOOL, 1)
      oprot.writeBool(self.unapprovedMessageReceivable)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.unapprovedMessageReceivable)
    return value

  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 ChannelIdWithLastUpdated:
  """
  Attributes:
   - channelId
   - lastUpdated
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'channelId', None, None, ), # 1
    (2, TType.I64, 'lastUpdated', None, None, ), # 2
  )

  def __init__(self, channelId=None, lastUpdated=None,):
    self.channelId = channelId
    self.lastUpdated = lastUpdated

  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.channelId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.lastUpdated = iprot.readI64()
        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('ChannelIdWithLastUpdated')
    if self.channelId is not None:
      oprot.writeFieldBegin('channelId', TType.STRING, 1)
      oprot.writeString(self.channelId)
      oprot.writeFieldEnd()
    if self.lastUpdated is not None:
      oprot.writeFieldBegin('lastUpdated', TType.I64, 2)
      oprot.writeI64(self.lastUpdated)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.channelId)
    value = (value * 31) ^ hash(self.lastUpdated)
    return value

  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 Coin:
  """
  Attributes:
   - freeCoinBalance
   - payedCoinBalance
   - totalCoinBalance
   - rewardCoinBalance
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'freeCoinBalance', None, None, ), # 1
    (2, TType.I32, 'payedCoinBalance', None, None, ), # 2
    (3, TType.I32, 'totalCoinBalance', None, None, ), # 3
    (4, TType.I32, 'rewardCoinBalance', None, None, ), # 4
  )

  def __init__(self, freeCoinBalance=None, payedCoinBalance=None, totalCoinBalance=None, rewardCoinBalance=None,):
    self.freeCoinBalance = freeCoinBalance
    self.payedCoinBalance = payedCoinBalance
    self.totalCoinBalance = totalCoinBalance
    self.rewardCoinBalance = rewardCoinBalance

  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.freeCoinBalance = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.payedCoinBalance = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.totalCoinBalance = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.rewardCoinBalance = 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('Coin')
    if self.freeCoinBalance is not None:
      oprot.writeFieldBegin('freeCoinBalance', TType.I32, 1)
      oprot.writeI32(self.freeCoinBalance)
      oprot.writeFieldEnd()
    if self.payedCoinBalance is not None:
      oprot.writeFieldBegin('payedCoinBalance', TType.I32, 2)
      oprot.writeI32(self.payedCoinBalance)
      oprot.writeFieldEnd()
    if self.totalCoinBalance is not None:
      oprot.writeFieldBegin('totalCoinBalance', TType.I32, 3)
      oprot.writeI32(self.totalCoinBalance)
      oprot.writeFieldEnd()
    if self.rewardCoinBalance is not None:
      oprot.writeFieldBegin('rewardCoinBalance', TType.I32, 4)
      oprot.writeI32(self.rewardCoinBalance)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.freeCoinBalance)
    value = (value * 31) ^ hash(self.payedCoinBalance)
    value = (value * 31) ^ hash(self.totalCoinBalance)
    value = (value * 31) ^ hash(self.rewardCoinBalance)
    return value

  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 CoinPayLoad:
  """
  Attributes:
   - payCoin
   - freeCoin
   - type
   - rewardCoin
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'payCoin', None, None, ), # 1
    (2, TType.I32, 'freeCoin', None, None, ), # 2
    (3, TType.I32, 'type', None, None, ), # 3
    (4, TType.I32, 'rewardCoin', None, None, ), # 4
  )

  def __init__(self, payCoin=None, freeCoin=None, type=None, rewardCoin=None,):
    self.payCoin = payCoin
    self.freeCoin = freeCoin
    self.type = type
    self.rewardCoin = rewardCoin

  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.payCoin = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.freeCoin = iprot.readI32()
        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.rewardCoin = 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('CoinPayLoad')
    if self.payCoin is not None:
      oprot.writeFieldBegin('payCoin', TType.I32, 1)
      oprot.writeI32(self.payCoin)
      oprot.writeFieldEnd()
    if self.freeCoin is not None:
      oprot.writeFieldBegin('freeCoin', TType.I32, 2)
      oprot.writeI32(self.freeCoin)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 3)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.rewardCoin is not None:
      oprot.writeFieldBegin('rewardCoin', TType.I32, 4)
      oprot.writeI32(self.rewardCoin)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.payCoin)
    value = (value * 31) ^ hash(self.freeCoin)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.rewardCoin)
    return value

  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 CoinHistory:
  """
  Attributes:
   - payDate
   - coinBalance
   - coin
   - price
   - title
   - refund
   - paySeq
   - currency
   - currencySign
   - displayPrice
   - payload
   - channelId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'payDate', None, None, ), # 1
    (2, TType.I32, 'coinBalance', None, None, ), # 2
    (3, TType.I32, 'coin', None, None, ), # 3
    (4, TType.STRING, 'price', None, None, ), # 4
    (5, TType.STRING, 'title', None, None, ), # 5
    (6, TType.BOOL, 'refund', None, None, ), # 6
    (7, TType.STRING, 'paySeq', None, None, ), # 7
    (8, TType.STRING, 'currency', None, None, ), # 8
    (9, TType.STRING, 'currencySign', None, None, ), # 9
    (10, TType.STRING, 'displayPrice', None, None, ), # 10
    (11, TType.STRUCT, 'payload', (CoinPayLoad, CoinPayLoad.thrift_spec), None, ), # 11
    (12, TType.STRING, 'channelId', None, None, ), # 12
  )

  def __init__(self, payDate=None, coinBalance=None, coin=None, price=None, title=None, refund=None, paySeq=None, currency=None, currencySign=None, displayPrice=None, payload=None, channelId=None,):
    self.payDate = payDate
    self.coinBalance = coinBalance
    self.coin = coin
    self.price = price
    self.title = title
    self.refund = refund
    self.paySeq = paySeq
    self.currency = currency
    self.currencySign = currencySign
    self.displayPrice = displayPrice
    self.payload = payload
    self.channelId = channelId

  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.payDate = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.coinBalance = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.coin = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.price = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.title = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.BOOL:
          self.refund = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.paySeq = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.currency = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.currencySign = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.displayPrice = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRUCT:
          self.payload = CoinPayLoad()
          self.payload.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.channelId = 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('CoinHistory')
    if self.payDate is not None:
      oprot.writeFieldBegin('payDate', TType.I64, 1)
      oprot.writeI64(self.payDate)
      oprot.writeFieldEnd()
    if self.coinBalance is not None:
      oprot.writeFieldBegin('coinBalance', TType.I32, 2)
      oprot.writeI32(self.coinBalance)
      oprot.writeFieldEnd()
    if self.coin is not None:
      oprot.writeFieldBegin('coin', TType.I32, 3)
      oprot.writeI32(self.coin)
      oprot.writeFieldEnd()
    if self.price is not None:
      oprot.writeFieldBegin('price', TType.STRING, 4)
      oprot.writeString(self.price)
      oprot.writeFieldEnd()
    if self.title is not None:
      oprot.writeFieldBegin('title', TType.STRING, 5)
      oprot.writeString(self.title)
      oprot.writeFieldEnd()
    if self.refund is not None:
      oprot.writeFieldBegin('refund', TType.BOOL, 6)
      oprot.writeBool(self.refund)
      oprot.writeFieldEnd()
    if self.paySeq is not None:
      oprot.writeFieldBegin('paySeq', TType.STRING, 7)
      oprot.writeString(self.paySeq)
      oprot.writeFieldEnd()
    if self.currency is not None:
      oprot.writeFieldBegin('currency', TType.STRING, 8)
      oprot.writeString(self.currency)
      oprot.writeFieldEnd()
    if self.currencySign is not None:
      oprot.writeFieldBegin('currencySign', TType.STRING, 9)
      oprot.writeString(self.currencySign)
      oprot.writeFieldEnd()
    if self.displayPrice is not None:
      oprot.writeFieldBegin('displayPrice', TType.STRING, 10)
      oprot.writeString(self.displayPrice)
      oprot.writeFieldEnd()
    if self.payload is not None:
      oprot.writeFieldBegin('payload', TType.STRUCT, 11)
      self.payload.write(oprot)
      oprot.writeFieldEnd()
    if self.channelId is not None:
      oprot.writeFieldBegin('channelId', TType.STRING, 12)
      oprot.writeString(self.channelId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.payDate)
    value = (value * 31) ^ hash(self.coinBalance)
    value = (value * 31) ^ hash(self.coin)
    value = (value * 31) ^ hash(self.price)
    value = (value * 31) ^ hash(self.title)
    value = (value * 31) ^ hash(self.refund)
    value = (value * 31) ^ hash(self.paySeq)
    value = (value * 31) ^ hash(self.currency)
    value = (value * 31) ^ hash(self.currencySign)
    value = (value * 31) ^ hash(self.displayPrice)
    value = (value * 31) ^ hash(self.payload)
    value = (value * 31) ^ hash(self.channelId)
    return value

  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 CoinHistoryCondition:
  """
  Attributes:
   - start
   - size
   - language
   - eddt
   - appStoreCode
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'start', None, None, ), # 1
    (2, TType.I32, 'size', None, None, ), # 2
    (3, TType.STRING, 'language', None, None, ), # 3
    (4, TType.STRING, 'eddt', None, None, ), # 4
    (5, TType.I32, 'appStoreCode', None, None, ), # 5
  )

  def __init__(self, start=None, size=None, language=None, eddt=None, appStoreCode=None,):
    self.start = start
    self.size = size
    self.language = language
    self.eddt = eddt
    self.appStoreCode = appStoreCode

  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.start = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.size = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.language = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.eddt = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.appStoreCode = 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('CoinHistoryCondition')
    if self.start is not None:
      oprot.writeFieldBegin('start', TType.I64, 1)
      oprot.writeI64(self.start)
      oprot.writeFieldEnd()
    if self.size is not None:
      oprot.writeFieldBegin('size', TType.I32, 2)
      oprot.writeI32(self.size)
      oprot.writeFieldEnd()
    if self.language is not None:
      oprot.writeFieldBegin('language', TType.STRING, 3)
      oprot.writeString(self.language)
      oprot.writeFieldEnd()
    if self.eddt is not None:
      oprot.writeFieldBegin('eddt', TType.STRING, 4)
      oprot.writeString(self.eddt)
      oprot.writeFieldEnd()
    if self.appStoreCode is not None:
      oprot.writeFieldBegin('appStoreCode', TType.I32, 5)
      oprot.writeI32(self.appStoreCode)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.start)
    value = (value * 31) ^ hash(self.size)
    value = (value * 31) ^ hash(self.language)
    value = (value * 31) ^ hash(self.eddt)
    value = (value * 31) ^ hash(self.appStoreCode)
    return value

  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 CoinHistoryResult:
  """
  Attributes:
   - historys
   - balance
   - hasNext
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'historys', (TType.STRUCT,(CoinHistory, CoinHistory.thrift_spec)), None, ), # 1
    (2, TType.STRUCT, 'balance', (Coin, Coin.thrift_spec), None, ), # 2
    (3, TType.BOOL, 'hasNext', None, None, ), # 3
  )

  def __init__(self, historys=None, balance=None, hasNext=None,):
    self.historys = historys
    self.balance = balance
    self.hasNext = hasNext

  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.historys = []
          (_etype188, _size185) = iprot.readListBegin()
          for _i189 in xrange(_size185):
            _elem190 = CoinHistory()
            _elem190.read(iprot)
            self.historys.append(_elem190)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.balance = Coin()
          self.balance.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.hasNext = 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('CoinHistoryResult')
    if self.historys is not None:
      oprot.writeFieldBegin('historys', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.historys))
      for iter191 in self.historys:
        iter191.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.balance is not None:
      oprot.writeFieldBegin('balance', TType.STRUCT, 2)
      self.balance.write(oprot)
      oprot.writeFieldEnd()
    if self.hasNext is not None:
      oprot.writeFieldBegin('hasNext', TType.BOOL, 3)
      oprot.writeBool(self.hasNext)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.historys)
    value = (value * 31) ^ hash(self.balance)
    value = (value * 31) ^ hash(self.hasNext)
    return value

  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 CoinProductItem:
  """
  Attributes:
   - itemId
   - coin
   - freeCoin
   - currency
   - price
   - displayPrice
   - name
   - desc
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'itemId', None, None, ), # 1
    (2, TType.I32, 'coin', None, None, ), # 2
    (3, TType.I32, 'freeCoin', None, None, ), # 3
    None, # 4
    (5, TType.STRING, 'currency', None, None, ), # 5
    (6, TType.STRING, 'price', None, None, ), # 6
    (7, TType.STRING, 'displayPrice', None, None, ), # 7
    (8, TType.STRING, 'name', None, None, ), # 8
    (9, TType.STRING, 'desc', None, None, ), # 9
  )

  def __init__(self, itemId=None, coin=None, freeCoin=None, currency=None, price=None, displayPrice=None, name=None, desc=None,):
    self.itemId = itemId
    self.coin = coin
    self.freeCoin = freeCoin
    self.currency = currency
    self.price = price
    self.displayPrice = displayPrice
    self.name = name
    self.desc = desc

  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.itemId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.coin = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.freeCoin = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.currency = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.price = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.displayPrice = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.name = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.desc = 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('CoinProductItem')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.STRING, 1)
      oprot.writeString(self.itemId)
      oprot.writeFieldEnd()
    if self.coin is not None:
      oprot.writeFieldBegin('coin', TType.I32, 2)
      oprot.writeI32(self.coin)
      oprot.writeFieldEnd()
    if self.freeCoin is not None:
      oprot.writeFieldBegin('freeCoin', TType.I32, 3)
      oprot.writeI32(self.freeCoin)
      oprot.writeFieldEnd()
    if self.currency is not None:
      oprot.writeFieldBegin('currency', TType.STRING, 5)
      oprot.writeString(self.currency)
      oprot.writeFieldEnd()
    if self.price is not None:
      oprot.writeFieldBegin('price', TType.STRING, 6)
      oprot.writeString(self.price)
      oprot.writeFieldEnd()
    if self.displayPrice is not None:
      oprot.writeFieldBegin('displayPrice', TType.STRING, 7)
      oprot.writeString(self.displayPrice)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 8)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.desc is not None:
      oprot.writeFieldBegin('desc', TType.STRING, 9)
      oprot.writeString(self.desc)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.itemId)
    value = (value * 31) ^ hash(self.coin)
    value = (value * 31) ^ hash(self.freeCoin)
    value = (value * 31) ^ hash(self.currency)
    value = (value * 31) ^ hash(self.price)
    value = (value * 31) ^ hash(self.displayPrice)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.desc)
    return value

  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 CoinPurchaseConfirm:
  """
  Attributes:
   - orderId
   - appStoreCode
   - receipt
   - signature
   - seller
   - requestType
   - ignoreReceipt
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'orderId', None, None, ), # 1
    (2, TType.I32, 'appStoreCode', None, None, ), # 2
    (3, TType.STRING, 'receipt', None, None, ), # 3
    (4, TType.STRING, 'signature', None, None, ), # 4
    (5, TType.STRING, 'seller', None, None, ), # 5
    (6, TType.STRING, 'requestType', None, None, ), # 6
    (7, TType.BOOL, 'ignoreReceipt', None, None, ), # 7
  )

  def __init__(self, orderId=None, appStoreCode=None, receipt=None, signature=None, seller=None, requestType=None, ignoreReceipt=None,):
    self.orderId = orderId
    self.appStoreCode = appStoreCode
    self.receipt = receipt
    self.signature = signature
    self.seller = seller
    self.requestType = requestType
    self.ignoreReceipt = ignoreReceipt

  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.orderId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.appStoreCode = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.receipt = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.signature = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.seller = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.requestType = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.BOOL:
          self.ignoreReceipt = 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('CoinPurchaseConfirm')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.STRING, 1)
      oprot.writeString(self.orderId)
      oprot.writeFieldEnd()
    if self.appStoreCode is not None:
      oprot.writeFieldBegin('appStoreCode', TType.I32, 2)
      oprot.writeI32(self.appStoreCode)
      oprot.writeFieldEnd()
    if self.receipt is not None:
      oprot.writeFieldBegin('receipt', TType.STRING, 3)
      oprot.writeString(self.receipt)
      oprot.writeFieldEnd()
    if self.signature is not None:
      oprot.writeFieldBegin('signature', TType.STRING, 4)
      oprot.writeString(self.signature)
      oprot.writeFieldEnd()
    if self.seller is not None:
      oprot.writeFieldBegin('seller', TType.STRING, 5)
      oprot.writeString(self.seller)
      oprot.writeFieldEnd()
    if self.requestType is not None:
      oprot.writeFieldBegin('requestType', TType.STRING, 6)
      oprot.writeString(self.requestType)
      oprot.writeFieldEnd()
    if self.ignoreReceipt is not None:
      oprot.writeFieldBegin('ignoreReceipt', TType.BOOL, 7)
      oprot.writeBool(self.ignoreReceipt)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.orderId)
    value = (value * 31) ^ hash(self.appStoreCode)
    value = (value * 31) ^ hash(self.receipt)
    value = (value * 31) ^ hash(self.signature)
    value = (value * 31) ^ hash(self.seller)
    value = (value * 31) ^ hash(self.requestType)
    value = (value * 31) ^ hash(self.ignoreReceipt)
    return value

  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 CoinPurchaseReservation:
  """
  Attributes:
   - productId
   - country
   - currency
   - price
   - appStoreCode
   - language
   - pgCode
   - redirectUrl
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'productId', None, None, ), # 1
    (2, TType.STRING, 'country', None, None, ), # 2
    (3, TType.STRING, 'currency', None, None, ), # 3
    (4, TType.STRING, 'price', None, None, ), # 4
    (5, TType.I32, 'appStoreCode', None, None, ), # 5
    (6, TType.STRING, 'language', None, None, ), # 6
    (7, TType.I32, 'pgCode', None, None, ), # 7
    (8, TType.STRING, 'redirectUrl', None, None, ), # 8
  )

  def __init__(self, productId=None, country=None, currency=None, price=None, appStoreCode=None, language=None, pgCode=None, redirectUrl=None,):
    self.productId = productId
    self.country = country
    self.currency = currency
    self.price = price
    self.appStoreCode = appStoreCode
    self.language = language
    self.pgCode = pgCode
    self.redirectUrl = redirectUrl

  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.productId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.country = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.currency = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.price = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.appStoreCode = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.language = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.pgCode = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.redirectUrl = 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('CoinPurchaseReservation')
    if self.productId is not None:
      oprot.writeFieldBegin('productId', TType.STRING, 1)
      oprot.writeString(self.productId)
      oprot.writeFieldEnd()
    if self.country is not None:
      oprot.writeFieldBegin('country', TType.STRING, 2)
      oprot.writeString(self.country)
      oprot.writeFieldEnd()
    if self.currency is not None:
      oprot.writeFieldBegin('currency', TType.STRING, 3)
      oprot.writeString(self.currency)
      oprot.writeFieldEnd()
    if self.price is not None:
      oprot.writeFieldBegin('price', TType.STRING, 4)
      oprot.writeString(self.price)
      oprot.writeFieldEnd()
    if self.appStoreCode is not None:
      oprot.writeFieldBegin('appStoreCode', TType.I32, 5)
      oprot.writeI32(self.appStoreCode)
      oprot.writeFieldEnd()
    if self.language is not None:
      oprot.writeFieldBegin('language', TType.STRING, 6)
      oprot.writeString(self.language)
      oprot.writeFieldEnd()
    if self.pgCode is not None:
      oprot.writeFieldBegin('pgCode', TType.I32, 7)
      oprot.writeI32(self.pgCode)
      oprot.writeFieldEnd()
    if self.redirectUrl is not None:
      oprot.writeFieldBegin('redirectUrl', TType.STRING, 8)
      oprot.writeString(self.redirectUrl)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.productId)
    value = (value * 31) ^ hash(self.country)
    value = (value * 31) ^ hash(self.currency)
    value = (value * 31) ^ hash(self.price)
    value = (value * 31) ^ hash(self.appStoreCode)
    value = (value * 31) ^ hash(self.language)
    value = (value * 31) ^ hash(self.pgCode)
    value = (value * 31) ^ hash(self.redirectUrl)
    return value

  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 CoinUseReservationItem:
  """
  Attributes:
   - itemId
   - itemName
   - amount
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'itemId', None, None, ), # 1
    (2, TType.STRING, 'itemName', None, None, ), # 2
    (3, TType.I32, 'amount', None, None, ), # 3
  )

  def __init__(self, itemId=None, itemName=None, amount=None,):
    self.itemId = itemId
    self.itemName = itemName
    self.amount = amount

  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.itemId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.itemName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.amount = 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('CoinUseReservationItem')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.STRING, 1)
      oprot.writeString(self.itemId)
      oprot.writeFieldEnd()
    if self.itemName is not None:
      oprot.writeFieldBegin('itemName', TType.STRING, 2)
      oprot.writeString(self.itemName)
      oprot.writeFieldEnd()
    if self.amount is not None:
      oprot.writeFieldBegin('amount', TType.I32, 3)
      oprot.writeI32(self.amount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.itemId)
    value = (value * 31) ^ hash(self.itemName)
    value = (value * 31) ^ hash(self.amount)
    return value

  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 CoinUseReservation:
  """
  Attributes:
   - channelId
   - shopOrderId
   - appStoreCode
   - items
   - country
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'channelId', None, None, ), # 1
    (2, TType.STRING, 'shopOrderId', None, None, ), # 2
    (3, TType.I32, 'appStoreCode', None, None, ), # 3
    (4, TType.LIST, 'items', (TType.STRUCT,(CoinUseReservationItem, CoinUseReservationItem.thrift_spec)), None, ), # 4
    (5, TType.STRING, 'country', None, None, ), # 5
  )

  def __init__(self, channelId=None, shopOrderId=None, appStoreCode=None, items=None, country=None,):
    self.channelId = channelId
    self.shopOrderId = shopOrderId
    self.appStoreCode = appStoreCode
    self.items = items
    self.country = country

  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.channelId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.shopOrderId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.appStoreCode = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.items = []
          (_etype195, _size192) = iprot.readListBegin()
          for _i196 in xrange(_size192):
            _elem197 = CoinUseReservationItem()
            _elem197.read(iprot)
            self.items.append(_elem197)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.country = 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('CoinUseReservation')
    if self.channelId is not None:
      oprot.writeFieldBegin('channelId', TType.STRING, 1)
      oprot.writeString(self.channelId)
      oprot.writeFieldEnd()
    if self.shopOrderId is not None:
      oprot.writeFieldBegin('shopOrderId', TType.STRING, 2)
      oprot.writeString(self.shopOrderId)
      oprot.writeFieldEnd()
    if self.appStoreCode is not None:
      oprot.writeFieldBegin('appStoreCode', TType.I32, 3)
      oprot.writeI32(self.appStoreCode)
      oprot.writeFieldEnd()
    if self.items is not None:
      oprot.writeFieldBegin('items', TType.LIST, 4)
      oprot.writeListBegin(TType.STRUCT, len(self.items))
      for iter198 in self.items:
        iter198.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.country is not None:
      oprot.writeFieldBegin('country', TType.STRING, 5)
      oprot.writeString(self.country)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.channelId)
    value = (value * 31) ^ hash(self.shopOrderId)
    value = (value * 31) ^ hash(self.appStoreCode)
    value = (value * 31) ^ hash(self.items)
    value = (value * 31) ^ hash(self.country)
    return value

  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 CompactContact:
  """
  Attributes:
   - mid
   - createdTime
   - modifiedTime
   - status
   - settings
   - displayNameOverridden
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.I64, 'createdTime', None, None, ), # 2
    (3, TType.I64, 'modifiedTime', None, None, ), # 3
    (4, TType.I32, 'status', None, None, ), # 4
    (5, TType.I64, 'settings', None, None, ), # 5
    (6, TType.STRING, 'displayNameOverridden', None, None, ), # 6
  )

  def __init__(self, mid=None, createdTime=None, modifiedTime=None, status=None, settings=None, displayNameOverridden=None,):
    self.mid = mid
    self.createdTime = createdTime
    self.modifiedTime = modifiedTime
    self.status = status
    self.settings = settings
    self.displayNameOverridden = displayNameOverridden

  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 == 3:
        if ftype == TType.I64:
          self.modifiedTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.status = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.settings = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.displayNameOverridden = 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('CompactContact')
    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.modifiedTime is not None:
      oprot.writeFieldBegin('modifiedTime', TType.I64, 3)
      oprot.writeI64(self.modifiedTime)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 4)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.settings is not None:
      oprot.writeFieldBegin('settings', TType.I64, 5)
      oprot.writeI64(self.settings)
      oprot.writeFieldEnd()
    if self.displayNameOverridden is not None:
      oprot.writeFieldBegin('displayNameOverridden', TType.STRING, 6)
      oprot.writeString(self.displayNameOverridden)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.modifiedTime)
    value = (value * 31) ^ hash(self.status)
    value = (value * 31) ^ hash(self.settings)
    value = (value * 31) ^ hash(self.displayNameOverridden)
    return value

  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 ContactModification:
  """
  Attributes:
   - type
   - luid
   - phones
   - emails
   - userids
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'type', None, None, ), # 1
    (2, TType.STRING, 'luid', None, None, ), # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.LIST, 'phones', (TType.STRING,None), None, ), # 11
    (12, TType.LIST, 'emails', (TType.STRING,None), None, ), # 12
    (13, TType.LIST, 'userids', (TType.STRING,None), None, ), # 13
  )

  def __init__(self, type=None, luid=None, phones=None, emails=None, userids=None,):
    self.type = type
    self.luid = luid
    self.phones = phones
    self.emails = emails
    self.userids = userids

  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.type = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.luid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.LIST:
          self.phones = []
          (_etype202, _size199) = iprot.readListBegin()
          for _i203 in xrange(_size199):
            _elem204 = iprot.readString()
            self.phones.append(_elem204)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.LIST:
          self.emails = []
          (_etype208, _size205) = iprot.readListBegin()
          for _i209 in xrange(_size205):
            _elem210 = iprot.readString()
            self.emails.append(_elem210)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.LIST:
          self.userids = []
          (_etype214, _size211) = iprot.readListBegin()
          for _i215 in xrange(_size211):
            _elem216 = iprot.readString()
            self.userids.append(_elem216)
          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('ContactModification')
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 1)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.luid is not None:
      oprot.writeFieldBegin('luid', TType.STRING, 2)
      oprot.writeString(self.luid)
      oprot.writeFieldEnd()
    if self.phones is not None:
      oprot.writeFieldBegin('phones', TType.LIST, 11)
      oprot.writeListBegin(TType.STRING, len(self.phones))
      for iter217 in self.phones:
        oprot.writeString(iter217)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.emails is not None:
      oprot.writeFieldBegin('emails', TType.LIST, 12)
      oprot.writeListBegin(TType.STRING, len(self.emails))
      for iter218 in self.emails:
        oprot.writeString(iter218)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.userids is not None:
      oprot.writeFieldBegin('userids', TType.LIST, 13)
      oprot.writeListBegin(TType.STRING, len(self.userids))
      for iter219 in self.userids:
        oprot.writeString(iter219)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.luid)
    value = (value * 31) ^ hash(self.phones)
    value = (value * 31) ^ hash(self.emails)
    value = (value * 31) ^ hash(self.userids)
    return value

  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 ContactRegistration:
  """
  Attributes:
   - contact
   - luid
   - contactType
   - contactKey
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'contact', (Contact, Contact.thrift_spec), None, ), # 1
    None, # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.STRING, 'luid', None, None, ), # 10
    (11, TType.I32, 'contactType', None, None, ), # 11
    (12, TType.STRING, 'contactKey', None, None, ), # 12
  )

  def __init__(self, contact=None, luid=None, contactType=None, contactKey=None,):
    self.contact = contact
    self.luid = luid
    self.contactType = contactType
    self.contactKey = contactKey

  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.contact = Contact()
          self.contact.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.luid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I32:
          self.contactType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.contactKey = 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('ContactRegistration')
    if self.contact is not None:
      oprot.writeFieldBegin('contact', TType.STRUCT, 1)
      self.contact.write(oprot)
      oprot.writeFieldEnd()
    if self.luid is not None:
      oprot.writeFieldBegin('luid', TType.STRING, 10)
      oprot.writeString(self.luid)
      oprot.writeFieldEnd()
    if self.contactType is not None:
      oprot.writeFieldBegin('contactType', TType.I32, 11)
      oprot.writeI32(self.contactType)
      oprot.writeFieldEnd()
    if self.contactKey is not None:
      oprot.writeFieldBegin('contactKey', TType.STRING, 12)
      oprot.writeString(self.contactKey)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.contact)
    value = (value * 31) ^ hash(self.luid)
    value = (value * 31) ^ hash(self.contactType)
    value = (value * 31) ^ hash(self.contactKey)
    return value

  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 ContactReport:
  """
  Attributes:
   - mid
   - exists
   - contact
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.BOOL, 'exists', None, None, ), # 2
    (3, TType.STRUCT, 'contact', (Contact, Contact.thrift_spec), None, ), # 3
  )

  def __init__(self, mid=None, exists=None, contact=None,):
    self.mid = mid
    self.exists = exists
    self.contact = contact

  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.BOOL:
          self.exists = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.contact = Contact()
          self.contact.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('ContactReport')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.exists is not None:
      oprot.writeFieldBegin('exists', TType.BOOL, 2)
      oprot.writeBool(self.exists)
      oprot.writeFieldEnd()
    if self.contact is not None:
      oprot.writeFieldBegin('contact', TType.STRUCT, 3)
      self.contact.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.exists)
    value = (value * 31) ^ hash(self.contact)
    return value

  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 ContactReportResult:
  """
  Attributes:
   - mid
   - exists
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.BOOL, 'exists', None, None, ), # 2
  )

  def __init__(self, mid=None, exists=None,):
    self.mid = mid
    self.exists = exists

  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.BOOL:
          self.exists = 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('ContactReportResult')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.exists is not None:
      oprot.writeFieldBegin('exists', TType.BOOL, 2)
      oprot.writeBool(self.exists)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.exists)
    return value

  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 DeviceInfo:
  """
  Attributes:
   - deviceName
   - systemName
   - systemVersion
   - model
   - carrierCode
   - carrierName
   - applicationType
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'deviceName', None, None, ), # 1
    (2, TType.STRING, 'systemName', None, None, ), # 2
    (3, TType.STRING, 'systemVersion', None, None, ), # 3
    (4, TType.STRING, 'model', None, None, ), # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.I32, 'carrierCode', None, None, ), # 10
    (11, TType.STRING, 'carrierName', None, None, ), # 11
    None, # 12
    None, # 13
    None, # 14
    None, # 15
    None, # 16
    None, # 17
    None, # 18
    None, # 19
    (20, TType.I32, 'applicationType', None, None, ), # 20
  )

  def __init__(self, deviceName=None, systemName=None, systemVersion=None, model=None, carrierCode=None, carrierName=None, applicationType=None,):
    self.deviceName = deviceName
    self.systemName = systemName
    self.systemVersion = systemVersion
    self.model = model
    self.carrierCode = carrierCode
    self.carrierName = carrierName
    self.applicationType = applicationType

  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.deviceName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.systemName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.systemVersion = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.model = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I32:
          self.carrierCode = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.carrierName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.I32:
          self.applicationType = 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('DeviceInfo')
    if self.deviceName is not None:
      oprot.writeFieldBegin('deviceName', TType.STRING, 1)
      oprot.writeString(self.deviceName)
      oprot.writeFieldEnd()
    if self.systemName is not None:
      oprot.writeFieldBegin('systemName', TType.STRING, 2)
      oprot.writeString(self.systemName)
      oprot.writeFieldEnd()
    if self.systemVersion is not None:
      oprot.writeFieldBegin('systemVersion', TType.STRING, 3)
      oprot.writeString(self.systemVersion)
      oprot.writeFieldEnd()
    if self.model is not None:
      oprot.writeFieldBegin('model', TType.STRING, 4)
      oprot.writeString(self.model)
      oprot.writeFieldEnd()
    if self.carrierCode is not None:
      oprot.writeFieldBegin('carrierCode', TType.I32, 10)
      oprot.writeI32(self.carrierCode)
      oprot.writeFieldEnd()
    if self.carrierName is not None:
      oprot.writeFieldBegin('carrierName', TType.STRING, 11)
      oprot.writeString(self.carrierName)
      oprot.writeFieldEnd()
    if self.applicationType is not None:
      oprot.writeFieldBegin('applicationType', TType.I32, 20)
      oprot.writeI32(self.applicationType)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.deviceName)
    value = (value * 31) ^ hash(self.systemName)
    value = (value * 31) ^ hash(self.systemVersion)
    value = (value * 31) ^ hash(self.model)
    value = (value * 31) ^ hash(self.carrierCode)
    value = (value * 31) ^ hash(self.carrierName)
    value = (value * 31) ^ hash(self.applicationType)
    return value

  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 EmailConfirmation:
  """
  Attributes:
   - usePasswordSet
   - email
   - password
   - ignoreDuplication
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'usePasswordSet', None, None, ), # 1
    (2, TType.STRING, 'email', None, None, ), # 2
    (3, TType.STRING, 'password', None, None, ), # 3
    (4, TType.BOOL, 'ignoreDuplication', None, None, ), # 4
  )

  def __init__(self, usePasswordSet=None, email=None, password=None, ignoreDuplication=None,):
    self.usePasswordSet = usePasswordSet
    self.email = email
    self.password = password
    self.ignoreDuplication = ignoreDuplication

  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.BOOL:
          self.usePasswordSet = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.email = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.password = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.ignoreDuplication = 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('EmailConfirmation')
    if self.usePasswordSet is not None:
      oprot.writeFieldBegin('usePasswordSet', TType.BOOL, 1)
      oprot.writeBool(self.usePasswordSet)
      oprot.writeFieldEnd()
    if self.email is not None:
      oprot.writeFieldBegin('email', TType.STRING, 2)
      oprot.writeString(self.email)
      oprot.writeFieldEnd()
    if self.password is not None:
      oprot.writeFieldBegin('password', TType.STRING, 3)
      oprot.writeString(self.password)
      oprot.writeFieldEnd()
    if self.ignoreDuplication is not None:
      oprot.writeFieldBegin('ignoreDuplication', TType.BOOL, 4)
      oprot.writeBool(self.ignoreDuplication)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.usePasswordSet)
    value = (value * 31) ^ hash(self.email)
    value = (value * 31) ^ hash(self.password)
    value = (value * 31) ^ hash(self.ignoreDuplication)
    return value

  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 EmailConfirmationSession:
  """
  Attributes:
   - emailConfirmationType
   - verifier
   - targetEmail
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'emailConfirmationType', None, None, ), # 1
    (2, TType.STRING, 'verifier', None, None, ), # 2
    (3, TType.STRING, 'targetEmail', None, None, ), # 3
  )

  def __init__(self, emailConfirmationType=None, verifier=None, targetEmail=None,):
    self.emailConfirmationType = emailConfirmationType
    self.verifier = verifier
    self.targetEmail = targetEmail

  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.emailConfirmationType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.verifier = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.targetEmail = 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('EmailConfirmationSession')
    if self.emailConfirmationType is not None:
      oprot.writeFieldBegin('emailConfirmationType', TType.I32, 1)
      oprot.writeI32(self.emailConfirmationType)
      oprot.writeFieldEnd()
    if self.verifier is not None:
      oprot.writeFieldBegin('verifier', TType.STRING, 2)
      oprot.writeString(self.verifier)
      oprot.writeFieldEnd()
    if self.targetEmail is not None:
      oprot.writeFieldBegin('targetEmail', TType.STRING, 3)
      oprot.writeString(self.targetEmail)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.emailConfirmationType)
    value = (value * 31) ^ hash(self.verifier)
    value = (value * 31) ^ hash(self.targetEmail)
    return value

  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 FriendChannelMatrix:
  """
  Attributes:
   - channelId
   - representMid
   - count
   - point
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'channelId', None, None, ), # 1
    (2, TType.STRING, 'representMid', None, None, ), # 2
    (3, TType.I32, 'count', None, None, ), # 3
    (4, TType.I32, 'point', None, None, ), # 4
  )

  def __init__(self, channelId=None, representMid=None, count=None, point=None,):
    self.channelId = channelId
    self.representMid = representMid
    self.count = count
    self.point = point

  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.channelId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.representMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.count = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.point = 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('FriendChannelMatrix')
    if self.channelId is not None:
      oprot.writeFieldBegin('channelId', TType.STRING, 1)
      oprot.writeString(self.channelId)
      oprot.writeFieldEnd()
    if self.representMid is not None:
      oprot.writeFieldBegin('representMid', TType.STRING, 2)
      oprot.writeString(self.representMid)
      oprot.writeFieldEnd()
    if self.count is not None:
      oprot.writeFieldBegin('count', TType.I32, 3)
      oprot.writeI32(self.count)
      oprot.writeFieldEnd()
    if self.point is not None:
      oprot.writeFieldBegin('point', TType.I32, 4)
      oprot.writeI32(self.point)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.channelId)
    value = (value * 31) ^ hash(self.representMid)
    value = (value * 31) ^ hash(self.count)
    value = (value * 31) ^ hash(self.point)
    return value

  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 FriendChannelMatricesResponse:
  """
  Attributes:
   - expires
   - matrices
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'expires', None, None, ), # 1
    (2, TType.LIST, 'matrices', (TType.STRUCT,(FriendChannelMatrix, FriendChannelMatrix.thrift_spec)), None, ), # 2
  )

  def __init__(self, expires=None, matrices=None,):
    self.expires = expires
    self.matrices = matrices

  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.expires = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.matrices = []
          (_etype223, _size220) = iprot.readListBegin()
          for _i224 in xrange(_size220):
            _elem225 = FriendChannelMatrix()
            _elem225.read(iprot)
            self.matrices.append(_elem225)
          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('FriendChannelMatricesResponse')
    if self.expires is not None:
      oprot.writeFieldBegin('expires', TType.I64, 1)
      oprot.writeI64(self.expires)
      oprot.writeFieldEnd()
    if self.matrices is not None:
      oprot.writeFieldBegin('matrices', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.matrices))
      for iter226 in self.matrices:
        iter226.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.expires)
    value = (value * 31) ^ hash(self.matrices)
    return value

  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 FriendRequest:
  """
  Attributes:
   - eMid
   - mid
   - direction
   - method
   - param
   - timestamp
   - seqId
   - displayName
   - picturePath
   - pictureStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'eMid', None, None, ), # 1
    (2, TType.STRING, 'mid', None, None, ), # 2
    (3, TType.I32, 'direction', None, None, ), # 3
    (4, TType.I32, 'method', None, None, ), # 4
    (5, TType.STRING, 'param', None, None, ), # 5
    (6, TType.I64, 'timestamp', None, None, ), # 6
    (7, TType.I64, 'seqId', None, None, ), # 7
    None, # 8
    None, # 9
    (10, TType.STRING, 'displayName', None, None, ), # 10
    (11, TType.STRING, 'picturePath', None, None, ), # 11
    (12, TType.STRING, 'pictureStatus', None, None, ), # 12
  )

  def __init__(self, eMid=None, mid=None, direction=None, method=None, param=None, timestamp=None, seqId=None, displayName=None, picturePath=None, pictureStatus=None,):
    self.eMid = eMid
    self.mid = mid
    self.direction = direction
    self.method = method
    self.param = param
    self.timestamp = timestamp
    self.seqId = seqId
    self.displayName = displayName
    self.picturePath = picturePath
    self.pictureStatus = pictureStatus

  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.eMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.mid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.direction = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.method = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.param = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.timestamp = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I64:
          self.seqId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.displayName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.picturePath = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.pictureStatus = 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('FriendRequest')
    if self.eMid is not None:
      oprot.writeFieldBegin('eMid', TType.STRING, 1)
      oprot.writeString(self.eMid)
      oprot.writeFieldEnd()
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 2)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.direction is not None:
      oprot.writeFieldBegin('direction', TType.I32, 3)
      oprot.writeI32(self.direction)
      oprot.writeFieldEnd()
    if self.method is not None:
      oprot.writeFieldBegin('method', TType.I32, 4)
      oprot.writeI32(self.method)
      oprot.writeFieldEnd()
    if self.param is not None:
      oprot.writeFieldBegin('param', TType.STRING, 5)
      oprot.writeString(self.param)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 6)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.seqId is not None:
      oprot.writeFieldBegin('seqId', TType.I64, 7)
      oprot.writeI64(self.seqId)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 10)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.picturePath is not None:
      oprot.writeFieldBegin('picturePath', TType.STRING, 11)
      oprot.writeString(self.picturePath)
      oprot.writeFieldEnd()
    if self.pictureStatus is not None:
      oprot.writeFieldBegin('pictureStatus', TType.STRING, 12)
      oprot.writeString(self.pictureStatus)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.eMid)
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.direction)
    value = (value * 31) ^ hash(self.method)
    value = (value * 31) ^ hash(self.param)
    value = (value * 31) ^ hash(self.timestamp)
    value = (value * 31) ^ hash(self.seqId)
    value = (value * 31) ^ hash(self.displayName)
    value = (value * 31) ^ hash(self.picturePath)
    value = (value * 31) ^ hash(self.pictureStatus)
    return value

  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 FriendRequestsInfo:
  """
  Attributes:
   - totalIncomingCount
   - totalOutgoingCount
   - recentIncomings
   - recentOutgoings
   - totalIncomingLimit
   - totalOutgoingLimit
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'totalIncomingCount', None, None, ), # 1
    (2, TType.I32, 'totalOutgoingCount', None, None, ), # 2
    (3, TType.LIST, 'recentIncomings', (TType.STRUCT,(FriendRequest, FriendRequest.thrift_spec)), None, ), # 3
    (4, TType.LIST, 'recentOutgoings', (TType.STRUCT,(FriendRequest, FriendRequest.thrift_spec)), None, ), # 4
    (5, TType.I32, 'totalIncomingLimit', None, None, ), # 5
    (6, TType.I32, 'totalOutgoingLimit', None, None, ), # 6
  )

  def __init__(self, totalIncomingCount=None, totalOutgoingCount=None, recentIncomings=None, recentOutgoings=None, totalIncomingLimit=None, totalOutgoingLimit=None,):
    self.totalIncomingCount = totalIncomingCount
    self.totalOutgoingCount = totalOutgoingCount
    self.recentIncomings = recentIncomings
    self.recentOutgoings = recentOutgoings
    self.totalIncomingLimit = totalIncomingLimit
    self.totalOutgoingLimit = totalOutgoingLimit

  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.totalIncomingCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.totalOutgoingCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.recentIncomings = []
          (_etype230, _size227) = iprot.readListBegin()
          for _i231 in xrange(_size227):
            _elem232 = FriendRequest()
            _elem232.read(iprot)
            self.recentIncomings.append(_elem232)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.recentOutgoings = []
          (_etype236, _size233) = iprot.readListBegin()
          for _i237 in xrange(_size233):
            _elem238 = FriendRequest()
            _elem238.read(iprot)
            self.recentOutgoings.append(_elem238)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.totalIncomingLimit = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.totalOutgoingLimit = 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('FriendRequestsInfo')
    if self.totalIncomingCount is not None:
      oprot.writeFieldBegin('totalIncomingCount', TType.I32, 1)
      oprot.writeI32(self.totalIncomingCount)
      oprot.writeFieldEnd()
    if self.totalOutgoingCount is not None:
      oprot.writeFieldBegin('totalOutgoingCount', TType.I32, 2)
      oprot.writeI32(self.totalOutgoingCount)
      oprot.writeFieldEnd()
    if self.recentIncomings is not None:
      oprot.writeFieldBegin('recentIncomings', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.recentIncomings))
      for iter239 in self.recentIncomings:
        iter239.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.recentOutgoings is not None:
      oprot.writeFieldBegin('recentOutgoings', TType.LIST, 4)
      oprot.writeListBegin(TType.STRUCT, len(self.recentOutgoings))
      for iter240 in self.recentOutgoings:
        iter240.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.totalIncomingLimit is not None:
      oprot.writeFieldBegin('totalIncomingLimit', TType.I32, 5)
      oprot.writeI32(self.totalIncomingLimit)
      oprot.writeFieldEnd()
    if self.totalOutgoingLimit is not None:
      oprot.writeFieldBegin('totalOutgoingLimit', TType.I32, 6)
      oprot.writeI32(self.totalOutgoingLimit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.totalIncomingCount)
    value = (value * 31) ^ hash(self.totalOutgoingCount)
    value = (value * 31) ^ hash(self.recentIncomings)
    value = (value * 31) ^ hash(self.recentOutgoings)
    value = (value * 31) ^ hash(self.totalIncomingLimit)
    value = (value * 31) ^ hash(self.totalOutgoingLimit)
    return value

  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 Geolocation:
  """
  Attributes:
   - longitude
   - latitude
  """

  thrift_spec = (
    None, # 0
    (1, TType.DOUBLE, 'longitude', None, None, ), # 1
    (2, TType.DOUBLE, 'latitude', None, None, ), # 2
  )

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

  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.DOUBLE:
          self.longitude = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.DOUBLE:
          self.latitude = iprot.readDouble()
        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('Geolocation')
    if self.longitude is not None:
      oprot.writeFieldBegin('longitude', TType.DOUBLE, 1)
      oprot.writeDouble(self.longitude)
      oprot.writeFieldEnd()
    if self.latitude is not None:
      oprot.writeFieldBegin('latitude', TType.DOUBLE, 2)
      oprot.writeDouble(self.latitude)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.longitude)
    value = (value * 31) ^ hash(self.latitude)
    return value

  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 NotificationTarget:
  """
  Attributes:
   - applicationType
   - applicationVersion
   - region
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'applicationType', None, None, ), # 1
    (2, TType.STRING, 'applicationVersion', None, None, ), # 2
    (3, TType.STRING, 'region', None, None, ), # 3
  )

  def __init__(self, applicationType=None, applicationVersion=None, region=None,):
    self.applicationType = applicationType
    self.applicationVersion = applicationVersion
    self.region = region

  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.applicationType = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.applicationVersion = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.region = 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('NotificationTarget')
    if self.applicationType is not None:
      oprot.writeFieldBegin('applicationType', TType.STRING, 1)
      oprot.writeString(self.applicationType)
      oprot.writeFieldEnd()
    if self.applicationVersion is not None:
      oprot.writeFieldBegin('applicationVersion', TType.STRING, 2)
      oprot.writeString(self.applicationVersion)
      oprot.writeFieldEnd()
    if self.region is not None:
      oprot.writeFieldBegin('region', TType.STRING, 3)
      oprot.writeString(self.region)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.applicationType)
    value = (value * 31) ^ hash(self.applicationVersion)
    value = (value * 31) ^ hash(self.region)
    return value

  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 GlobalEvent:
  """
  Attributes:
   - key
   - targets
   - createdTime
   - data
   - maxDelay
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'key', None, None, ), # 1
    (2, TType.LIST, 'targets', (TType.STRUCT,(NotificationTarget, NotificationTarget.thrift_spec)), None, ), # 2
    (3, TType.I64, 'createdTime', None, None, ), # 3
    (4, TType.I64, 'data', None, None, ), # 4
    (5, TType.I32, 'maxDelay', None, None, ), # 5
  )

  def __init__(self, key=None, targets=None, createdTime=None, data=None, maxDelay=None,):
    self.key = key
    self.targets = targets
    self.createdTime = createdTime
    self.data = data
    self.maxDelay = maxDelay

  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.key = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.targets = []
          (_etype244, _size241) = iprot.readListBegin()
          for _i245 in xrange(_size241):
            _elem246 = NotificationTarget()
            _elem246.read(iprot)
            self.targets.append(_elem246)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.data = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.maxDelay = 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('GlobalEvent')
    if self.key is not None:
      oprot.writeFieldBegin('key', TType.STRING, 1)
      oprot.writeString(self.key)
      oprot.writeFieldEnd()
    if self.targets is not None:
      oprot.writeFieldBegin('targets', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.targets))
      for iter247 in self.targets:
        iter247.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 3)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    if self.data is not None:
      oprot.writeFieldBegin('data', TType.I64, 4)
      oprot.writeI64(self.data)
      oprot.writeFieldEnd()
    if self.maxDelay is not None:
      oprot.writeFieldBegin('maxDelay', TType.I32, 5)
      oprot.writeI32(self.maxDelay)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.key)
    value = (value * 31) ^ hash(self.targets)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.data)
    value = (value * 31) ^ hash(self.maxDelay)
    return value

  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 GroupPreference:
  """
  Attributes:
   - invitationTicket
   - favoriteTimestamp
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'invitationTicket', None, None, ), # 1
    (2, TType.I64, 'favoriteTimestamp', None, None, ), # 2
  )

  def __init__(self, invitationTicket=None, favoriteTimestamp=None,):
    self.invitationTicket = invitationTicket
    self.favoriteTimestamp = favoriteTimestamp

  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.invitationTicket = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.favoriteTimestamp = iprot.readI64()
        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('GroupPreference')
    if self.invitationTicket is not None:
      oprot.writeFieldBegin('invitationTicket', TType.STRING, 1)
      oprot.writeString(self.invitationTicket)
      oprot.writeFieldEnd()
    if self.favoriteTimestamp is not None:
      oprot.writeFieldBegin('favoriteTimestamp', TType.I64, 2)
      oprot.writeI64(self.favoriteTimestamp)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.invitationTicket)
    value = (value * 31) ^ hash(self.favoriteTimestamp)
    return value

  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:
  """
  Attributes:
   - id
   - createdTime
   - name
   - pictureStatus
   - preventedJoinByTicket
   - groupPreference
   - members
   - creator
   - invitee
   - notificationDisabled
  """

  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
    (12, TType.BOOL, 'preventedJoinByTicket', None, None, ), # 12
    (13, TType.STRUCT, 'groupPreference', (GroupPreference, GroupPreference.thrift_spec), 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
    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, id=None, createdTime=None, name=None, pictureStatus=None, preventedJoinByTicket=None, groupPreference=None, members=None, creator=None, invitee=None, notificationDisabled=None,):
    self.id = id
    self.createdTime = createdTime
    self.name = name
    self.pictureStatus = pictureStatus
    self.preventedJoinByTicket = preventedJoinByTicket
    self.groupPreference = groupPreference
    self.members = members
    self.creator = creator
    self.invitee = invitee
    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.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 == 12:
        if ftype == TType.BOOL:
          self.preventedJoinByTicket = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.STRUCT:
          self.groupPreference = GroupPreference()
          self.groupPreference.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.LIST:
          self.members = []
          (_etype251, _size248) = iprot.readListBegin()
          for _i252 in xrange(_size248):
            _elem253 = Contact()
            _elem253.read(iprot)
            self.members.append(_elem253)
          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 = []
          (_etype257, _size254) = iprot.readListBegin()
          for _i258 in xrange(_size254):
            _elem259 = Contact()
            _elem259.read(iprot)
            self.invitee.append(_elem259)
          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('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.preventedJoinByTicket is not None:
      oprot.writeFieldBegin('preventedJoinByTicket', TType.BOOL, 12)
      oprot.writeBool(self.preventedJoinByTicket)
      oprot.writeFieldEnd()
    if self.groupPreference is not None:
      oprot.writeFieldBegin('groupPreference', TType.STRUCT, 13)
      self.groupPreference.write(oprot)
      oprot.writeFieldEnd()
    if self.members is not None:
      oprot.writeFieldBegin('members', TType.LIST, 20)
      oprot.writeListBegin(TType.STRUCT, len(self.members))
      for iter260 in self.members:
        iter260.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 iter261 in self.invitee:
        iter261.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 __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.pictureStatus)
    value = (value * 31) ^ hash(self.preventedJoinByTicket)
    value = (value * 31) ^ hash(self.groupPreference)
    value = (value * 31) ^ hash(self.members)
    value = (value * 31) ^ hash(self.creator)
    value = (value * 31) ^ hash(self.invitee)
    value = (value * 31) ^ hash(self.notificationDisabled)
    return value

  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 IdentityCredential:
  """
  Attributes:
   - provider
   - identifier
   - password
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'provider', None, None, ), # 1
    (2, TType.STRING, 'identifier', None, None, ), # 2
    (3, TType.STRING, 'password', None, None, ), # 3
  )

  def __init__(self, provider=None, identifier=None, password=None,):
    self.provider = provider
    self.identifier = identifier
    self.password = password

  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.provider = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.identifier = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.password = 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('IdentityCredential')
    if self.provider is not None:
      oprot.writeFieldBegin('provider', TType.I32, 1)
      oprot.writeI32(self.provider)
      oprot.writeFieldEnd()
    if self.identifier is not None:
      oprot.writeFieldBegin('identifier', TType.STRING, 2)
      oprot.writeString(self.identifier)
      oprot.writeFieldEnd()
    if self.password is not None:
      oprot.writeFieldBegin('password', TType.STRING, 3)
      oprot.writeString(self.password)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.provider)
    value = (value * 31) ^ hash(self.identifier)
    value = (value * 31) ^ hash(self.password)
    return value

  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 LastReadMessageId:
  """
  Attributes:
   - mid
   - lastReadMessageId
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.STRING, 'lastReadMessageId', None, None, ), # 2
  )

  def __init__(self, mid=None, lastReadMessageId=None,):
    self.mid = mid
    self.lastReadMessageId = lastReadMessageId

  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.STRING:
          self.lastReadMessageId = 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('LastReadMessageId')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.lastReadMessageId is not None:
      oprot.writeFieldBegin('lastReadMessageId', TType.STRING, 2)
      oprot.writeString(self.lastReadMessageId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.lastReadMessageId)
    return value

  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 LastReadMessageIds:
  """
  Attributes:
   - chatId
   - lastReadMessageIds
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'chatId', None, None, ), # 1
    (2, TType.LIST, 'lastReadMessageIds', (TType.STRUCT,(LastReadMessageId, LastReadMessageId.thrift_spec)), None, ), # 2
  )

  def __init__(self, chatId=None, lastReadMessageIds=None,):
    self.chatId = chatId
    self.lastReadMessageIds = lastReadMessageIds

  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.chatId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.lastReadMessageIds = []
          (_etype265, _size262) = iprot.readListBegin()
          for _i266 in xrange(_size262):
            _elem267 = LastReadMessageId()
            _elem267.read(iprot)
            self.lastReadMessageIds.append(_elem267)
          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('LastReadMessageIds')
    if self.chatId is not None:
      oprot.writeFieldBegin('chatId', TType.STRING, 1)
      oprot.writeString(self.chatId)
      oprot.writeFieldEnd()
    if self.lastReadMessageIds is not None:
      oprot.writeFieldBegin('lastReadMessageIds', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.lastReadMessageIds))
      for iter268 in self.lastReadMessageIds:
        iter268.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.chatId)
    value = (value * 31) ^ hash(self.lastReadMessageIds)
    return value

  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 VerificationSessionData:
  """
  Attributes:
   - sessionId
   - method
   - callback
   - normalizedPhone
   - countryCode
   - nationalSignificantNumber
   - availableVerificationMethods
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'sessionId', None, None, ), # 1
    (2, TType.I32, 'method', None, None, ), # 2
    (3, TType.STRING, 'callback', None, None, ), # 3
    (4, TType.STRING, 'normalizedPhone', None, None, ), # 4
    (5, TType.STRING, 'countryCode', None, None, ), # 5
    (6, TType.STRING, 'nationalSignificantNumber', None, None, ), # 6
    (7, TType.LIST, 'availableVerificationMethods', (TType.I32,None), None, ), # 7
  )

  def __init__(self, sessionId=None, method=None, callback=None, normalizedPhone=None, countryCode=None, nationalSignificantNumber=None, availableVerificationMethods=None,):
    self.sessionId = sessionId
    self.method = method
    self.callback = callback
    self.normalizedPhone = normalizedPhone
    self.countryCode = countryCode
    self.nationalSignificantNumber = nationalSignificantNumber
    self.availableVerificationMethods = availableVerificationMethods

  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.sessionId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.method = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.callback = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.normalizedPhone = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.countryCode = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.nationalSignificantNumber = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.LIST:
          self.availableVerificationMethods = []
          (_etype272, _size269) = iprot.readListBegin()
          for _i273 in xrange(_size269):
            _elem274 = iprot.readI32()
            self.availableVerificationMethods.append(_elem274)
          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('VerificationSessionData')
    if self.sessionId is not None:
      oprot.writeFieldBegin('sessionId', TType.STRING, 1)
      oprot.writeString(self.sessionId)
      oprot.writeFieldEnd()
    if self.method is not None:
      oprot.writeFieldBegin('method', TType.I32, 2)
      oprot.writeI32(self.method)
      oprot.writeFieldEnd()
    if self.callback is not None:
      oprot.writeFieldBegin('callback', TType.STRING, 3)
      oprot.writeString(self.callback)
      oprot.writeFieldEnd()
    if self.normalizedPhone is not None:
      oprot.writeFieldBegin('normalizedPhone', TType.STRING, 4)
      oprot.writeString(self.normalizedPhone)
      oprot.writeFieldEnd()
    if self.countryCode is not None:
      oprot.writeFieldBegin('countryCode', TType.STRING, 5)
      oprot.writeString(self.countryCode)
      oprot.writeFieldEnd()
    if self.nationalSignificantNumber is not None:
      oprot.writeFieldBegin('nationalSignificantNumber', TType.STRING, 6)
      oprot.writeString(self.nationalSignificantNumber)
      oprot.writeFieldEnd()
    if self.availableVerificationMethods is not None:
      oprot.writeFieldBegin('availableVerificationMethods', TType.LIST, 7)
      oprot.writeListBegin(TType.I32, len(self.availableVerificationMethods))
      for iter275 in self.availableVerificationMethods:
        oprot.writeI32(iter275)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.sessionId)
    value = (value * 31) ^ hash(self.method)
    value = (value * 31) ^ hash(self.callback)
    value = (value * 31) ^ hash(self.normalizedPhone)
    value = (value * 31) ^ hash(self.countryCode)
    value = (value * 31) ^ hash(self.nationalSignificantNumber)
    value = (value * 31) ^ hash(self.availableVerificationMethods)
    return value

  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:
  """
  Attributes:
   - authToken
   - certificate
   - verifier
   - pinCode
   - type
   - lastPrimaryBindTime
   - displayMessage
   - sessionForSMSConfirm
  """

  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
    (6, TType.I64, 'lastPrimaryBindTime', None, None, ), # 6
    (7, TType.STRING, 'displayMessage', None, None, ), # 7
    (8, TType.STRUCT, 'sessionForSMSConfirm', (VerificationSessionData, VerificationSessionData.thrift_spec), None, ), # 8
  )

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

  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)
      elif fid == 6:
        if ftype == TType.I64:
          self.lastPrimaryBindTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.displayMessage = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRUCT:
          self.sessionForSMSConfirm = VerificationSessionData()
          self.sessionForSMSConfirm.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('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()
    if self.lastPrimaryBindTime is not None:
      oprot.writeFieldBegin('lastPrimaryBindTime', TType.I64, 6)
      oprot.writeI64(self.lastPrimaryBindTime)
      oprot.writeFieldEnd()
    if self.displayMessage is not None:
      oprot.writeFieldBegin('displayMessage', TType.STRING, 7)
      oprot.writeString(self.displayMessage)
      oprot.writeFieldEnd()
    if self.sessionForSMSConfirm is not None:
      oprot.writeFieldBegin('sessionForSMSConfirm', TType.STRUCT, 8)
      self.sessionForSMSConfirm.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.authToken)
    value = (value * 31) ^ hash(self.certificate)
    value = (value * 31) ^ hash(self.verifier)
    value = (value * 31) ^ hash(self.pinCode)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.lastPrimaryBindTime)
    value = (value * 31) ^ hash(self.displayMessage)
    value = (value * 31) ^ hash(self.sessionForSMSConfirm)
    return value

  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 LoginRequest:
  """
  Attributes:
   - type
   - identityProvider
   - identifier
   - password
   - keepLoggedIn
   - accessLocation
   - systemName
   - certificate
   - verifier
   - secret
   - e2eeVersion
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'type', None, None, ), # 1
    (2, TType.I32, 'identityProvider', None, None, ), # 2
    (3, TType.STRING, 'identifier', None, None, ), # 3
    (4, TType.STRING, 'password', None, None, ), # 4
    (5, TType.BOOL, 'keepLoggedIn', None, None, ), # 5
    (6, TType.STRING, 'accessLocation', None, None, ), # 6
    (7, TType.STRING, 'systemName', None, None, ), # 7
    (8, TType.STRING, 'certificate', None, None, ), # 8
    (9, TType.STRING, 'verifier', None, None, ), # 9
    (10, TType.STRING, 'secret', None, None, ), # 10
    (11, TType.I32, 'e2eeVersion', None, None, ), # 11
  )

  def __init__(self, type=None, identityProvider=None, identifier=None, password=None, keepLoggedIn=None, accessLocation=None, systemName=None, certificate=None, verifier=None, secret=None, e2eeVersion=None,):
    self.type = type
    self.identityProvider = identityProvider
    self.identifier = identifier
    self.password = password
    self.keepLoggedIn = keepLoggedIn
    self.accessLocation = accessLocation
    self.systemName = systemName
    self.certificate = certificate
    self.verifier = verifier
    self.secret = secret
    self.e2eeVersion = e2eeVersion

  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.type = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.identityProvider = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.identifier = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.password = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.keepLoggedIn = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.accessLocation = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.systemName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.certificate = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.verifier = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.secret = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I32:
          self.e2eeVersion = 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('LoginRequest')
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 1)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.identityProvider is not None:
      oprot.writeFieldBegin('identityProvider', TType.I32, 2)
      oprot.writeI32(self.identityProvider)
      oprot.writeFieldEnd()
    if self.identifier is not None:
      oprot.writeFieldBegin('identifier', TType.STRING, 3)
      oprot.writeString(self.identifier)
      oprot.writeFieldEnd()
    if self.password is not None:
      oprot.writeFieldBegin('password', TType.STRING, 4)
      oprot.writeString(self.password)
      oprot.writeFieldEnd()
    if self.keepLoggedIn is not None:
      oprot.writeFieldBegin('keepLoggedIn', TType.BOOL, 5)
      oprot.writeBool(self.keepLoggedIn)
      oprot.writeFieldEnd()
    if self.accessLocation is not None:
      oprot.writeFieldBegin('accessLocation', TType.STRING, 6)
      oprot.writeString(self.accessLocation)
      oprot.writeFieldEnd()
    if self.systemName is not None:
      oprot.writeFieldBegin('systemName', TType.STRING, 7)
      oprot.writeString(self.systemName)
      oprot.writeFieldEnd()
    if self.certificate is not None:
      oprot.writeFieldBegin('certificate', TType.STRING, 8)
      oprot.writeString(self.certificate)
      oprot.writeFieldEnd()
    if self.verifier is not None:
      oprot.writeFieldBegin('verifier', TType.STRING, 9)
      oprot.writeString(self.verifier)
      oprot.writeFieldEnd()
    if self.secret is not None:
      oprot.writeFieldBegin('secret', TType.STRING, 10)
      oprot.writeString(self.secret)
      oprot.writeFieldEnd()
    if self.e2eeVersion is not None:
      oprot.writeFieldBegin('e2eeVersion', TType.I32, 11)
      oprot.writeI32(self.e2eeVersion)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.identityProvider)
    value = (value * 31) ^ hash(self.identifier)
    value = (value * 31) ^ hash(self.password)
    value = (value * 31) ^ hash(self.keepLoggedIn)
    value = (value * 31) ^ hash(self.accessLocation)
    value = (value * 31) ^ hash(self.systemName)
    value = (value * 31) ^ hash(self.certificate)
    value = (value * 31) ^ hash(self.verifier)
    value = (value * 31) ^ hash(self.secret)
    value = (value * 31) ^ hash(self.e2eeVersion)
    return value

  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 LoginSession:
  """
  Attributes:
   - tokenKey
   - expirationTime
   - applicationType
   - systemName
   - accessLocation
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'tokenKey', None, None, ), # 1
    None, # 2
    (3, TType.I64, 'expirationTime', None, None, ), # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.I32, 'applicationType', None, None, ), # 11
    (12, TType.STRING, 'systemName', None, None, ), # 12
    None, # 13
    None, # 14
    None, # 15
    None, # 16
    None, # 17
    None, # 18
    None, # 19
    None, # 20
    None, # 21
    (22, TType.STRING, 'accessLocation', None, None, ), # 22
  )

  def __init__(self, tokenKey=None, expirationTime=None, applicationType=None, systemName=None, accessLocation=None,):
    self.tokenKey = tokenKey
    self.expirationTime = expirationTime
    self.applicationType = applicationType
    self.systemName = systemName
    self.accessLocation = accessLocation

  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.tokenKey = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.expirationTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I32:
          self.applicationType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.systemName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRING:
          self.accessLocation = 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('LoginSession')
    if self.tokenKey is not None:
      oprot.writeFieldBegin('tokenKey', TType.STRING, 1)
      oprot.writeString(self.tokenKey)
      oprot.writeFieldEnd()
    if self.expirationTime is not None:
      oprot.writeFieldBegin('expirationTime', TType.I64, 3)
      oprot.writeI64(self.expirationTime)
      oprot.writeFieldEnd()
    if self.applicationType is not None:
      oprot.writeFieldBegin('applicationType', TType.I32, 11)
      oprot.writeI32(self.applicationType)
      oprot.writeFieldEnd()
    if self.systemName is not None:
      oprot.writeFieldBegin('systemName', TType.STRING, 12)
      oprot.writeString(self.systemName)
      oprot.writeFieldEnd()
    if self.accessLocation is not None:
      oprot.writeFieldBegin('accessLocation', TType.STRING, 22)
      oprot.writeString(self.accessLocation)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.tokenKey)
    value = (value * 31) ^ hash(self.expirationTime)
    value = (value * 31) ^ hash(self.applicationType)
    value = (value * 31) ^ hash(self.systemName)
    value = (value * 31) ^ hash(self.accessLocation)
    return value

  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:
  """
  Attributes:
   - _from
   - to
   - toType
   - id
   - createdTime
   - deliveredTime
   - text
   - location
   - hasContent
   - contentType
   - contentPreview
   - contentMetadata
   - sessionId
   - chunks
   - relatedMessageId
   - messageRelationType
   - readCount
   - relatedMessageServiceCode
  """

  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
    (19, TType.BYTE, 'sessionId', None, None, ), # 19
    (20, TType.LIST, 'chunks', (TType.STRING,None), None, ), # 20
    (21, TType.STRING, 'relatedMessageId', None, None, ), # 21
    (22, TType.I32, 'messageRelationType', None, None, ), # 22
    (23, TType.I64, 'readCount', None, None, ), # 23
    (24, TType.I32, 'relatedMessageServiceCode', None, None, ), # 24
  )

  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, sessionId=None, chunks=None, relatedMessageId=None, messageRelationType=None, readCount=None, relatedMessageServiceCode=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
    self.sessionId = sessionId
    self.chunks = chunks
    self.relatedMessageId = relatedMessageId
    self.messageRelationType = messageRelationType
    self.readCount = readCount
    self.relatedMessageServiceCode = relatedMessageServiceCode

  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 = {}
          (_ktype277, _vtype278, _size276 ) = iprot.readMapBegin()
          for _i280 in xrange(_size276):
            _key281 = iprot.readString()
            _val282 = iprot.readString()
            self.contentMetadata[_key281] = _val282
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 19:
        if ftype == TType.BYTE:
          self.sessionId = iprot.readByte()
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.LIST:
          self.chunks = []
          (_etype286, _size283) = iprot.readListBegin()
          for _i287 in xrange(_size283):
            _elem288 = iprot.readString()
            self.chunks.append(_elem288)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.STRING:
          self.relatedMessageId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.I32:
          self.messageRelationType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 23:
        if ftype == TType.I64:
          self.readCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 24:
        if ftype == TType.I32:
          self.relatedMessageServiceCode = 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('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 kiter289,viter290 in self.contentMetadata.items():
        oprot.writeString(kiter289)
        oprot.writeString(viter290)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.sessionId is not None:
      oprot.writeFieldBegin('sessionId', TType.BYTE, 19)
      oprot.writeByte(self.sessionId)
      oprot.writeFieldEnd()
    if self.chunks is not None:
      oprot.writeFieldBegin('chunks', TType.LIST, 20)
      oprot.writeListBegin(TType.STRING, len(self.chunks))
      for iter291 in self.chunks:
        oprot.writeString(iter291)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.relatedMessageId is not None:
      oprot.writeFieldBegin('relatedMessageId', TType.STRING, 21)
      oprot.writeString(self.relatedMessageId)
      oprot.writeFieldEnd()
    if self.messageRelationType is not None:
      oprot.writeFieldBegin('messageRelationType', TType.I32, 22)
      oprot.writeI32(self.messageRelationType)
      oprot.writeFieldEnd()
    if self.readCount is not None:
      oprot.writeFieldBegin('readCount', TType.I64, 23)
      oprot.writeI64(self.readCount)
      oprot.writeFieldEnd()
    if self.relatedMessageServiceCode is not None:
      oprot.writeFieldBegin('relatedMessageServiceCode', TType.I32, 24)
      oprot.writeI32(self.relatedMessageServiceCode)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self._from)
    value = (value * 31) ^ hash(self.to)
    value = (value * 31) ^ hash(self.toType)
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.deliveredTime)
    value = (value * 31) ^ hash(self.text)
    value = (value * 31) ^ hash(self.location)
    value = (value * 31) ^ hash(self.hasContent)
    value = (value * 31) ^ hash(self.contentType)
    value = (value * 31) ^ hash(self.contentPreview)
    value = (value * 31) ^ hash(self.contentMetadata)
    value = (value * 31) ^ hash(self.sessionId)
    value = (value * 31) ^ hash(self.chunks)
    value = (value * 31) ^ hash(self.relatedMessageId)
    value = (value * 31) ^ hash(self.messageRelationType)
    value = (value * 31) ^ hash(self.readCount)
    value = (value * 31) ^ hash(self.relatedMessageServiceCode)
    return value

  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 SquareMessage:
  """
  Attributes:
   - message
   - fromType
   - squareMessageRevision
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'message', None, None, ), # 1
    None, # 2
    (3, TType.I32, 'fromType', None, None, ), # 3
    (4, TType.I64, 'squareMessageRevision', None, None, ), # 4
  )

  def __init__(self, message=None, fromType=None, squareMessageRevision=None,):
    self.message = message
    self.fromType = fromType
    self.squareMessageRevision = squareMessageRevision

  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.message = Message()
          self.message.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.fromType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.squareMessageRevision = iprot.readI64()
        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('SquareMessage')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRUCT, 1)
      self.message.write(oprot)
      oprot.writeFieldEnd()
    if self.fromType is not None:
      oprot.writeFieldBegin('fromType', TType.I32, 3)
      oprot.writeI32(self.fromType)
      oprot.writeFieldEnd()
    if self.squareMessageRevision is not None:
      oprot.writeFieldBegin('squareMessageRevision', TType.I64, 4)
      oprot.writeI64(self.squareMessageRevision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.message)
    value = (value * 31) ^ hash(self.fromType)
    value = (value * 31) ^ hash(self.squareMessageRevision)
    return value

  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 SquareChatStatusWithoutMessage:
  """
  Attributes:
   - memberCount
   - unreadMessageCount
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'memberCount', None, None, ), # 1
    (2, TType.I32, 'unreadMessageCount', None, None, ), # 2
  )

  def __init__(self, memberCount=None, unreadMessageCount=None,):
    self.memberCount = memberCount
    self.unreadMessageCount = unreadMessageCount

  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.memberCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.unreadMessageCount = 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('SquareChatStatusWithoutMessage')
    if self.memberCount is not None:
      oprot.writeFieldBegin('memberCount', TType.I32, 1)
      oprot.writeI32(self.memberCount)
      oprot.writeFieldEnd()
    if self.unreadMessageCount is not None:
      oprot.writeFieldBegin('unreadMessageCount', TType.I32, 2)
      oprot.writeI32(self.unreadMessageCount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.memberCount)
    value = (value * 31) ^ hash(self.unreadMessageCount)
    return value

  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 SquareChatStatus:
  """
  Attributes:
   - lastMessage
   - senderDisplayName
   - otherStatus
  """

  thrift_spec = (
    None, # 0
    None, # 1
    None, # 2
    (3, TType.STRUCT, 'lastMessage', (SquareMessage, SquareMessage.thrift_spec), None, ), # 3
    (4, TType.STRING, 'senderDisplayName', None, None, ), # 4
    (5, TType.STRUCT, 'otherStatus', (SquareChatStatusWithoutMessage, SquareChatStatusWithoutMessage.thrift_spec), None, ), # 5
  )

  def __init__(self, lastMessage=None, senderDisplayName=None, otherStatus=None,):
    self.lastMessage = lastMessage
    self.senderDisplayName = senderDisplayName
    self.otherStatus = otherStatus

  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 == 3:
        if ftype == TType.STRUCT:
          self.lastMessage = SquareMessage()
          self.lastMessage.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.senderDisplayName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRUCT:
          self.otherStatus = SquareChatStatusWithoutMessage()
          self.otherStatus.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('SquareChatStatus')
    if self.lastMessage is not None:
      oprot.writeFieldBegin('lastMessage', TType.STRUCT, 3)
      self.lastMessage.write(oprot)
      oprot.writeFieldEnd()
    if self.senderDisplayName is not None:
      oprot.writeFieldBegin('senderDisplayName', TType.STRING, 4)
      oprot.writeString(self.senderDisplayName)
      oprot.writeFieldEnd()
    if self.otherStatus is not None:
      oprot.writeFieldBegin('otherStatus', TType.STRUCT, 5)
      self.otherStatus.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.lastMessage)
    value = (value * 31) ^ hash(self.senderDisplayName)
    value = (value * 31) ^ hash(self.otherStatus)
    return value

  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 SquareChatMember:
  """
  Attributes:
   - squareMemberMid
   - squareChatMid
   - revision
   - membershipState
   - notificationForMessage
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMemberMid', None, None, ), # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
    (3, TType.I64, 'revision', None, None, ), # 3
    (4, TType.I32, 'membershipState', None, None, ), # 4
    (5, TType.BOOL, 'notificationForMessage', None, None, ), # 5
  )

  def __init__(self, squareMemberMid=None, squareChatMid=None, revision=None, membershipState=None, notificationForMessage=None,):
    self.squareMemberMid = squareMemberMid
    self.squareChatMid = squareChatMid
    self.revision = revision
    self.membershipState = membershipState
    self.notificationForMessage = notificationForMessage

  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.squareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.membershipState = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.notificationForMessage = 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('SquareChatMember')
    if self.squareMemberMid is not None:
      oprot.writeFieldBegin('squareMemberMid', TType.STRING, 1)
      oprot.writeString(self.squareMemberMid)
      oprot.writeFieldEnd()
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 3)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.membershipState is not None:
      oprot.writeFieldBegin('membershipState', TType.I32, 4)
      oprot.writeI32(self.membershipState)
      oprot.writeFieldEnd()
    if self.notificationForMessage is not None:
      oprot.writeFieldBegin('notificationForMessage', TType.BOOL, 5)
      oprot.writeBool(self.notificationForMessage)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMemberMid)
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.membershipState)
    value = (value * 31) ^ hash(self.notificationForMessage)
    return value

  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 MessageOperation:
  """
  Attributes:
   - revision
   - createdTime
   - type
   - reqSeq
   - 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.I32, 'status', None, None, ), # 5
    None, # 6
    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, status=None, param1=None, param2=None, param3=None, message=None,):
    self.revision = revision
    self.createdTime = createdTime
    self.type = type
    self.reqSeq = reqSeq
    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.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('MessageOperation')
    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.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 5)
      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 __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.reqSeq)
    value = (value * 31) ^ hash(self.status)
    value = (value * 31) ^ hash(self.param1)
    value = (value * 31) ^ hash(self.param2)
    value = (value * 31) ^ hash(self.param3)
    value = (value * 31) ^ hash(self.message)
    return value

  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 MessageOperations:
  """
  Attributes:
   - operations
   - endFlag
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'operations', (TType.STRUCT,(MessageOperation, MessageOperation.thrift_spec)), None, ), # 1
    (2, TType.BOOL, 'endFlag', None, None, ), # 2
  )

  def __init__(self, operations=None, endFlag=None,):
    self.operations = operations
    self.endFlag = endFlag

  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.operations = []
          (_etype295, _size292) = iprot.readListBegin()
          for _i296 in xrange(_size292):
            _elem297 = MessageOperation()
            _elem297.read(iprot)
            self.operations.append(_elem297)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.endFlag = 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('MessageOperations')
    if self.operations is not None:
      oprot.writeFieldBegin('operations', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.operations))
      for iter298 in self.operations:
        iter298.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.endFlag is not None:
      oprot.writeFieldBegin('endFlag', TType.BOOL, 2)
      oprot.writeBool(self.endFlag)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.operations)
    value = (value * 31) ^ hash(self.endFlag)
    return value

  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 MessageStoreResult:
  """
  Attributes:
   - requestId
   - messageIds
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'requestId', None, None, ), # 1
    (2, TType.LIST, 'messageIds', (TType.STRING,None), None, ), # 2
  )

  def __init__(self, requestId=None, messageIds=None,):
    self.requestId = requestId
    self.messageIds = messageIds

  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.requestId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.messageIds = []
          (_etype302, _size299) = iprot.readListBegin()
          for _i303 in xrange(_size299):
            _elem304 = iprot.readString()
            self.messageIds.append(_elem304)
          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('MessageStoreResult')
    if self.requestId is not None:
      oprot.writeFieldBegin('requestId', TType.STRING, 1)
      oprot.writeString(self.requestId)
      oprot.writeFieldEnd()
    if self.messageIds is not None:
      oprot.writeFieldBegin('messageIds', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.messageIds))
      for iter305 in self.messageIds:
        oprot.writeString(iter305)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.requestId)
    value = (value * 31) ^ hash(self.messageIds)
    return value

  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 MetaProfile:
  """
  Attributes:
   - createTime
   - regionCode
   - identities
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'createTime', None, None, ), # 1
    (2, TType.STRING, 'regionCode', None, None, ), # 2
    (3, TType.MAP, 'identities', (TType.I32,None,TType.STRING,None), None, ), # 3
  )

  def __init__(self, createTime=None, regionCode=None, identities=None,):
    self.createTime = createTime
    self.regionCode = regionCode
    self.identities = identities

  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.createTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.regionCode = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.identities = {}
          (_ktype307, _vtype308, _size306 ) = iprot.readMapBegin()
          for _i310 in xrange(_size306):
            _key311 = iprot.readI32()
            _val312 = iprot.readString()
            self.identities[_key311] = _val312
          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('MetaProfile')
    if self.createTime is not None:
      oprot.writeFieldBegin('createTime', TType.I64, 1)
      oprot.writeI64(self.createTime)
      oprot.writeFieldEnd()
    if self.regionCode is not None:
      oprot.writeFieldBegin('regionCode', TType.STRING, 2)
      oprot.writeString(self.regionCode)
      oprot.writeFieldEnd()
    if self.identities is not None:
      oprot.writeFieldBegin('identities', TType.MAP, 3)
      oprot.writeMapBegin(TType.I32, TType.STRING, len(self.identities))
      for kiter313,viter314 in self.identities.items():
        oprot.writeI32(kiter313)
        oprot.writeString(viter314)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.createTime)
    value = (value * 31) ^ hash(self.regionCode)
    value = (value * 31) ^ hash(self.identities)
    return value

  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 NotificationItem:
  """
  Attributes:
   - id
   - _from
   - to
   - fromChannel
   - toChannel
   - revision
   - createdTime
   - content
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'id', None, None, ), # 1
    (2, TType.STRING, '_from', None, None, ), # 2
    (3, TType.STRING, 'to', None, None, ), # 3
    (4, TType.STRING, 'fromChannel', None, None, ), # 4
    (5, TType.STRING, 'toChannel', None, None, ), # 5
    None, # 6
    (7, TType.I64, 'revision', None, None, ), # 7
    (8, TType.I64, 'createdTime', None, None, ), # 8
    (9, TType.MAP, 'content', (TType.STRING,None,TType.STRING,None), None, ), # 9
  )

  def __init__(self, id=None, _from=None, to=None, fromChannel=None, toChannel=None, revision=None, createdTime=None, content=None,):
    self.id = id
    self._from = _from
    self.to = to
    self.fromChannel = fromChannel
    self.toChannel = toChannel
    self.revision = revision
    self.createdTime = createdTime
    self.content = content

  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._from = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.to = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.fromChannel = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.toChannel = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.MAP:
          self.content = {}
          (_ktype316, _vtype317, _size315 ) = iprot.readMapBegin()
          for _i319 in xrange(_size315):
            _key320 = iprot.readString()
            _val321 = iprot.readString()
            self.content[_key320] = _val321
          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('NotificationItem')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.STRING, 1)
      oprot.writeString(self.id)
      oprot.writeFieldEnd()
    if self._from is not None:
      oprot.writeFieldBegin('_from', TType.STRING, 2)
      oprot.writeString(self._from)
      oprot.writeFieldEnd()
    if self.to is not None:
      oprot.writeFieldBegin('to', TType.STRING, 3)
      oprot.writeString(self.to)
      oprot.writeFieldEnd()
    if self.fromChannel is not None:
      oprot.writeFieldBegin('fromChannel', TType.STRING, 4)
      oprot.writeString(self.fromChannel)
      oprot.writeFieldEnd()
    if self.toChannel is not None:
      oprot.writeFieldBegin('toChannel', TType.STRING, 5)
      oprot.writeString(self.toChannel)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 7)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 8)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    if self.content is not None:
      oprot.writeFieldBegin('content', TType.MAP, 9)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.content))
      for kiter322,viter323 in self.content.items():
        oprot.writeString(kiter322)
        oprot.writeString(viter323)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self._from)
    value = (value * 31) ^ hash(self.to)
    value = (value * 31) ^ hash(self.fromChannel)
    value = (value * 31) ^ hash(self.toChannel)
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.content)
    return value

  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 NotificationFetchResult:
  """
  Attributes:
   - fetchMode
   - itemList
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'fetchMode', None, None, ), # 1
    (2, TType.LIST, 'itemList', (TType.STRUCT,(NotificationItem, NotificationItem.thrift_spec)), None, ), # 2
  )

  def __init__(self, fetchMode=None, itemList=None,):
    self.fetchMode = fetchMode
    self.itemList = itemList

  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.fetchMode = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.itemList = []
          (_etype327, _size324) = iprot.readListBegin()
          for _i328 in xrange(_size324):
            _elem329 = NotificationItem()
            _elem329.read(iprot)
            self.itemList.append(_elem329)
          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('NotificationFetchResult')
    if self.fetchMode is not None:
      oprot.writeFieldBegin('fetchMode', TType.I32, 1)
      oprot.writeI32(self.fetchMode)
      oprot.writeFieldEnd()
    if self.itemList is not None:
      oprot.writeFieldBegin('itemList', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.itemList))
      for iter330 in self.itemList:
        iter330.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.fetchMode)
    value = (value * 31) ^ hash(self.itemList)
    return value

  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:
  """
  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 __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.reqSeq)
    value = (value * 31) ^ hash(self.checksum)
    value = (value * 31) ^ hash(self.status)
    value = (value * 31) ^ hash(self.param1)
    value = (value * 31) ^ hash(self.param2)
    value = (value * 31) ^ hash(self.param3)
    value = (value * 31) ^ hash(self.message)
    return value

  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 PaymentReservation:
  """
  Attributes:
   - receiverMid
   - productId
   - language
   - location
   - currency
   - price
   - appStoreCode
   - messageText
   - messageTemplate
   - packageId
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'receiverMid', None, None, ), # 1
    (2, TType.STRING, 'productId', None, None, ), # 2
    (3, TType.STRING, 'language', None, None, ), # 3
    (4, TType.STRING, 'location', None, None, ), # 4
    (5, TType.STRING, 'currency', None, None, ), # 5
    (6, TType.STRING, 'price', None, None, ), # 6
    (7, TType.I32, 'appStoreCode', None, None, ), # 7
    (8, TType.STRING, 'messageText', None, None, ), # 8
    (9, TType.I32, 'messageTemplate', None, None, ), # 9
    (10, TType.I64, 'packageId', None, None, ), # 10
  )

  def __init__(self, receiverMid=None, productId=None, language=None, location=None, currency=None, price=None, appStoreCode=None, messageText=None, messageTemplate=None, packageId=None,):
    self.receiverMid = receiverMid
    self.productId = productId
    self.language = language
    self.location = location
    self.currency = currency
    self.price = price
    self.appStoreCode = appStoreCode
    self.messageText = messageText
    self.messageTemplate = messageTemplate
    self.packageId = packageId

  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.receiverMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.productId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.language = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.location = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.currency = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.price = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.appStoreCode = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.messageText = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I32:
          self.messageTemplate = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I64:
          self.packageId = iprot.readI64()
        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('PaymentReservation')
    if self.receiverMid is not None:
      oprot.writeFieldBegin('receiverMid', TType.STRING, 1)
      oprot.writeString(self.receiverMid)
      oprot.writeFieldEnd()
    if self.productId is not None:
      oprot.writeFieldBegin('productId', TType.STRING, 2)
      oprot.writeString(self.productId)
      oprot.writeFieldEnd()
    if self.language is not None:
      oprot.writeFieldBegin('language', TType.STRING, 3)
      oprot.writeString(self.language)
      oprot.writeFieldEnd()
    if self.location is not None:
      oprot.writeFieldBegin('location', TType.STRING, 4)
      oprot.writeString(self.location)
      oprot.writeFieldEnd()
    if self.currency is not None:
      oprot.writeFieldBegin('currency', TType.STRING, 5)
      oprot.writeString(self.currency)
      oprot.writeFieldEnd()
    if self.price is not None:
      oprot.writeFieldBegin('price', TType.STRING, 6)
      oprot.writeString(self.price)
      oprot.writeFieldEnd()
    if self.appStoreCode is not None:
      oprot.writeFieldBegin('appStoreCode', TType.I32, 7)
      oprot.writeI32(self.appStoreCode)
      oprot.writeFieldEnd()
    if self.messageText is not None:
      oprot.writeFieldBegin('messageText', TType.STRING, 8)
      oprot.writeString(self.messageText)
      oprot.writeFieldEnd()
    if self.messageTemplate is not None:
      oprot.writeFieldBegin('messageTemplate', TType.I32, 9)
      oprot.writeI32(self.messageTemplate)
      oprot.writeFieldEnd()
    if self.packageId is not None:
      oprot.writeFieldBegin('packageId', TType.I64, 10)
      oprot.writeI64(self.packageId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.receiverMid)
    value = (value * 31) ^ hash(self.productId)
    value = (value * 31) ^ hash(self.language)
    value = (value * 31) ^ hash(self.location)
    value = (value * 31) ^ hash(self.currency)
    value = (value * 31) ^ hash(self.price)
    value = (value * 31) ^ hash(self.appStoreCode)
    value = (value * 31) ^ hash(self.messageText)
    value = (value * 31) ^ hash(self.messageTemplate)
    value = (value * 31) ^ hash(self.packageId)
    return value

  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 PaymentReservationResult:
  """
  Attributes:
   - orderId
   - confirmUrl
   - extras
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'orderId', None, None, ), # 1
    (2, TType.STRING, 'confirmUrl', None, None, ), # 2
    (3, TType.MAP, 'extras', (TType.STRING,None,TType.STRING,None), None, ), # 3
  )

  def __init__(self, orderId=None, confirmUrl=None, extras=None,):
    self.orderId = orderId
    self.confirmUrl = confirmUrl
    self.extras = extras

  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.orderId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.confirmUrl = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.extras = {}
          (_ktype332, _vtype333, _size331 ) = iprot.readMapBegin()
          for _i335 in xrange(_size331):
            _key336 = iprot.readString()
            _val337 = iprot.readString()
            self.extras[_key336] = _val337
          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('PaymentReservationResult')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.STRING, 1)
      oprot.writeString(self.orderId)
      oprot.writeFieldEnd()
    if self.confirmUrl is not None:
      oprot.writeFieldBegin('confirmUrl', TType.STRING, 2)
      oprot.writeString(self.confirmUrl)
      oprot.writeFieldEnd()
    if self.extras is not None:
      oprot.writeFieldBegin('extras', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extras))
      for kiter338,viter339 in self.extras.items():
        oprot.writeString(kiter338)
        oprot.writeString(viter339)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.orderId)
    value = (value * 31) ^ hash(self.confirmUrl)
    value = (value * 31) ^ hash(self.extras)
    return value

  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 Product:
  """
  Attributes:
   - productId
   - packageId
   - version
   - authorName
   - onSale
   - validDays
   - saleType
   - copyright
   - title
   - descriptionText
   - shopOrderId
   - fromMid
   - toMid
   - validUntil
   - priceTier
   - price
   - currency
   - currencySymbol
   - paymentType
   - createDate
   - ownFlag
   - eventType
   - urlSchema
   - downloadUrl
   - buddyMid
   - publishSince
   - newFlag
   - missionFlag
   - categories
   - missionButtonText
   - missionShortDescription
   - authorId
   - grantedByDefault
   - displayOrder
   - availableForPresent
   - availableForMyself
   - hasAnimation
   - hasSound
   - recommendationsEnabled
   - stickerResourceType
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'productId', None, None, ), # 1
    (2, TType.I64, 'packageId', None, None, ), # 2
    (3, TType.I32, 'version', None, None, ), # 3
    (4, TType.STRING, 'authorName', None, None, ), # 4
    (5, TType.BOOL, 'onSale', None, None, ), # 5
    (6, TType.I32, 'validDays', None, None, ), # 6
    (7, TType.I32, 'saleType', None, None, ), # 7
    (8, TType.STRING, 'copyright', None, None, ), # 8
    (9, TType.STRING, 'title', None, None, ), # 9
    (10, TType.STRING, 'descriptionText', None, None, ), # 10
    (11, TType.I64, 'shopOrderId', None, None, ), # 11
    (12, TType.STRING, 'fromMid', None, None, ), # 12
    (13, TType.STRING, 'toMid', None, None, ), # 13
    (14, TType.I64, 'validUntil', None, None, ), # 14
    (15, TType.I32, 'priceTier', None, None, ), # 15
    (16, TType.STRING, 'price', None, None, ), # 16
    (17, TType.STRING, 'currency', None, None, ), # 17
    (18, TType.STRING, 'currencySymbol', None, None, ), # 18
    (19, TType.I32, 'paymentType', None, None, ), # 19
    (20, TType.I64, 'createDate', None, None, ), # 20
    (21, TType.BOOL, 'ownFlag', None, None, ), # 21
    (22, TType.I32, 'eventType', None, None, ), # 22
    (23, TType.STRING, 'urlSchema', None, None, ), # 23
    (24, TType.STRING, 'downloadUrl', None, None, ), # 24
    (25, TType.STRING, 'buddyMid', None, None, ), # 25
    (26, TType.I64, 'publishSince', None, None, ), # 26
    (27, TType.BOOL, 'newFlag', None, None, ), # 27
    (28, TType.BOOL, 'missionFlag', None, None, ), # 28
    (29, TType.LIST, 'categories', (TType.STRUCT,(ProductCategory, ProductCategory.thrift_spec)), None, ), # 29
    (30, TType.STRING, 'missionButtonText', None, None, ), # 30
    (31, TType.STRING, 'missionShortDescription', None, None, ), # 31
    (32, TType.STRING, 'authorId', None, None, ), # 32
    None, # 33
    None, # 34
    None, # 35
    None, # 36
    None, # 37
    None, # 38
    None, # 39
    None, # 40
    (41, TType.BOOL, 'grantedByDefault', None, None, ), # 41
    (42, TType.I32, 'displayOrder', None, None, ), # 42
    (43, TType.BOOL, 'availableForPresent', None, None, ), # 43
    (44, TType.BOOL, 'availableForMyself', None, None, ), # 44
    None, # 45
    None, # 46
    None, # 47
    None, # 48
    None, # 49
    None, # 50
    (51, TType.BOOL, 'hasAnimation', None, None, ), # 51
    (52, TType.BOOL, 'hasSound', None, None, ), # 52
    (53, TType.BOOL, 'recommendationsEnabled', None, None, ), # 53
    (54, TType.I32, 'stickerResourceType', None, None, ), # 54
  )

  def __init__(self, productId=None, packageId=None, version=None, authorName=None, onSale=None, validDays=None, saleType=None, copyright=None, title=None, descriptionText=None, shopOrderId=None, fromMid=None, toMid=None, validUntil=None, priceTier=None, price=None, currency=None, currencySymbol=None, paymentType=None, createDate=None, ownFlag=None, eventType=None, urlSchema=None, downloadUrl=None, buddyMid=None, publishSince=None, newFlag=None, missionFlag=None, categories=None, missionButtonText=None, missionShortDescription=None, authorId=None, grantedByDefault=None, displayOrder=None, availableForPresent=None, availableForMyself=None, hasAnimation=None, hasSound=None, recommendationsEnabled=None, stickerResourceType=None,):
    self.productId = productId
    self.packageId = packageId
    self.version = version
    self.authorName = authorName
    self.onSale = onSale
    self.validDays = validDays
    self.saleType = saleType
    self.copyright = copyright
    self.title = title
    self.descriptionText = descriptionText
    self.shopOrderId = shopOrderId
    self.fromMid = fromMid
    self.toMid = toMid
    self.validUntil = validUntil
    self.priceTier = priceTier
    self.price = price
    self.currency = currency
    self.currencySymbol = currencySymbol
    self.paymentType = paymentType
    self.createDate = createDate
    self.ownFlag = ownFlag
    self.eventType = eventType
    self.urlSchema = urlSchema
    self.downloadUrl = downloadUrl
    self.buddyMid = buddyMid
    self.publishSince = publishSince
    self.newFlag = newFlag
    self.missionFlag = missionFlag
    self.categories = categories
    self.missionButtonText = missionButtonText
    self.missionShortDescription = missionShortDescription
    self.authorId = authorId
    self.grantedByDefault = grantedByDefault
    self.displayOrder = displayOrder
    self.availableForPresent = availableForPresent
    self.availableForMyself = availableForMyself
    self.hasAnimation = hasAnimation
    self.hasSound = hasSound
    self.recommendationsEnabled = recommendationsEnabled
    self.stickerResourceType = stickerResourceType

  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.productId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.packageId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.version = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.authorName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.onSale = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.validDays = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.saleType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.copyright = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.title = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.descriptionText = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.shopOrderId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.fromMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.STRING:
          self.toMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.I64:
          self.validUntil = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.I32:
          self.priceTier = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.STRING:
          self.price = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.STRING:
          self.currency = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.STRING:
          self.currencySymbol = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 19:
        if ftype == TType.I32:
          self.paymentType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.I64:
          self.createDate = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.BOOL:
          self.ownFlag = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.I32:
          self.eventType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 23:
        if ftype == TType.STRING:
          self.urlSchema = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 24:
        if ftype == TType.STRING:
          self.downloadUrl = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 25:
        if ftype == TType.STRING:
          self.buddyMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 26:
        if ftype == TType.I64:
          self.publishSince = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 27:
        if ftype == TType.BOOL:
          self.newFlag = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 28:
        if ftype == TType.BOOL:
          self.missionFlag = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 29:
        if ftype == TType.LIST:
          self.categories = []
          (_etype343, _size340) = iprot.readListBegin()
          for _i344 in xrange(_size340):
            _elem345 = ProductCategory()
            _elem345.read(iprot)
            self.categories.append(_elem345)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 30:
        if ftype == TType.STRING:
          self.missionButtonText = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 31:
        if ftype == TType.STRING:
          self.missionShortDescription = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 32:
        if ftype == TType.STRING:
          self.authorId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 41:
        if ftype == TType.BOOL:
          self.grantedByDefault = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 42:
        if ftype == TType.I32:
          self.displayOrder = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 43:
        if ftype == TType.BOOL:
          self.availableForPresent = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 44:
        if ftype == TType.BOOL:
          self.availableForMyself = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 51:
        if ftype == TType.BOOL:
          self.hasAnimation = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 52:
        if ftype == TType.BOOL:
          self.hasSound = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 53:
        if ftype == TType.BOOL:
          self.recommendationsEnabled = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 54:
        if ftype == TType.I32:
          self.stickerResourceType = 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('Product')
    if self.productId is not None:
      oprot.writeFieldBegin('productId', TType.STRING, 1)
      oprot.writeString(self.productId)
      oprot.writeFieldEnd()
    if self.packageId is not None:
      oprot.writeFieldBegin('packageId', TType.I64, 2)
      oprot.writeI64(self.packageId)
      oprot.writeFieldEnd()
    if self.version is not None:
      oprot.writeFieldBegin('version', TType.I32, 3)
      oprot.writeI32(self.version)
      oprot.writeFieldEnd()
    if self.authorName is not None:
      oprot.writeFieldBegin('authorName', TType.STRING, 4)
      oprot.writeString(self.authorName)
      oprot.writeFieldEnd()
    if self.onSale is not None:
      oprot.writeFieldBegin('onSale', TType.BOOL, 5)
      oprot.writeBool(self.onSale)
      oprot.writeFieldEnd()
    if self.validDays is not None:
      oprot.writeFieldBegin('validDays', TType.I32, 6)
      oprot.writeI32(self.validDays)
      oprot.writeFieldEnd()
    if self.saleType is not None:
      oprot.writeFieldBegin('saleType', TType.I32, 7)
      oprot.writeI32(self.saleType)
      oprot.writeFieldEnd()
    if self.copyright is not None:
      oprot.writeFieldBegin('copyright', TType.STRING, 8)
      oprot.writeString(self.copyright)
      oprot.writeFieldEnd()
    if self.title is not None:
      oprot.writeFieldBegin('title', TType.STRING, 9)
      oprot.writeString(self.title)
      oprot.writeFieldEnd()
    if self.descriptionText is not None:
      oprot.writeFieldBegin('descriptionText', TType.STRING, 10)
      oprot.writeString(self.descriptionText)
      oprot.writeFieldEnd()
    if self.shopOrderId is not None:
      oprot.writeFieldBegin('shopOrderId', TType.I64, 11)
      oprot.writeI64(self.shopOrderId)
      oprot.writeFieldEnd()
    if self.fromMid is not None:
      oprot.writeFieldBegin('fromMid', TType.STRING, 12)
      oprot.writeString(self.fromMid)
      oprot.writeFieldEnd()
    if self.toMid is not None:
      oprot.writeFieldBegin('toMid', TType.STRING, 13)
      oprot.writeString(self.toMid)
      oprot.writeFieldEnd()
    if self.validUntil is not None:
      oprot.writeFieldBegin('validUntil', TType.I64, 14)
      oprot.writeI64(self.validUntil)
      oprot.writeFieldEnd()
    if self.priceTier is not None:
      oprot.writeFieldBegin('priceTier', TType.I32, 15)
      oprot.writeI32(self.priceTier)
      oprot.writeFieldEnd()
    if self.price is not None:
      oprot.writeFieldBegin('price', TType.STRING, 16)
      oprot.writeString(self.price)
      oprot.writeFieldEnd()
    if self.currency is not None:
      oprot.writeFieldBegin('currency', TType.STRING, 17)
      oprot.writeString(self.currency)
      oprot.writeFieldEnd()
    if self.currencySymbol is not None:
      oprot.writeFieldBegin('currencySymbol', TType.STRING, 18)
      oprot.writeString(self.currencySymbol)
      oprot.writeFieldEnd()
    if self.paymentType is not None:
      oprot.writeFieldBegin('paymentType', TType.I32, 19)
      oprot.writeI32(self.paymentType)
      oprot.writeFieldEnd()
    if self.createDate is not None:
      oprot.writeFieldBegin('createDate', TType.I64, 20)
      oprot.writeI64(self.createDate)
      oprot.writeFieldEnd()
    if self.ownFlag is not None:
      oprot.writeFieldBegin('ownFlag', TType.BOOL, 21)
      oprot.writeBool(self.ownFlag)
      oprot.writeFieldEnd()
    if self.eventType is not None:
      oprot.writeFieldBegin('eventType', TType.I32, 22)
      oprot.writeI32(self.eventType)
      oprot.writeFieldEnd()
    if self.urlSchema is not None:
      oprot.writeFieldBegin('urlSchema', TType.STRING, 23)
      oprot.writeString(self.urlSchema)
      oprot.writeFieldEnd()
    if self.downloadUrl is not None:
      oprot.writeFieldBegin('downloadUrl', TType.STRING, 24)
      oprot.writeString(self.downloadUrl)
      oprot.writeFieldEnd()
    if self.buddyMid is not None:
      oprot.writeFieldBegin('buddyMid', TType.STRING, 25)
      oprot.writeString(self.buddyMid)
      oprot.writeFieldEnd()
    if self.publishSince is not None:
      oprot.writeFieldBegin('publishSince', TType.I64, 26)
      oprot.writeI64(self.publishSince)
      oprot.writeFieldEnd()
    if self.newFlag is not None:
      oprot.writeFieldBegin('newFlag', TType.BOOL, 27)
      oprot.writeBool(self.newFlag)
      oprot.writeFieldEnd()
    if self.missionFlag is not None:
      oprot.writeFieldBegin('missionFlag', TType.BOOL, 28)
      oprot.writeBool(self.missionFlag)
      oprot.writeFieldEnd()
    if self.categories is not None:
      oprot.writeFieldBegin('categories', TType.LIST, 29)
      oprot.writeListBegin(TType.STRUCT, len(self.categories))
      for iter346 in self.categories:
        iter346.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.missionButtonText is not None:
      oprot.writeFieldBegin('missionButtonText', TType.STRING, 30)
      oprot.writeString(self.missionButtonText)
      oprot.writeFieldEnd()
    if self.missionShortDescription is not None:
      oprot.writeFieldBegin('missionShortDescription', TType.STRING, 31)
      oprot.writeString(self.missionShortDescription)
      oprot.writeFieldEnd()
    if self.authorId is not None:
      oprot.writeFieldBegin('authorId', TType.STRING, 32)
      oprot.writeString(self.authorId)
      oprot.writeFieldEnd()
    if self.grantedByDefault is not None:
      oprot.writeFieldBegin('grantedByDefault', TType.BOOL, 41)
      oprot.writeBool(self.grantedByDefault)
      oprot.writeFieldEnd()
    if self.displayOrder is not None:
      oprot.writeFieldBegin('displayOrder', TType.I32, 42)
      oprot.writeI32(self.displayOrder)
      oprot.writeFieldEnd()
    if self.availableForPresent is not None:
      oprot.writeFieldBegin('availableForPresent', TType.BOOL, 43)
      oprot.writeBool(self.availableForPresent)
      oprot.writeFieldEnd()
    if self.availableForMyself is not None:
      oprot.writeFieldBegin('availableForMyself', TType.BOOL, 44)
      oprot.writeBool(self.availableForMyself)
      oprot.writeFieldEnd()
    if self.hasAnimation is not None:
      oprot.writeFieldBegin('hasAnimation', TType.BOOL, 51)
      oprot.writeBool(self.hasAnimation)
      oprot.writeFieldEnd()
    if self.hasSound is not None:
      oprot.writeFieldBegin('hasSound', TType.BOOL, 52)
      oprot.writeBool(self.hasSound)
      oprot.writeFieldEnd()
    if self.recommendationsEnabled is not None:
      oprot.writeFieldBegin('recommendationsEnabled', TType.BOOL, 53)
      oprot.writeBool(self.recommendationsEnabled)
      oprot.writeFieldEnd()
    if self.stickerResourceType is not None:
      oprot.writeFieldBegin('stickerResourceType', TType.I32, 54)
      oprot.writeI32(self.stickerResourceType)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.productId)
    value = (value * 31) ^ hash(self.packageId)
    value = (value * 31) ^ hash(self.version)
    value = (value * 31) ^ hash(self.authorName)
    value = (value * 31) ^ hash(self.onSale)
    value = (value * 31) ^ hash(self.validDays)
    value = (value * 31) ^ hash(self.saleType)
    value = (value * 31) ^ hash(self.copyright)
    value = (value * 31) ^ hash(self.title)
    value = (value * 31) ^ hash(self.descriptionText)
    value = (value * 31) ^ hash(self.shopOrderId)
    value = (value * 31) ^ hash(self.fromMid)
    value = (value * 31) ^ hash(self.toMid)
    value = (value * 31) ^ hash(self.validUntil)
    value = (value * 31) ^ hash(self.priceTier)
    value = (value * 31) ^ hash(self.price)
    value = (value * 31) ^ hash(self.currency)
    value = (value * 31) ^ hash(self.currencySymbol)
    value = (value * 31) ^ hash(self.paymentType)
    value = (value * 31) ^ hash(self.createDate)
    value = (value * 31) ^ hash(self.ownFlag)
    value = (value * 31) ^ hash(self.eventType)
    value = (value * 31) ^ hash(self.urlSchema)
    value = (value * 31) ^ hash(self.downloadUrl)
    value = (value * 31) ^ hash(self.buddyMid)
    value = (value * 31) ^ hash(self.publishSince)
    value = (value * 31) ^ hash(self.newFlag)
    value = (value * 31) ^ hash(self.missionFlag)
    value = (value * 31) ^ hash(self.categories)
    value = (value * 31) ^ hash(self.missionButtonText)
    value = (value * 31) ^ hash(self.missionShortDescription)
    value = (value * 31) ^ hash(self.authorId)
    value = (value * 31) ^ hash(self.grantedByDefault)
    value = (value * 31) ^ hash(self.displayOrder)
    value = (value * 31) ^ hash(self.availableForPresent)
    value = (value * 31) ^ hash(self.availableForMyself)
    value = (value * 31) ^ hash(self.hasAnimation)
    value = (value * 31) ^ hash(self.hasSound)
    value = (value * 31) ^ hash(self.recommendationsEnabled)
    value = (value * 31) ^ hash(self.stickerResourceType)
    return value

  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 ProductList:
  """
  Attributes:
   - hasNext
   - bannerSequence
   - bannerTargetType
   - bannerTargetPath
   - productList
   - bannerLang
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'hasNext', None, None, ), # 1
    None, # 2
    None, # 3
    (4, TType.I64, 'bannerSequence', None, None, ), # 4
    (5, TType.I32, 'bannerTargetType', None, None, ), # 5
    (6, TType.STRING, 'bannerTargetPath', None, None, ), # 6
    (7, TType.LIST, 'productList', (TType.STRUCT,(Product, Product.thrift_spec)), None, ), # 7
    (8, TType.STRING, 'bannerLang', None, None, ), # 8
  )

  def __init__(self, hasNext=None, bannerSequence=None, bannerTargetType=None, bannerTargetPath=None, productList=None, bannerLang=None,):
    self.hasNext = hasNext
    self.bannerSequence = bannerSequence
    self.bannerTargetType = bannerTargetType
    self.bannerTargetPath = bannerTargetPath
    self.productList = productList
    self.bannerLang = bannerLang

  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.BOOL:
          self.hasNext = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.bannerSequence = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.bannerTargetType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.bannerTargetPath = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.LIST:
          self.productList = []
          (_etype350, _size347) = iprot.readListBegin()
          for _i351 in xrange(_size347):
            _elem352 = Product()
            _elem352.read(iprot)
            self.productList.append(_elem352)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.bannerLang = 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('ProductList')
    if self.hasNext is not None:
      oprot.writeFieldBegin('hasNext', TType.BOOL, 1)
      oprot.writeBool(self.hasNext)
      oprot.writeFieldEnd()
    if self.bannerSequence is not None:
      oprot.writeFieldBegin('bannerSequence', TType.I64, 4)
      oprot.writeI64(self.bannerSequence)
      oprot.writeFieldEnd()
    if self.bannerTargetType is not None:
      oprot.writeFieldBegin('bannerTargetType', TType.I32, 5)
      oprot.writeI32(self.bannerTargetType)
      oprot.writeFieldEnd()
    if self.bannerTargetPath is not None:
      oprot.writeFieldBegin('bannerTargetPath', TType.STRING, 6)
      oprot.writeString(self.bannerTargetPath)
      oprot.writeFieldEnd()
    if self.productList is not None:
      oprot.writeFieldBegin('productList', TType.LIST, 7)
      oprot.writeListBegin(TType.STRUCT, len(self.productList))
      for iter353 in self.productList:
        iter353.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.bannerLang is not None:
      oprot.writeFieldBegin('bannerLang', TType.STRING, 8)
      oprot.writeString(self.bannerLang)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.hasNext)
    value = (value * 31) ^ hash(self.bannerSequence)
    value = (value * 31) ^ hash(self.bannerTargetType)
    value = (value * 31) ^ hash(self.bannerTargetPath)
    value = (value * 31) ^ hash(self.productList)
    value = (value * 31) ^ hash(self.bannerLang)
    return value

  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 StickerIdRange:
  """
  Attributes:
   - start
   - size
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'start', None, None, ), # 1
    (2, TType.I32, 'size', None, None, ), # 2
  )

  def __init__(self, start=None, size=None,):
    self.start = start
    self.size = size

  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.start = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.size = 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('StickerIdRange')
    if self.start is not None:
      oprot.writeFieldBegin('start', TType.I64, 1)
      oprot.writeI64(self.start)
      oprot.writeFieldEnd()
    if self.size is not None:
      oprot.writeFieldBegin('size', TType.I32, 2)
      oprot.writeI32(self.size)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.start)
    value = (value * 31) ^ hash(self.size)
    return value

  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 ProductSimple:
  """
  Attributes:
   - productId
   - packageId
   - version
   - onSale
   - validUntil
   - stickerIdRanges
   - grantedByDefault
   - displayOrder
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'productId', None, None, ), # 1
    (2, TType.I64, 'packageId', None, None, ), # 2
    (3, TType.I32, 'version', None, None, ), # 3
    (4, TType.BOOL, 'onSale', None, None, ), # 4
    (5, TType.I64, 'validUntil', None, None, ), # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.LIST, 'stickerIdRanges', (TType.STRUCT,(StickerIdRange, StickerIdRange.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
    None, # 31
    None, # 32
    None, # 33
    None, # 34
    None, # 35
    None, # 36
    None, # 37
    None, # 38
    None, # 39
    None, # 40
    (41, TType.BOOL, 'grantedByDefault', None, None, ), # 41
    (42, TType.I32, 'displayOrder', None, None, ), # 42
  )

  def __init__(self, productId=None, packageId=None, version=None, onSale=None, validUntil=None, stickerIdRanges=None, grantedByDefault=None, displayOrder=None,):
    self.productId = productId
    self.packageId = packageId
    self.version = version
    self.onSale = onSale
    self.validUntil = validUntil
    self.stickerIdRanges = stickerIdRanges
    self.grantedByDefault = grantedByDefault
    self.displayOrder = displayOrder

  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.productId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.packageId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.version = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.onSale = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.validUntil = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.LIST:
          self.stickerIdRanges = []
          (_etype357, _size354) = iprot.readListBegin()
          for _i358 in xrange(_size354):
            _elem359 = StickerIdRange()
            _elem359.read(iprot)
            self.stickerIdRanges.append(_elem359)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 41:
        if ftype == TType.BOOL:
          self.grantedByDefault = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 42:
        if ftype == TType.I32:
          self.displayOrder = 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('ProductSimple')
    if self.productId is not None:
      oprot.writeFieldBegin('productId', TType.STRING, 1)
      oprot.writeString(self.productId)
      oprot.writeFieldEnd()
    if self.packageId is not None:
      oprot.writeFieldBegin('packageId', TType.I64, 2)
      oprot.writeI64(self.packageId)
      oprot.writeFieldEnd()
    if self.version is not None:
      oprot.writeFieldBegin('version', TType.I32, 3)
      oprot.writeI32(self.version)
      oprot.writeFieldEnd()
    if self.onSale is not None:
      oprot.writeFieldBegin('onSale', TType.BOOL, 4)
      oprot.writeBool(self.onSale)
      oprot.writeFieldEnd()
    if self.validUntil is not None:
      oprot.writeFieldBegin('validUntil', TType.I64, 5)
      oprot.writeI64(self.validUntil)
      oprot.writeFieldEnd()
    if self.stickerIdRanges is not None:
      oprot.writeFieldBegin('stickerIdRanges', TType.LIST, 10)
      oprot.writeListBegin(TType.STRUCT, len(self.stickerIdRanges))
      for iter360 in self.stickerIdRanges:
        iter360.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.grantedByDefault is not None:
      oprot.writeFieldBegin('grantedByDefault', TType.BOOL, 41)
      oprot.writeBool(self.grantedByDefault)
      oprot.writeFieldEnd()
    if self.displayOrder is not None:
      oprot.writeFieldBegin('displayOrder', TType.I32, 42)
      oprot.writeI32(self.displayOrder)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.productId)
    value = (value * 31) ^ hash(self.packageId)
    value = (value * 31) ^ hash(self.version)
    value = (value * 31) ^ hash(self.onSale)
    value = (value * 31) ^ hash(self.validUntil)
    value = (value * 31) ^ hash(self.stickerIdRanges)
    value = (value * 31) ^ hash(self.grantedByDefault)
    value = (value * 31) ^ hash(self.displayOrder)
    return value

  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 ProductSimpleList:
  """
  Attributes:
   - hasNext
   - reinvokeHour
   - lastVersionSeq
   - productList
   - recentNewReleaseDate
   - recentEventReleaseDate
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'hasNext', None, None, ), # 1
    (2, TType.I32, 'reinvokeHour', None, None, ), # 2
    (3, TType.I64, 'lastVersionSeq', None, None, ), # 3
    (4, TType.LIST, 'productList', (TType.STRUCT,(ProductSimple, ProductSimple.thrift_spec)), None, ), # 4
    (5, TType.I64, 'recentNewReleaseDate', None, None, ), # 5
    (6, TType.I64, 'recentEventReleaseDate', None, None, ), # 6
  )

  def __init__(self, hasNext=None, reinvokeHour=None, lastVersionSeq=None, productList=None, recentNewReleaseDate=None, recentEventReleaseDate=None,):
    self.hasNext = hasNext
    self.reinvokeHour = reinvokeHour
    self.lastVersionSeq = lastVersionSeq
    self.productList = productList
    self.recentNewReleaseDate = recentNewReleaseDate
    self.recentEventReleaseDate = recentEventReleaseDate

  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.BOOL:
          self.hasNext = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.reinvokeHour = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.lastVersionSeq = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.productList = []
          (_etype364, _size361) = iprot.readListBegin()
          for _i365 in xrange(_size361):
            _elem366 = ProductSimple()
            _elem366.read(iprot)
            self.productList.append(_elem366)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.recentNewReleaseDate = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.recentEventReleaseDate = iprot.readI64()
        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('ProductSimpleList')
    if self.hasNext is not None:
      oprot.writeFieldBegin('hasNext', TType.BOOL, 1)
      oprot.writeBool(self.hasNext)
      oprot.writeFieldEnd()
    if self.reinvokeHour is not None:
      oprot.writeFieldBegin('reinvokeHour', TType.I32, 2)
      oprot.writeI32(self.reinvokeHour)
      oprot.writeFieldEnd()
    if self.lastVersionSeq is not None:
      oprot.writeFieldBegin('lastVersionSeq', TType.I64, 3)
      oprot.writeI64(self.lastVersionSeq)
      oprot.writeFieldEnd()
    if self.productList is not None:
      oprot.writeFieldBegin('productList', TType.LIST, 4)
      oprot.writeListBegin(TType.STRUCT, len(self.productList))
      for iter367 in self.productList:
        iter367.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.recentNewReleaseDate is not None:
      oprot.writeFieldBegin('recentNewReleaseDate', TType.I64, 5)
      oprot.writeI64(self.recentNewReleaseDate)
      oprot.writeFieldEnd()
    if self.recentEventReleaseDate is not None:
      oprot.writeFieldBegin('recentEventReleaseDate', TType.I64, 6)
      oprot.writeI64(self.recentEventReleaseDate)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.hasNext)
    value = (value * 31) ^ hash(self.reinvokeHour)
    value = (value * 31) ^ hash(self.lastVersionSeq)
    value = (value * 31) ^ hash(self.productList)
    value = (value * 31) ^ hash(self.recentNewReleaseDate)
    value = (value * 31) ^ hash(self.recentEventReleaseDate)
    return value

  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:
  """
  Attributes:
   - mid
   - userid
   - phone
   - email
   - regionCode
   - displayName
   - phoneticName
   - pictureStatus
   - thumbnailUrl
   - statusMessage
   - allowSearchByUserid
   - allowSearchByEmail
   - picturePath
   - musicProfile
   - videoProfile
  """

  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
    (23, TType.STRING, 'thumbnailUrl', None, 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
    (34, TType.STRING, 'musicProfile', None, None, ), # 34
    (35, TType.STRING, 'videoProfile', None, None, ), # 35
  )

  def __init__(self, mid=None, userid=None, phone=None, email=None, regionCode=None, displayName=None, phoneticName=None, pictureStatus=None, thumbnailUrl=None, statusMessage=None, allowSearchByUserid=None, allowSearchByEmail=None, picturePath=None, musicProfile=None, videoProfile=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.thumbnailUrl = thumbnailUrl
    self.statusMessage = statusMessage
    self.allowSearchByUserid = allowSearchByUserid
    self.allowSearchByEmail = allowSearchByEmail
    self.picturePath = picturePath
    self.musicProfile = musicProfile
    self.videoProfile = videoProfile

  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 == 23:
        if ftype == TType.STRING:
          self.thumbnailUrl = 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)
      elif fid == 34:
        if ftype == TType.STRING:
          self.musicProfile = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 35:
        if ftype == TType.STRING:
          self.videoProfile = 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.thumbnailUrl is not None:
      oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 23)
      oprot.writeString(self.thumbnailUrl)
      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()
    if self.musicProfile is not None:
      oprot.writeFieldBegin('musicProfile', TType.STRING, 34)
      oprot.writeString(self.musicProfile)
      oprot.writeFieldEnd()
    if self.videoProfile is not None:
      oprot.writeFieldBegin('videoProfile', TType.STRING, 35)
      oprot.writeString(self.videoProfile)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.userid)
    value = (value * 31) ^ hash(self.phone)
    value = (value * 31) ^ hash(self.email)
    value = (value * 31) ^ hash(self.regionCode)
    value = (value * 31) ^ hash(self.displayName)
    value = (value * 31) ^ hash(self.phoneticName)
    value = (value * 31) ^ hash(self.pictureStatus)
    value = (value * 31) ^ hash(self.thumbnailUrl)
    value = (value * 31) ^ hash(self.statusMessage)
    value = (value * 31) ^ hash(self.allowSearchByUserid)
    value = (value * 31) ^ hash(self.allowSearchByEmail)
    value = (value * 31) ^ hash(self.picturePath)
    value = (value * 31) ^ hash(self.musicProfile)
    value = (value * 31) ^ hash(self.videoProfile)
    return value

  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 ProximityMatchCandidateResult:
  """
  Attributes:
   - users
   - buddies
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'users', (TType.STRUCT,(Contact, Contact.thrift_spec)), None, ), # 1
    (2, TType.LIST, 'buddies', (TType.STRUCT,(Contact, Contact.thrift_spec)), None, ), # 2
  )

  def __init__(self, users=None, buddies=None,):
    self.users = users
    self.buddies = buddies

  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.users = []
          (_etype371, _size368) = iprot.readListBegin()
          for _i372 in xrange(_size368):
            _elem373 = Contact()
            _elem373.read(iprot)
            self.users.append(_elem373)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.buddies = []
          (_etype377, _size374) = iprot.readListBegin()
          for _i378 in xrange(_size374):
            _elem379 = Contact()
            _elem379.read(iprot)
            self.buddies.append(_elem379)
          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('ProximityMatchCandidateResult')
    if self.users is not None:
      oprot.writeFieldBegin('users', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.users))
      for iter380 in self.users:
        iter380.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.buddies is not None:
      oprot.writeFieldBegin('buddies', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.buddies))
      for iter381 in self.buddies:
        iter381.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.users)
    value = (value * 31) ^ hash(self.buddies)
    return value

  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 RegisterWithSnsIdResult:
  """
  Attributes:
   - authToken
   - userCreated
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'authToken', None, None, ), # 1
    (2, TType.BOOL, 'userCreated', None, None, ), # 2
  )

  def __init__(self, authToken=None, userCreated=None,):
    self.authToken = authToken
    self.userCreated = userCreated

  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.BOOL:
          self.userCreated = 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('RegisterWithSnsIdResult')
    if self.authToken is not None:
      oprot.writeFieldBegin('authToken', TType.STRING, 1)
      oprot.writeString(self.authToken)
      oprot.writeFieldEnd()
    if self.userCreated is not None:
      oprot.writeFieldBegin('userCreated', TType.BOOL, 2)
      oprot.writeBool(self.userCreated)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.authToken)
    value = (value * 31) ^ hash(self.userCreated)
    return value

  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 RequestTokenResponse:
  """
  Attributes:
   - requestToken
   - returnUrl
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'requestToken', None, None, ), # 1
    (2, TType.STRING, 'returnUrl', None, None, ), # 2
  )

  def __init__(self, requestToken=None, returnUrl=None,):
    self.requestToken = requestToken
    self.returnUrl = returnUrl

  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.requestToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.returnUrl = 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('RequestTokenResponse')
    if self.requestToken is not None:
      oprot.writeFieldBegin('requestToken', TType.STRING, 1)
      oprot.writeString(self.requestToken)
      oprot.writeFieldEnd()
    if self.returnUrl is not None:
      oprot.writeFieldBegin('returnUrl', TType.STRING, 2)
      oprot.writeString(self.returnUrl)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.requestToken)
    value = (value * 31) ^ hash(self.returnUrl)
    return value

  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:
  """
  Attributes:
   - mid
   - createdTime
   - contacts
   - notificationDisabled
   - memberMids
  """

  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
    None, # 32
    None, # 33
    None, # 34
    None, # 35
    None, # 36
    None, # 37
    None, # 38
    None, # 39
    (40, TType.LIST, 'memberMids', (TType.STRING,None), None, ), # 40
  )

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

  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 = []
          (_etype385, _size382) = iprot.readListBegin()
          for _i386 in xrange(_size382):
            _elem387 = Contact()
            _elem387.read(iprot)
            self.contacts.append(_elem387)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 31:
        if ftype == TType.BOOL:
          self.notificationDisabled = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 40:
        if ftype == TType.LIST:
          self.memberMids = []
          (_etype391, _size388) = iprot.readListBegin()
          for _i392 in xrange(_size388):
            _elem393 = iprot.readString()
            self.memberMids.append(_elem393)
          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('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 iter394 in self.contacts:
        iter394.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.notificationDisabled is not None:
      oprot.writeFieldBegin('notificationDisabled', TType.BOOL, 31)
      oprot.writeBool(self.notificationDisabled)
      oprot.writeFieldEnd()
    if self.memberMids is not None:
      oprot.writeFieldBegin('memberMids', TType.LIST, 40)
      oprot.writeListBegin(TType.STRING, len(self.memberMids))
      for iter395 in self.memberMids:
        oprot.writeString(iter395)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.contacts)
    value = (value * 31) ^ hash(self.notificationDisabled)
    value = (value * 31) ^ hash(self.memberMids)
    return value

  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 SuggestDictionary:
  """
  Attributes:
   - language
   - name
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'language', None, None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
  )

  def __init__(self, language=None, name=None,):
    self.language = language
    self.name = name

  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.language = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = 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('SuggestDictionary')
    if self.language is not None:
      oprot.writeFieldBegin('language', TType.STRING, 1)
      oprot.writeString(self.language)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.language)
    value = (value * 31) ^ hash(self.name)
    return value

  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 SuggestItemDictionaryIncrement:
  """
  Attributes:
   - status
   - revision
   - scheme
   - data
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'status', None, None, ), # 1
    (2, TType.I64, 'revision', None, None, ), # 2
    (3, TType.STRING, 'scheme', None, None, ), # 3
    (4, TType.STRING, 'data', None, None, ), # 4
  )

  def __init__(self, status=None, revision=None, scheme=None, data=None,):
    self.status = status
    self.revision = revision
    self.scheme = scheme
    self.data = data

  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.status = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.scheme = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.data = 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('SuggestItemDictionaryIncrement')
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 1)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 2)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.scheme is not None:
      oprot.writeFieldBegin('scheme', TType.STRING, 3)
      oprot.writeString(self.scheme)
      oprot.writeFieldEnd()
    if self.data is not None:
      oprot.writeFieldBegin('data', TType.STRING, 4)
      oprot.writeString(self.data)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.status)
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.scheme)
    value = (value * 31) ^ hash(self.data)
    return value

  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 SuggestTagDictionaryIncrement:
  """
  Attributes:
   - status
   - language
   - revision
   - scheme
   - data
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'status', None, None, ), # 1
    (2, TType.STRING, 'language', None, None, ), # 2
    (3, TType.I64, 'revision', None, None, ), # 3
    (4, TType.STRING, 'scheme', None, None, ), # 4
    (5, TType.STRING, 'data', None, None, ), # 5
  )

  def __init__(self, status=None, language=None, revision=None, scheme=None, data=None,):
    self.status = status
    self.language = language
    self.revision = revision
    self.scheme = scheme
    self.data = data

  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.status = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.language = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.scheme = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.data = 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('SuggestTagDictionaryIncrement')
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 1)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.language is not None:
      oprot.writeFieldBegin('language', TType.STRING, 2)
      oprot.writeString(self.language)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 3)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.scheme is not None:
      oprot.writeFieldBegin('scheme', TType.STRING, 4)
      oprot.writeString(self.scheme)
      oprot.writeFieldEnd()
    if self.data is not None:
      oprot.writeFieldBegin('data', TType.STRING, 5)
      oprot.writeString(self.data)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.status)
    value = (value * 31) ^ hash(self.language)
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.scheme)
    value = (value * 31) ^ hash(self.data)
    return value

  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 SuggestDictionaryIncrements:
  """
  Attributes:
   - itemIncrement
   - tagIncrements
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'itemIncrement', (SuggestItemDictionaryIncrement, SuggestItemDictionaryIncrement.thrift_spec), None, ), # 1
    (2, TType.LIST, 'tagIncrements', (TType.STRUCT,(SuggestTagDictionaryIncrement, SuggestTagDictionaryIncrement.thrift_spec)), None, ), # 2
  )

  def __init__(self, itemIncrement=None, tagIncrements=None,):
    self.itemIncrement = itemIncrement
    self.tagIncrements = tagIncrements

  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.itemIncrement = SuggestItemDictionaryIncrement()
          self.itemIncrement.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.tagIncrements = []
          (_etype399, _size396) = iprot.readListBegin()
          for _i400 in xrange(_size396):
            _elem401 = SuggestTagDictionaryIncrement()
            _elem401.read(iprot)
            self.tagIncrements.append(_elem401)
          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('SuggestDictionaryIncrements')
    if self.itemIncrement is not None:
      oprot.writeFieldBegin('itemIncrement', TType.STRUCT, 1)
      self.itemIncrement.write(oprot)
      oprot.writeFieldEnd()
    if self.tagIncrements is not None:
      oprot.writeFieldBegin('tagIncrements', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.tagIncrements))
      for iter402 in self.tagIncrements:
        iter402.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.itemIncrement)
    value = (value * 31) ^ hash(self.tagIncrements)
    return value

  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 SuggestItemDictionaryRevision:
  """
  Attributes:
   - revision
   - scheme
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'revision', None, None, ), # 1
    (2, TType.STRING, 'scheme', None, None, ), # 2
  )

  def __init__(self, revision=None, scheme=None,):
    self.revision = revision
    self.scheme = scheme

  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.STRING:
          self.scheme = 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('SuggestItemDictionaryRevision')
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 1)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.scheme is not None:
      oprot.writeFieldBegin('scheme', TType.STRING, 2)
      oprot.writeString(self.scheme)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.scheme)
    return value

  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 SuggestTagDictionaryRevision:
  """
  Attributes:
   - language
   - revision
   - scheme
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'language', None, None, ), # 1
    (2, TType.I64, 'revision', None, None, ), # 2
    (3, TType.STRING, 'scheme', None, None, ), # 3
  )

  def __init__(self, language=None, revision=None, scheme=None,):
    self.language = language
    self.revision = revision
    self.scheme = scheme

  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.language = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.scheme = 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('SuggestTagDictionaryRevision')
    if self.language is not None:
      oprot.writeFieldBegin('language', TType.STRING, 1)
      oprot.writeString(self.language)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 2)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.scheme is not None:
      oprot.writeFieldBegin('scheme', TType.STRING, 3)
      oprot.writeString(self.scheme)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.language)
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.scheme)
    return value

  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 SuggestDictionaryRevisions:
  """
  Attributes:
   - itemRevision
   - tagRevisions
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'itemRevision', (SuggestItemDictionaryRevision, SuggestItemDictionaryRevision.thrift_spec), None, ), # 1
    (2, TType.LIST, 'tagRevisions', (TType.STRUCT,(SuggestTagDictionaryRevision, SuggestTagDictionaryRevision.thrift_spec)), None, ), # 2
  )

  def __init__(self, itemRevision=None, tagRevisions=None,):
    self.itemRevision = itemRevision
    self.tagRevisions = tagRevisions

  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.itemRevision = SuggestItemDictionaryRevision()
          self.itemRevision.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.tagRevisions = []
          (_etype406, _size403) = iprot.readListBegin()
          for _i407 in xrange(_size403):
            _elem408 = SuggestTagDictionaryRevision()
            _elem408.read(iprot)
            self.tagRevisions.append(_elem408)
          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('SuggestDictionaryRevisions')
    if self.itemRevision is not None:
      oprot.writeFieldBegin('itemRevision', TType.STRUCT, 1)
      self.itemRevision.write(oprot)
      oprot.writeFieldEnd()
    if self.tagRevisions is not None:
      oprot.writeFieldBegin('tagRevisions', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.tagRevisions))
      for iter409 in self.tagRevisions:
        iter409.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.itemRevision)
    value = (value * 31) ^ hash(self.tagRevisions)
    return value

  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 SuggestDictionarySettings:
  """
  Attributes:
   - revision
   - newRevision
   - dictionaries
   - preloadedDictionaries
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'revision', None, None, ), # 1
    (2, TType.I64, 'newRevision', None, None, ), # 2
    (3, TType.LIST, 'dictionaries', (TType.STRUCT,(SuggestDictionary, SuggestDictionary.thrift_spec)), None, ), # 3
    (4, TType.LIST, 'preloadedDictionaries', (TType.STRING,None), None, ), # 4
  )

  def __init__(self, revision=None, newRevision=None, dictionaries=None, preloadedDictionaries=None,):
    self.revision = revision
    self.newRevision = newRevision
    self.dictionaries = dictionaries
    self.preloadedDictionaries = preloadedDictionaries

  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.newRevision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.dictionaries = []
          (_etype413, _size410) = iprot.readListBegin()
          for _i414 in xrange(_size410):
            _elem415 = SuggestDictionary()
            _elem415.read(iprot)
            self.dictionaries.append(_elem415)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.preloadedDictionaries = []
          (_etype419, _size416) = iprot.readListBegin()
          for _i420 in xrange(_size416):
            _elem421 = iprot.readString()
            self.preloadedDictionaries.append(_elem421)
          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('SuggestDictionarySettings')
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 1)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.newRevision is not None:
      oprot.writeFieldBegin('newRevision', TType.I64, 2)
      oprot.writeI64(self.newRevision)
      oprot.writeFieldEnd()
    if self.dictionaries is not None:
      oprot.writeFieldBegin('dictionaries', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.dictionaries))
      for iter422 in self.dictionaries:
        iter422.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.preloadedDictionaries is not None:
      oprot.writeFieldBegin('preloadedDictionaries', TType.LIST, 4)
      oprot.writeListBegin(TType.STRING, len(self.preloadedDictionaries))
      for iter423 in self.preloadedDictionaries:
        oprot.writeString(iter423)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.newRevision)
    value = (value * 31) ^ hash(self.dictionaries)
    value = (value * 31) ^ hash(self.preloadedDictionaries)
    return value

  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 PhoneInfoForChannel:
  """
  Attributes:
   - mid
   - normalizedPhoneNumber
   - allowedToSearchByPhoneNumber
   - allowedToReceiveMessageFromNonFriend
   - region
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.STRING, 'normalizedPhoneNumber', None, None, ), # 2
    (3, TType.BOOL, 'allowedToSearchByPhoneNumber', None, None, ), # 3
    (4, TType.BOOL, 'allowedToReceiveMessageFromNonFriend', None, None, ), # 4
    (5, TType.STRING, 'region', None, None, ), # 5
  )

  def __init__(self, mid=None, normalizedPhoneNumber=None, allowedToSearchByPhoneNumber=None, allowedToReceiveMessageFromNonFriend=None, region=None,):
    self.mid = mid
    self.normalizedPhoneNumber = normalizedPhoneNumber
    self.allowedToSearchByPhoneNumber = allowedToSearchByPhoneNumber
    self.allowedToReceiveMessageFromNonFriend = allowedToReceiveMessageFromNonFriend
    self.region = region

  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.STRING:
          self.normalizedPhoneNumber = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.allowedToSearchByPhoneNumber = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.allowedToReceiveMessageFromNonFriend = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.region = 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('PhoneInfoForChannel')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.normalizedPhoneNumber is not None:
      oprot.writeFieldBegin('normalizedPhoneNumber', TType.STRING, 2)
      oprot.writeString(self.normalizedPhoneNumber)
      oprot.writeFieldEnd()
    if self.allowedToSearchByPhoneNumber is not None:
      oprot.writeFieldBegin('allowedToSearchByPhoneNumber', TType.BOOL, 3)
      oprot.writeBool(self.allowedToSearchByPhoneNumber)
      oprot.writeFieldEnd()
    if self.allowedToReceiveMessageFromNonFriend is not None:
      oprot.writeFieldBegin('allowedToReceiveMessageFromNonFriend', TType.BOOL, 4)
      oprot.writeBool(self.allowedToReceiveMessageFromNonFriend)
      oprot.writeFieldEnd()
    if self.region is not None:
      oprot.writeFieldBegin('region', TType.STRING, 5)
      oprot.writeString(self.region)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.normalizedPhoneNumber)
    value = (value * 31) ^ hash(self.allowedToSearchByPhoneNumber)
    value = (value * 31) ^ hash(self.allowedToReceiveMessageFromNonFriend)
    value = (value * 31) ^ hash(self.region)
    return value

  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 PhoneVerificationResult:
  """
  Attributes:
   - verificationResult
   - accountMigrationCheckType
   - recommendAddFriends
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'verificationResult', None, None, ), # 1
    (2, TType.I32, 'accountMigrationCheckType', None, None, ), # 2
    (3, TType.BOOL, 'recommendAddFriends', None, None, ), # 3
  )

  def __init__(self, verificationResult=None, accountMigrationCheckType=None, recommendAddFriends=None,):
    self.verificationResult = verificationResult
    self.accountMigrationCheckType = accountMigrationCheckType
    self.recommendAddFriends = recommendAddFriends

  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.verificationResult = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.accountMigrationCheckType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.recommendAddFriends = 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('PhoneVerificationResult')
    if self.verificationResult is not None:
      oprot.writeFieldBegin('verificationResult', TType.I32, 1)
      oprot.writeI32(self.verificationResult)
      oprot.writeFieldEnd()
    if self.accountMigrationCheckType is not None:
      oprot.writeFieldBegin('accountMigrationCheckType', TType.I32, 2)
      oprot.writeI32(self.accountMigrationCheckType)
      oprot.writeFieldEnd()
    if self.recommendAddFriends is not None:
      oprot.writeFieldBegin('recommendAddFriends', TType.BOOL, 3)
      oprot.writeBool(self.recommendAddFriends)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.verificationResult)
    value = (value * 31) ^ hash(self.accountMigrationCheckType)
    value = (value * 31) ^ hash(self.recommendAddFriends)
    return value

  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 PlaceSearchInfo:
  """
  Attributes:
   - name
   - address
   - latitude
   - longitude
  """

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

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

  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.name = 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)
      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('PlaceSearchInfo')
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 1)
      oprot.writeString(self.name)
      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()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.address)
    value = (value * 31) ^ hash(self.latitude)
    value = (value * 31) ^ hash(self.longitude)
    return value

  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 RSAKey:
  """
  Attributes:
   - keynm
   - nvalue
   - evalue
   - sessionKey
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'keynm', None, None, ), # 1
    (2, TType.STRING, 'nvalue', None, None, ), # 2
    (3, TType.STRING, 'evalue', None, None, ), # 3
    (4, TType.STRING, 'sessionKey', None, None, ), # 4
  )

  def __init__(self, keynm=None, nvalue=None, evalue=None, sessionKey=None,):
    self.keynm = keynm
    self.nvalue = nvalue
    self.evalue = evalue
    self.sessionKey = sessionKey

  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.keynm = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.nvalue = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.evalue = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.sessionKey = 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('RSAKey')
    if self.keynm is not None:
      oprot.writeFieldBegin('keynm', TType.STRING, 1)
      oprot.writeString(self.keynm)
      oprot.writeFieldEnd()
    if self.nvalue is not None:
      oprot.writeFieldBegin('nvalue', TType.STRING, 2)
      oprot.writeString(self.nvalue)
      oprot.writeFieldEnd()
    if self.evalue is not None:
      oprot.writeFieldBegin('evalue', TType.STRING, 3)
      oprot.writeString(self.evalue)
      oprot.writeFieldEnd()
    if self.sessionKey is not None:
      oprot.writeFieldBegin('sessionKey', TType.STRING, 4)
      oprot.writeString(self.sessionKey)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.keynm)
    value = (value * 31) ^ hash(self.nvalue)
    value = (value * 31) ^ hash(self.evalue)
    value = (value * 31) ^ hash(self.sessionKey)
    return value

  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 SecurityCenterResult:
  """
  Attributes:
   - uri
   - token
   - cookiePath
   - skip
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'uri', None, None, ), # 1
    (2, TType.STRING, 'token', None, None, ), # 2
    (3, TType.STRING, 'cookiePath', None, None, ), # 3
    (4, TType.BOOL, 'skip', None, None, ), # 4
  )

  def __init__(self, uri=None, token=None, cookiePath=None, skip=None,):
    self.uri = uri
    self.token = token
    self.cookiePath = cookiePath
    self.skip = skip

  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.uri = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.token = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.cookiePath = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.skip = 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('SecurityCenterResult')
    if self.uri is not None:
      oprot.writeFieldBegin('uri', TType.STRING, 1)
      oprot.writeString(self.uri)
      oprot.writeFieldEnd()
    if self.token is not None:
      oprot.writeFieldBegin('token', TType.STRING, 2)
      oprot.writeString(self.token)
      oprot.writeFieldEnd()
    if self.cookiePath is not None:
      oprot.writeFieldBegin('cookiePath', TType.STRING, 3)
      oprot.writeString(self.cookiePath)
      oprot.writeFieldEnd()
    if self.skip is not None:
      oprot.writeFieldBegin('skip', TType.BOOL, 4)
      oprot.writeBool(self.skip)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.uri)
    value = (value * 31) ^ hash(self.token)
    value = (value * 31) ^ hash(self.cookiePath)
    value = (value * 31) ^ hash(self.skip)
    return value

  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 SendBuddyMessageResult:
  """
  Attributes:
   - requestId
   - state
   - messageId
   - eventNo
   - receiverCount
   - successCount
   - failCount
   - cancelCount
   - blockCount
   - unregisterCount
   - timestamp
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'requestId', None, None, ), # 1
    (2, TType.I32, 'state', None, None, ), # 2
    (3, TType.STRING, 'messageId', None, None, ), # 3
    (4, TType.I32, 'eventNo', None, None, ), # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.I64, 'receiverCount', None, None, ), # 11
    (12, TType.I64, 'successCount', None, None, ), # 12
    (13, TType.I64, 'failCount', None, None, ), # 13
    (14, TType.I64, 'cancelCount', None, None, ), # 14
    (15, TType.I64, 'blockCount', None, None, ), # 15
    (16, TType.I64, 'unregisterCount', None, None, ), # 16
    None, # 17
    None, # 18
    None, # 19
    None, # 20
    (21, TType.I64, 'timestamp', None, None, ), # 21
    (22, TType.STRING, 'message', None, None, ), # 22
  )

  def __init__(self, requestId=None, state=None, messageId=None, eventNo=None, receiverCount=None, successCount=None, failCount=None, cancelCount=None, blockCount=None, unregisterCount=None, timestamp=None, message=None,):
    self.requestId = requestId
    self.state = state
    self.messageId = messageId
    self.eventNo = eventNo
    self.receiverCount = receiverCount
    self.successCount = successCount
    self.failCount = failCount
    self.cancelCount = cancelCount
    self.blockCount = blockCount
    self.unregisterCount = unregisterCount
    self.timestamp = timestamp
    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.STRING:
          self.requestId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.state = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.messageId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.eventNo = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.receiverCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I64:
          self.successCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.I64:
          self.failCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.I64:
          self.cancelCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.I64:
          self.blockCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.I64:
          self.unregisterCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.I64:
          self.timestamp = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRING:
          self.message = 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('SendBuddyMessageResult')
    if self.requestId is not None:
      oprot.writeFieldBegin('requestId', TType.STRING, 1)
      oprot.writeString(self.requestId)
      oprot.writeFieldEnd()
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.I32, 2)
      oprot.writeI32(self.state)
      oprot.writeFieldEnd()
    if self.messageId is not None:
      oprot.writeFieldBegin('messageId', TType.STRING, 3)
      oprot.writeString(self.messageId)
      oprot.writeFieldEnd()
    if self.eventNo is not None:
      oprot.writeFieldBegin('eventNo', TType.I32, 4)
      oprot.writeI32(self.eventNo)
      oprot.writeFieldEnd()
    if self.receiverCount is not None:
      oprot.writeFieldBegin('receiverCount', TType.I64, 11)
      oprot.writeI64(self.receiverCount)
      oprot.writeFieldEnd()
    if self.successCount is not None:
      oprot.writeFieldBegin('successCount', TType.I64, 12)
      oprot.writeI64(self.successCount)
      oprot.writeFieldEnd()
    if self.failCount is not None:
      oprot.writeFieldBegin('failCount', TType.I64, 13)
      oprot.writeI64(self.failCount)
      oprot.writeFieldEnd()
    if self.cancelCount is not None:
      oprot.writeFieldBegin('cancelCount', TType.I64, 14)
      oprot.writeI64(self.cancelCount)
      oprot.writeFieldEnd()
    if self.blockCount is not None:
      oprot.writeFieldBegin('blockCount', TType.I64, 15)
      oprot.writeI64(self.blockCount)
      oprot.writeFieldEnd()
    if self.unregisterCount is not None:
      oprot.writeFieldBegin('unregisterCount', TType.I64, 16)
      oprot.writeI64(self.unregisterCount)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 21)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 22)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.requestId)
    value = (value * 31) ^ hash(self.state)
    value = (value * 31) ^ hash(self.messageId)
    value = (value * 31) ^ hash(self.eventNo)
    value = (value * 31) ^ hash(self.receiverCount)
    value = (value * 31) ^ hash(self.successCount)
    value = (value * 31) ^ hash(self.failCount)
    value = (value * 31) ^ hash(self.cancelCount)
    value = (value * 31) ^ hash(self.blockCount)
    value = (value * 31) ^ hash(self.unregisterCount)
    value = (value * 31) ^ hash(self.timestamp)
    value = (value * 31) ^ hash(self.message)
    return value

  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 SetBuddyOnAirResult:
  """
  Attributes:
   - requestId
   - state
   - eventNo
   - receiverCount
   - successCount
   - failCount
   - cancelCount
   - unregisterCount
   - timestamp
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'requestId', None, None, ), # 1
    (2, TType.I32, 'state', None, None, ), # 2
    (3, TType.I32, 'eventNo', None, None, ), # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.I64, 'receiverCount', None, None, ), # 11
    (12, TType.I64, 'successCount', None, None, ), # 12
    (13, TType.I64, 'failCount', None, None, ), # 13
    (14, TType.I64, 'cancelCount', None, None, ), # 14
    (15, TType.I64, 'unregisterCount', None, None, ), # 15
    None, # 16
    None, # 17
    None, # 18
    None, # 19
    None, # 20
    (21, TType.I64, 'timestamp', None, None, ), # 21
    (22, TType.STRING, 'message', None, None, ), # 22
  )

  def __init__(self, requestId=None, state=None, eventNo=None, receiverCount=None, successCount=None, failCount=None, cancelCount=None, unregisterCount=None, timestamp=None, message=None,):
    self.requestId = requestId
    self.state = state
    self.eventNo = eventNo
    self.receiverCount = receiverCount
    self.successCount = successCount
    self.failCount = failCount
    self.cancelCount = cancelCount
    self.unregisterCount = unregisterCount
    self.timestamp = timestamp
    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.STRING:
          self.requestId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.state = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.eventNo = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.receiverCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I64:
          self.successCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.I64:
          self.failCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.I64:
          self.cancelCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.I64:
          self.unregisterCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.I64:
          self.timestamp = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRING:
          self.message = 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('SetBuddyOnAirResult')
    if self.requestId is not None:
      oprot.writeFieldBegin('requestId', TType.STRING, 1)
      oprot.writeString(self.requestId)
      oprot.writeFieldEnd()
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.I32, 2)
      oprot.writeI32(self.state)
      oprot.writeFieldEnd()
    if self.eventNo is not None:
      oprot.writeFieldBegin('eventNo', TType.I32, 3)
      oprot.writeI32(self.eventNo)
      oprot.writeFieldEnd()
    if self.receiverCount is not None:
      oprot.writeFieldBegin('receiverCount', TType.I64, 11)
      oprot.writeI64(self.receiverCount)
      oprot.writeFieldEnd()
    if self.successCount is not None:
      oprot.writeFieldBegin('successCount', TType.I64, 12)
      oprot.writeI64(self.successCount)
      oprot.writeFieldEnd()
    if self.failCount is not None:
      oprot.writeFieldBegin('failCount', TType.I64, 13)
      oprot.writeI64(self.failCount)
      oprot.writeFieldEnd()
    if self.cancelCount is not None:
      oprot.writeFieldBegin('cancelCount', TType.I64, 14)
      oprot.writeI64(self.cancelCount)
      oprot.writeFieldEnd()
    if self.unregisterCount is not None:
      oprot.writeFieldBegin('unregisterCount', TType.I64, 15)
      oprot.writeI64(self.unregisterCount)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 21)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 22)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.requestId)
    value = (value * 31) ^ hash(self.state)
    value = (value * 31) ^ hash(self.eventNo)
    value = (value * 31) ^ hash(self.receiverCount)
    value = (value * 31) ^ hash(self.successCount)
    value = (value * 31) ^ hash(self.failCount)
    value = (value * 31) ^ hash(self.cancelCount)
    value = (value * 31) ^ hash(self.unregisterCount)
    value = (value * 31) ^ hash(self.timestamp)
    value = (value * 31) ^ hash(self.message)
    return value

  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 Settings:
  """
  Attributes:
   - notificationEnable
   - notificationMuteExpiration
   - notificationNewMessage
   - notificationGroupInvitation
   - notificationShowMessage
   - notificationIncomingCall
   - notificationSoundMessage
   - notificationSoundGroup
   - notificationDisabledWithSub
   - privacySyncContacts
   - privacySearchByPhoneNumber
   - privacySearchByUserid
   - privacySearchByEmail
   - privacyAllowSecondaryDeviceLogin
   - privacyProfileImagePostToMyhome
   - privacyReceiveMessagesFromNotFriend
   - contactMyTicket
   - identityProvider
   - identityIdentifier
   - snsAccounts
   - phoneRegistration
   - emailConfirmationStatus
   - preferenceLocale
   - customModes
   - e2eeEnable
   - hitokotoBackupRequested
   - privacyProfileMusicPostToMyhome
   - privacyAllowNearby
   - agreementNearbyTime
   - agreementSquareTime
   - notificationMention
   - botUseAgreementAcceptedAt
  """

  thrift_spec = (
    None, # 0
    None, # 1
    None, # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.BOOL, 'notificationEnable', None, None, ), # 10
    (11, TType.I64, 'notificationMuteExpiration', None, None, ), # 11
    (12, TType.BOOL, 'notificationNewMessage', None, None, ), # 12
    (13, TType.BOOL, 'notificationGroupInvitation', None, None, ), # 13
    (14, TType.BOOL, 'notificationShowMessage', None, None, ), # 14
    (15, TType.BOOL, 'notificationIncomingCall', None, None, ), # 15
    (16, TType.STRING, 'notificationSoundMessage', None, None, ), # 16
    (17, TType.STRING, 'notificationSoundGroup', None, None, ), # 17
    (18, TType.BOOL, 'notificationDisabledWithSub', None, None, ), # 18
    None, # 19
    (20, TType.BOOL, 'privacySyncContacts', None, None, ), # 20
    (21, TType.BOOL, 'privacySearchByPhoneNumber', None, None, ), # 21
    (22, TType.BOOL, 'privacySearchByUserid', None, None, ), # 22
    (23, TType.BOOL, 'privacySearchByEmail', None, None, ), # 23
    (24, TType.BOOL, 'privacyAllowSecondaryDeviceLogin', None, None, ), # 24
    (25, TType.BOOL, 'privacyProfileImagePostToMyhome', None, None, ), # 25
    (26, TType.BOOL, 'privacyReceiveMessagesFromNotFriend', None, None, ), # 26
    None, # 27
    None, # 28
    None, # 29
    (30, TType.STRING, 'contactMyTicket', None, None, ), # 30
    None, # 31
    None, # 32
    None, # 33
    None, # 34
    None, # 35
    None, # 36
    None, # 37
    None, # 38
    None, # 39
    (40, TType.I32, 'identityProvider', None, None, ), # 40
    (41, TType.STRING, 'identityIdentifier', None, None, ), # 41
    (42, TType.MAP, 'snsAccounts', (TType.I32,None,TType.STRING,None), None, ), # 42
    (43, TType.BOOL, 'phoneRegistration', None, None, ), # 43
    (44, TType.I32, 'emailConfirmationStatus', None, None, ), # 44
    None, # 45
    None, # 46
    None, # 47
    None, # 48
    None, # 49
    (50, TType.STRING, 'preferenceLocale', None, None, ), # 50
    None, # 51
    None, # 52
    None, # 53
    None, # 54
    None, # 55
    None, # 56
    None, # 57
    None, # 58
    None, # 59
    (60, TType.MAP, 'customModes', (TType.I32,None,TType.STRING,None), None, ), # 60
    (61, TType.BOOL, 'e2eeEnable', None, None, ), # 61
    (62, TType.BOOL, 'hitokotoBackupRequested', None, None, ), # 62
    (63, TType.BOOL, 'privacyProfileMusicPostToMyhome', None, None, ), # 63
    None, # 64
    (65, TType.BOOL, 'privacyAllowNearby', None, None, ), # 65
    (66, TType.I64, 'agreementNearbyTime', None, None, ), # 66
    (67, TType.I64, 'agreementSquareTime', None, None, ), # 67
    (68, TType.BOOL, 'notificationMention', None, None, ), # 68
    (69, TType.I64, 'botUseAgreementAcceptedAt', None, None, ), # 69
  )

  def __init__(self, notificationEnable=None, notificationMuteExpiration=None, notificationNewMessage=None, notificationGroupInvitation=None, notificationShowMessage=None, notificationIncomingCall=None, notificationSoundMessage=None, notificationSoundGroup=None, notificationDisabledWithSub=None, privacySyncContacts=None, privacySearchByPhoneNumber=None, privacySearchByUserid=None, privacySearchByEmail=None, privacyAllowSecondaryDeviceLogin=None, privacyProfileImagePostToMyhome=None, privacyReceiveMessagesFromNotFriend=None, contactMyTicket=None, identityProvider=None, identityIdentifier=None, snsAccounts=None, phoneRegistration=None, emailConfirmationStatus=None, preferenceLocale=None, customModes=None, e2eeEnable=None, hitokotoBackupRequested=None, privacyProfileMusicPostToMyhome=None, privacyAllowNearby=None, agreementNearbyTime=None, agreementSquareTime=None, notificationMention=None, botUseAgreementAcceptedAt=None,):
    self.notificationEnable = notificationEnable
    self.notificationMuteExpiration = notificationMuteExpiration
    self.notificationNewMessage = notificationNewMessage
    self.notificationGroupInvitation = notificationGroupInvitation
    self.notificationShowMessage = notificationShowMessage
    self.notificationIncomingCall = notificationIncomingCall
    self.notificationSoundMessage = notificationSoundMessage
    self.notificationSoundGroup = notificationSoundGroup
    self.notificationDisabledWithSub = notificationDisabledWithSub
    self.privacySyncContacts = privacySyncContacts
    self.privacySearchByPhoneNumber = privacySearchByPhoneNumber
    self.privacySearchByUserid = privacySearchByUserid
    self.privacySearchByEmail = privacySearchByEmail
    self.privacyAllowSecondaryDeviceLogin = privacyAllowSecondaryDeviceLogin
    self.privacyProfileImagePostToMyhome = privacyProfileImagePostToMyhome
    self.privacyReceiveMessagesFromNotFriend = privacyReceiveMessagesFromNotFriend
    self.contactMyTicket = contactMyTicket
    self.identityProvider = identityProvider
    self.identityIdentifier = identityIdentifier
    self.snsAccounts = snsAccounts
    self.phoneRegistration = phoneRegistration
    self.emailConfirmationStatus = emailConfirmationStatus
    self.preferenceLocale = preferenceLocale
    self.customModes = customModes
    self.e2eeEnable = e2eeEnable
    self.hitokotoBackupRequested = hitokotoBackupRequested
    self.privacyProfileMusicPostToMyhome = privacyProfileMusicPostToMyhome
    self.privacyAllowNearby = privacyAllowNearby
    self.agreementNearbyTime = agreementNearbyTime
    self.agreementSquareTime = agreementSquareTime
    self.notificationMention = notificationMention
    self.botUseAgreementAcceptedAt = botUseAgreementAcceptedAt

  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 == 10:
        if ftype == TType.BOOL:
          self.notificationEnable = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.notificationMuteExpiration = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.BOOL:
          self.notificationNewMessage = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.BOOL:
          self.notificationGroupInvitation = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.BOOL:
          self.notificationShowMessage = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.BOOL:
          self.notificationIncomingCall = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.STRING:
          self.notificationSoundMessage = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.STRING:
          self.notificationSoundGroup = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.BOOL:
          self.notificationDisabledWithSub = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.BOOL:
          self.privacySyncContacts = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.BOOL:
          self.privacySearchByPhoneNumber = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.BOOL:
          self.privacySearchByUserid = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 23:
        if ftype == TType.BOOL:
          self.privacySearchByEmail = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 24:
        if ftype == TType.BOOL:
          self.privacyAllowSecondaryDeviceLogin = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 25:
        if ftype == TType.BOOL:
          self.privacyProfileImagePostToMyhome = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 26:
        if ftype == TType.BOOL:
          self.privacyReceiveMessagesFromNotFriend = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 30:
        if ftype == TType.STRING:
          self.contactMyTicket = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 40:
        if ftype == TType.I32:
          self.identityProvider = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 41:
        if ftype == TType.STRING:
          self.identityIdentifier = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 42:
        if ftype == TType.MAP:
          self.snsAccounts = {}
          (_ktype425, _vtype426, _size424 ) = iprot.readMapBegin()
          for _i428 in xrange(_size424):
            _key429 = iprot.readI32()
            _val430 = iprot.readString()
            self.snsAccounts[_key429] = _val430
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 43:
        if ftype == TType.BOOL:
          self.phoneRegistration = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 44:
        if ftype == TType.I32:
          self.emailConfirmationStatus = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 50:
        if ftype == TType.STRING:
          self.preferenceLocale = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 60:
        if ftype == TType.MAP:
          self.customModes = {}
          (_ktype432, _vtype433, _size431 ) = iprot.readMapBegin()
          for _i435 in xrange(_size431):
            _key436 = iprot.readI32()
            _val437 = iprot.readString()
            self.customModes[_key436] = _val437
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 61:
        if ftype == TType.BOOL:
          self.e2eeEnable = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 62:
        if ftype == TType.BOOL:
          self.hitokotoBackupRequested = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 63:
        if ftype == TType.BOOL:
          self.privacyProfileMusicPostToMyhome = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 65:
        if ftype == TType.BOOL:
          self.privacyAllowNearby = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 66:
        if ftype == TType.I64:
          self.agreementNearbyTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 67:
        if ftype == TType.I64:
          self.agreementSquareTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 68:
        if ftype == TType.BOOL:
          self.notificationMention = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 69:
        if ftype == TType.I64:
          self.botUseAgreementAcceptedAt = iprot.readI64()
        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('Settings')
    if self.notificationEnable is not None:
      oprot.writeFieldBegin('notificationEnable', TType.BOOL, 10)
      oprot.writeBool(self.notificationEnable)
      oprot.writeFieldEnd()
    if self.notificationMuteExpiration is not None:
      oprot.writeFieldBegin('notificationMuteExpiration', TType.I64, 11)
      oprot.writeI64(self.notificationMuteExpiration)
      oprot.writeFieldEnd()
    if self.notificationNewMessage is not None:
      oprot.writeFieldBegin('notificationNewMessage', TType.BOOL, 12)
      oprot.writeBool(self.notificationNewMessage)
      oprot.writeFieldEnd()
    if self.notificationGroupInvitation is not None:
      oprot.writeFieldBegin('notificationGroupInvitation', TType.BOOL, 13)
      oprot.writeBool(self.notificationGroupInvitation)
      oprot.writeFieldEnd()
    if self.notificationShowMessage is not None:
      oprot.writeFieldBegin('notificationShowMessage', TType.BOOL, 14)
      oprot.writeBool(self.notificationShowMessage)
      oprot.writeFieldEnd()
    if self.notificationIncomingCall is not None:
      oprot.writeFieldBegin('notificationIncomingCall', TType.BOOL, 15)
      oprot.writeBool(self.notificationIncomingCall)
      oprot.writeFieldEnd()
    if self.notificationSoundMessage is not None:
      oprot.writeFieldBegin('notificationSoundMessage', TType.STRING, 16)
      oprot.writeString(self.notificationSoundMessage)
      oprot.writeFieldEnd()
    if self.notificationSoundGroup is not None:
      oprot.writeFieldBegin('notificationSoundGroup', TType.STRING, 17)
      oprot.writeString(self.notificationSoundGroup)
      oprot.writeFieldEnd()
    if self.notificationDisabledWithSub is not None:
      oprot.writeFieldBegin('notificationDisabledWithSub', TType.BOOL, 18)
      oprot.writeBool(self.notificationDisabledWithSub)
      oprot.writeFieldEnd()
    if self.privacySyncContacts is not None:
      oprot.writeFieldBegin('privacySyncContacts', TType.BOOL, 20)
      oprot.writeBool(self.privacySyncContacts)
      oprot.writeFieldEnd()
    if self.privacySearchByPhoneNumber is not None:
      oprot.writeFieldBegin('privacySearchByPhoneNumber', TType.BOOL, 21)
      oprot.writeBool(self.privacySearchByPhoneNumber)
      oprot.writeFieldEnd()
    if self.privacySearchByUserid is not None:
      oprot.writeFieldBegin('privacySearchByUserid', TType.BOOL, 22)
      oprot.writeBool(self.privacySearchByUserid)
      oprot.writeFieldEnd()
    if self.privacySearchByEmail is not None:
      oprot.writeFieldBegin('privacySearchByEmail', TType.BOOL, 23)
      oprot.writeBool(self.privacySearchByEmail)
      oprot.writeFieldEnd()
    if self.privacyAllowSecondaryDeviceLogin is not None:
      oprot.writeFieldBegin('privacyAllowSecondaryDeviceLogin', TType.BOOL, 24)
      oprot.writeBool(self.privacyAllowSecondaryDeviceLogin)
      oprot.writeFieldEnd()
    if self.privacyProfileImagePostToMyhome is not None:
      oprot.writeFieldBegin('privacyProfileImagePostToMyhome', TType.BOOL, 25)
      oprot.writeBool(self.privacyProfileImagePostToMyhome)
      oprot.writeFieldEnd()
    if self.privacyReceiveMessagesFromNotFriend is not None:
      oprot.writeFieldBegin('privacyReceiveMessagesFromNotFriend', TType.BOOL, 26)
      oprot.writeBool(self.privacyReceiveMessagesFromNotFriend)
      oprot.writeFieldEnd()
    if self.contactMyTicket is not None:
      oprot.writeFieldBegin('contactMyTicket', TType.STRING, 30)
      oprot.writeString(self.contactMyTicket)
      oprot.writeFieldEnd()
    if self.identityProvider is not None:
      oprot.writeFieldBegin('identityProvider', TType.I32, 40)
      oprot.writeI32(self.identityProvider)
      oprot.writeFieldEnd()
    if self.identityIdentifier is not None:
      oprot.writeFieldBegin('identityIdentifier', TType.STRING, 41)
      oprot.writeString(self.identityIdentifier)
      oprot.writeFieldEnd()
    if self.snsAccounts is not None:
      oprot.writeFieldBegin('snsAccounts', TType.MAP, 42)
      oprot.writeMapBegin(TType.I32, TType.STRING, len(self.snsAccounts))
      for kiter438,viter439 in self.snsAccounts.items():
        oprot.writeI32(kiter438)
        oprot.writeString(viter439)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.phoneRegistration is not None:
      oprot.writeFieldBegin('phoneRegistration', TType.BOOL, 43)
      oprot.writeBool(self.phoneRegistration)
      oprot.writeFieldEnd()
    if self.emailConfirmationStatus is not None:
      oprot.writeFieldBegin('emailConfirmationStatus', TType.I32, 44)
      oprot.writeI32(self.emailConfirmationStatus)
      oprot.writeFieldEnd()
    if self.preferenceLocale is not None:
      oprot.writeFieldBegin('preferenceLocale', TType.STRING, 50)
      oprot.writeString(self.preferenceLocale)
      oprot.writeFieldEnd()
    if self.customModes is not None:
      oprot.writeFieldBegin('customModes', TType.MAP, 60)
      oprot.writeMapBegin(TType.I32, TType.STRING, len(self.customModes))
      for kiter440,viter441 in self.customModes.items():
        oprot.writeI32(kiter440)
        oprot.writeString(viter441)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.e2eeEnable is not None:
      oprot.writeFieldBegin('e2eeEnable', TType.BOOL, 61)
      oprot.writeBool(self.e2eeEnable)
      oprot.writeFieldEnd()
    if self.hitokotoBackupRequested is not None:
      oprot.writeFieldBegin('hitokotoBackupRequested', TType.BOOL, 62)
      oprot.writeBool(self.hitokotoBackupRequested)
      oprot.writeFieldEnd()
    if self.privacyProfileMusicPostToMyhome is not None:
      oprot.writeFieldBegin('privacyProfileMusicPostToMyhome', TType.BOOL, 63)
      oprot.writeBool(self.privacyProfileMusicPostToMyhome)
      oprot.writeFieldEnd()
    if self.privacyAllowNearby is not None:
      oprot.writeFieldBegin('privacyAllowNearby', TType.BOOL, 65)
      oprot.writeBool(self.privacyAllowNearby)
      oprot.writeFieldEnd()
    if self.agreementNearbyTime is not None:
      oprot.writeFieldBegin('agreementNearbyTime', TType.I64, 66)
      oprot.writeI64(self.agreementNearbyTime)
      oprot.writeFieldEnd()
    if self.agreementSquareTime is not None:
      oprot.writeFieldBegin('agreementSquareTime', TType.I64, 67)
      oprot.writeI64(self.agreementSquareTime)
      oprot.writeFieldEnd()
    if self.notificationMention is not None:
      oprot.writeFieldBegin('notificationMention', TType.BOOL, 68)
      oprot.writeBool(self.notificationMention)
      oprot.writeFieldEnd()
    if self.botUseAgreementAcceptedAt is not None:
      oprot.writeFieldBegin('botUseAgreementAcceptedAt', TType.I64, 69)
      oprot.writeI64(self.botUseAgreementAcceptedAt)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.notificationEnable)
    value = (value * 31) ^ hash(self.notificationMuteExpiration)
    value = (value * 31) ^ hash(self.notificationNewMessage)
    value = (value * 31) ^ hash(self.notificationGroupInvitation)
    value = (value * 31) ^ hash(self.notificationShowMessage)
    value = (value * 31) ^ hash(self.notificationIncomingCall)
    value = (value * 31) ^ hash(self.notificationSoundMessage)
    value = (value * 31) ^ hash(self.notificationSoundGroup)
    value = (value * 31) ^ hash(self.notificationDisabledWithSub)
    value = (value * 31) ^ hash(self.privacySyncContacts)
    value = (value * 31) ^ hash(self.privacySearchByPhoneNumber)
    value = (value * 31) ^ hash(self.privacySearchByUserid)
    value = (value * 31) ^ hash(self.privacySearchByEmail)
    value = (value * 31) ^ hash(self.privacyAllowSecondaryDeviceLogin)
    value = (value * 31) ^ hash(self.privacyProfileImagePostToMyhome)
    value = (value * 31) ^ hash(self.privacyReceiveMessagesFromNotFriend)
    value = (value * 31) ^ hash(self.contactMyTicket)
    value = (value * 31) ^ hash(self.identityProvider)
    value = (value * 31) ^ hash(self.identityIdentifier)
    value = (value * 31) ^ hash(self.snsAccounts)
    value = (value * 31) ^ hash(self.phoneRegistration)
    value = (value * 31) ^ hash(self.emailConfirmationStatus)
    value = (value * 31) ^ hash(self.preferenceLocale)
    value = (value * 31) ^ hash(self.customModes)
    value = (value * 31) ^ hash(self.e2eeEnable)
    value = (value * 31) ^ hash(self.hitokotoBackupRequested)
    value = (value * 31) ^ hash(self.privacyProfileMusicPostToMyhome)
    value = (value * 31) ^ hash(self.privacyAllowNearby)
    value = (value * 31) ^ hash(self.agreementNearbyTime)
    value = (value * 31) ^ hash(self.agreementSquareTime)
    value = (value * 31) ^ hash(self.notificationMention)
    value = (value * 31) ^ hash(self.botUseAgreementAcceptedAt)
    return value

  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 SimpleChannelClient:
  """
  Attributes:
   - applicationType
   - applicationVersion
   - locale
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'applicationType', None, None, ), # 1
    (2, TType.STRING, 'applicationVersion', None, None, ), # 2
    (3, TType.STRING, 'locale', None, None, ), # 3
  )

  def __init__(self, applicationType=None, applicationVersion=None, locale=None,):
    self.applicationType = applicationType
    self.applicationVersion = applicationVersion
    self.locale = locale

  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.applicationType = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.applicationVersion = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.locale = 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('SimpleChannelClient')
    if self.applicationType is not None:
      oprot.writeFieldBegin('applicationType', TType.STRING, 1)
      oprot.writeString(self.applicationType)
      oprot.writeFieldEnd()
    if self.applicationVersion is not None:
      oprot.writeFieldBegin('applicationVersion', TType.STRING, 2)
      oprot.writeString(self.applicationVersion)
      oprot.writeFieldEnd()
    if self.locale is not None:
      oprot.writeFieldBegin('locale', TType.STRING, 3)
      oprot.writeString(self.locale)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.applicationType)
    value = (value * 31) ^ hash(self.applicationVersion)
    value = (value * 31) ^ hash(self.locale)
    return value

  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 SimpleChannelContact:
  """
  Attributes:
   - mid
   - displayName
   - pictureStatus
   - picturePath
   - statusMessage
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'mid', None, None, ), # 1
    (2, TType.STRING, 'displayName', None, None, ), # 2
    (3, TType.STRING, 'pictureStatus', None, None, ), # 3
    (4, TType.STRING, 'picturePath', None, None, ), # 4
    (5, TType.STRING, 'statusMessage', None, None, ), # 5
  )

  def __init__(self, mid=None, displayName=None, pictureStatus=None, picturePath=None, statusMessage=None,):
    self.mid = mid
    self.displayName = displayName
    self.pictureStatus = pictureStatus
    self.picturePath = picturePath
    self.statusMessage = statusMessage

  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.STRING:
          self.displayName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.pictureStatus = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.picturePath = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.statusMessage = 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('SimpleChannelContact')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 1)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 2)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.pictureStatus is not None:
      oprot.writeFieldBegin('pictureStatus', TType.STRING, 3)
      oprot.writeString(self.pictureStatus)
      oprot.writeFieldEnd()
    if self.picturePath is not None:
      oprot.writeFieldBegin('picturePath', TType.STRING, 4)
      oprot.writeString(self.picturePath)
      oprot.writeFieldEnd()
    if self.statusMessage is not None:
      oprot.writeFieldBegin('statusMessage', TType.STRING, 5)
      oprot.writeString(self.statusMessage)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.displayName)
    value = (value * 31) ^ hash(self.pictureStatus)
    value = (value * 31) ^ hash(self.picturePath)
    value = (value * 31) ^ hash(self.statusMessage)
    return value

  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 SnsFriend:
  """
  Attributes:
   - snsUserId
   - snsUserName
   - snsIdType
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'snsUserId', None, None, ), # 1
    (2, TType.STRING, 'snsUserName', None, None, ), # 2
    (3, TType.I32, 'snsIdType', None, None, ), # 3
  )

  def __init__(self, snsUserId=None, snsUserName=None, snsIdType=None,):
    self.snsUserId = snsUserId
    self.snsUserName = snsUserName
    self.snsIdType = snsIdType

  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.snsUserId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.snsUserName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.snsIdType = 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('SnsFriend')
    if self.snsUserId is not None:
      oprot.writeFieldBegin('snsUserId', TType.STRING, 1)
      oprot.writeString(self.snsUserId)
      oprot.writeFieldEnd()
    if self.snsUserName is not None:
      oprot.writeFieldBegin('snsUserName', TType.STRING, 2)
      oprot.writeString(self.snsUserName)
      oprot.writeFieldEnd()
    if self.snsIdType is not None:
      oprot.writeFieldBegin('snsIdType', TType.I32, 3)
      oprot.writeI32(self.snsIdType)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.snsUserId)
    value = (value * 31) ^ hash(self.snsUserName)
    value = (value * 31) ^ hash(self.snsIdType)
    return value

  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 SnsFriendContactRegistration:
  """
  Attributes:
   - contact
   - snsIdType
   - snsUserId
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'contact', (Contact, Contact.thrift_spec), None, ), # 1
    (2, TType.I32, 'snsIdType', None, None, ), # 2
    (3, TType.STRING, 'snsUserId', None, None, ), # 3
  )

  def __init__(self, contact=None, snsIdType=None, snsUserId=None,):
    self.contact = contact
    self.snsIdType = snsIdType
    self.snsUserId = snsUserId

  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.contact = Contact()
          self.contact.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.snsIdType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.snsUserId = 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('SnsFriendContactRegistration')
    if self.contact is not None:
      oprot.writeFieldBegin('contact', TType.STRUCT, 1)
      self.contact.write(oprot)
      oprot.writeFieldEnd()
    if self.snsIdType is not None:
      oprot.writeFieldBegin('snsIdType', TType.I32, 2)
      oprot.writeI32(self.snsIdType)
      oprot.writeFieldEnd()
    if self.snsUserId is not None:
      oprot.writeFieldBegin('snsUserId', TType.STRING, 3)
      oprot.writeString(self.snsUserId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.contact)
    value = (value * 31) ^ hash(self.snsIdType)
    value = (value * 31) ^ hash(self.snsUserId)
    return value

  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 SnsFriendModification:
  """
  Attributes:
   - type
   - snsFriend
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'type', None, None, ), # 1
    (2, TType.STRUCT, 'snsFriend', (SnsFriend, SnsFriend.thrift_spec), None, ), # 2
  )

  def __init__(self, type=None, snsFriend=None,):
    self.type = type
    self.snsFriend = snsFriend

  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.type = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.snsFriend = SnsFriend()
          self.snsFriend.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('SnsFriendModification')
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 1)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.snsFriend is not None:
      oprot.writeFieldBegin('snsFriend', TType.STRUCT, 2)
      self.snsFriend.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.snsFriend)
    return value

  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 SnsFriends:
  """
  Attributes:
   - snsFriends
   - hasMore
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'snsFriends', (TType.STRUCT,(SnsFriend, SnsFriend.thrift_spec)), None, ), # 1
    (2, TType.BOOL, 'hasMore', None, None, ), # 2
  )

  def __init__(self, snsFriends=None, hasMore=None,):
    self.snsFriends = snsFriends
    self.hasMore = hasMore

  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.snsFriends = []
          (_etype445, _size442) = iprot.readListBegin()
          for _i446 in xrange(_size442):
            _elem447 = SnsFriend()
            _elem447.read(iprot)
            self.snsFriends.append(_elem447)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.hasMore = 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('SnsFriends')
    if self.snsFriends is not None:
      oprot.writeFieldBegin('snsFriends', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.snsFriends))
      for iter448 in self.snsFriends:
        iter448.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.hasMore is not None:
      oprot.writeFieldBegin('hasMore', TType.BOOL, 2)
      oprot.writeBool(self.hasMore)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.snsFriends)
    value = (value * 31) ^ hash(self.hasMore)
    return value

  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 SnsIdUserStatus:
  """
  Attributes:
   - userExisting
   - phoneNumberRegistered
   - sameDevice
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'userExisting', None, None, ), # 1
    (2, TType.BOOL, 'phoneNumberRegistered', None, None, ), # 2
    (3, TType.BOOL, 'sameDevice', None, None, ), # 3
  )

  def __init__(self, userExisting=None, phoneNumberRegistered=None, sameDevice=None,):
    self.userExisting = userExisting
    self.phoneNumberRegistered = phoneNumberRegistered
    self.sameDevice = sameDevice

  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.BOOL:
          self.userExisting = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.phoneNumberRegistered = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.sameDevice = 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('SnsIdUserStatus')
    if self.userExisting is not None:
      oprot.writeFieldBegin('userExisting', TType.BOOL, 1)
      oprot.writeBool(self.userExisting)
      oprot.writeFieldEnd()
    if self.phoneNumberRegistered is not None:
      oprot.writeFieldBegin('phoneNumberRegistered', TType.BOOL, 2)
      oprot.writeBool(self.phoneNumberRegistered)
      oprot.writeFieldEnd()
    if self.sameDevice is not None:
      oprot.writeFieldBegin('sameDevice', TType.BOOL, 3)
      oprot.writeBool(self.sameDevice)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.userExisting)
    value = (value * 31) ^ hash(self.phoneNumberRegistered)
    value = (value * 31) ^ hash(self.sameDevice)
    return value

  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 SnsProfile:
  """
  Attributes:
   - snsUserId
   - snsUserName
   - email
   - thumbnailUrl
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'snsUserId', None, None, ), # 1
    (2, TType.STRING, 'snsUserName', None, None, ), # 2
    (3, TType.STRING, 'email', None, None, ), # 3
    (4, TType.STRING, 'thumbnailUrl', None, None, ), # 4
  )

  def __init__(self, snsUserId=None, snsUserName=None, email=None, thumbnailUrl=None,):
    self.snsUserId = snsUserId
    self.snsUserName = snsUserName
    self.email = email
    self.thumbnailUrl = thumbnailUrl

  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.snsUserId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.snsUserName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.email = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.thumbnailUrl = 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('SnsProfile')
    if self.snsUserId is not None:
      oprot.writeFieldBegin('snsUserId', TType.STRING, 1)
      oprot.writeString(self.snsUserId)
      oprot.writeFieldEnd()
    if self.snsUserName is not None:
      oprot.writeFieldBegin('snsUserName', TType.STRING, 2)
      oprot.writeString(self.snsUserName)
      oprot.writeFieldEnd()
    if self.email is not None:
      oprot.writeFieldBegin('email', TType.STRING, 3)
      oprot.writeString(self.email)
      oprot.writeFieldEnd()
    if self.thumbnailUrl is not None:
      oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 4)
      oprot.writeString(self.thumbnailUrl)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.snsUserId)
    value = (value * 31) ^ hash(self.snsUserName)
    value = (value * 31) ^ hash(self.email)
    value = (value * 31) ^ hash(self.thumbnailUrl)
    return value

  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 SystemConfiguration:
  """
  Attributes:
   - endpoint
   - endpointSsl
   - updateUrl
   - c2dmAccount
   - nniServer
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'endpoint', None, None, ), # 1
    (2, TType.STRING, 'endpointSsl', None, None, ), # 2
    (3, TType.STRING, 'updateUrl', None, None, ), # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.STRING, 'c2dmAccount', None, None, ), # 11
    (12, TType.STRING, 'nniServer', None, None, ), # 12
  )

  def __init__(self, endpoint=None, endpointSsl=None, updateUrl=None, c2dmAccount=None, nniServer=None,):
    self.endpoint = endpoint
    self.endpointSsl = endpointSsl
    self.updateUrl = updateUrl
    self.c2dmAccount = c2dmAccount
    self.nniServer = nniServer

  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.endpoint = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.endpointSsl = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.updateUrl = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.c2dmAccount = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.nniServer = 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('SystemConfiguration')
    if self.endpoint is not None:
      oprot.writeFieldBegin('endpoint', TType.STRING, 1)
      oprot.writeString(self.endpoint)
      oprot.writeFieldEnd()
    if self.endpointSsl is not None:
      oprot.writeFieldBegin('endpointSsl', TType.STRING, 2)
      oprot.writeString(self.endpointSsl)
      oprot.writeFieldEnd()
    if self.updateUrl is not None:
      oprot.writeFieldBegin('updateUrl', TType.STRING, 3)
      oprot.writeString(self.updateUrl)
      oprot.writeFieldEnd()
    if self.c2dmAccount is not None:
      oprot.writeFieldBegin('c2dmAccount', TType.STRING, 11)
      oprot.writeString(self.c2dmAccount)
      oprot.writeFieldEnd()
    if self.nniServer is not None:
      oprot.writeFieldBegin('nniServer', TType.STRING, 12)
      oprot.writeString(self.nniServer)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.endpoint)
    value = (value * 31) ^ hash(self.endpointSsl)
    value = (value * 31) ^ hash(self.updateUrl)
    value = (value * 31) ^ hash(self.c2dmAccount)
    value = (value * 31) ^ hash(self.nniServer)
    return value

  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 Ticket:
  """
  Attributes:
   - id
   - expirationTime
   - maxUseCount
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'id', None, None, ), # 1
    None, # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.I64, 'expirationTime', None, None, ), # 10
    None, # 11
    None, # 12
    None, # 13
    None, # 14
    None, # 15
    None, # 16
    None, # 17
    None, # 18
    None, # 19
    None, # 20
    (21, TType.I32, 'maxUseCount', None, None, ), # 21
  )

  def __init__(self, id=None, expirationTime=None, maxUseCount=None,):
    self.id = id
    self.expirationTime = expirationTime
    self.maxUseCount = maxUseCount

  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 == 10:
        if ftype == TType.I64:
          self.expirationTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.I32:
          self.maxUseCount = 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('Ticket')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.STRING, 1)
      oprot.writeString(self.id)
      oprot.writeFieldEnd()
    if self.expirationTime is not None:
      oprot.writeFieldBegin('expirationTime', TType.I64, 10)
      oprot.writeI64(self.expirationTime)
      oprot.writeFieldEnd()
    if self.maxUseCount is not None:
      oprot.writeFieldBegin('maxUseCount', TType.I32, 21)
      oprot.writeI32(self.maxUseCount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.expirationTime)
    value = (value * 31) ^ hash(self.maxUseCount)
    return value

  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 TMessageBox:
  """
  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 = []
          (_etype452, _size449) = iprot.readListBegin()
          for _i453 in xrange(_size449):
            _elem454 = Message()
            _elem454.read(iprot)
            self.lastMessages.append(_elem454)
          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('TMessageBox')
    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 iter455 in self.lastMessages:
        iter455.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.channelId)
    value = (value * 31) ^ hash(self.lastSeq)
    value = (value * 31) ^ hash(self.unreadCount)
    value = (value * 31) ^ hash(self.lastModifiedTime)
    value = (value * 31) ^ hash(self.status)
    value = (value * 31) ^ hash(self.midType)
    value = (value * 31) ^ hash(self.lastMessages)
    return value

  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 TMessageBoxWrapUp:
  """
  Attributes:
   - messageBox
   - name
   - contacts
   - pictureRevision
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'messageBox', (TMessageBox, TMessageBox.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 = TMessageBox()
          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 = []
          (_etype459, _size456) = iprot.readListBegin()
          for _i460 in xrange(_size456):
            _elem461 = Contact()
            _elem461.read(iprot)
            self.contacts.append(_elem461)
          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('TMessageBoxWrapUp')
    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 iter462 in self.contacts:
        iter462.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 __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.messageBox)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.contacts)
    value = (value * 31) ^ hash(self.pictureRevision)
    return value

  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 TMessageBoxWrapUpResponse:
  """
  Attributes:
   - messageBoxWrapUpList
   - totalSize
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'messageBoxWrapUpList', (TType.STRUCT,(TMessageBoxWrapUp, TMessageBoxWrapUp.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 = []
          (_etype466, _size463) = iprot.readListBegin()
          for _i467 in xrange(_size463):
            _elem468 = TMessageBoxWrapUp()
            _elem468.read(iprot)
            self.messageBoxWrapUpList.append(_elem468)
          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('TMessageBoxWrapUpResponse')
    if self.messageBoxWrapUpList is not None:
      oprot.writeFieldBegin('messageBoxWrapUpList', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.messageBoxWrapUpList))
      for iter469 in self.messageBoxWrapUpList:
        iter469.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 __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.messageBoxWrapUpList)
    value = (value * 31) ^ hash(self.totalSize)
    return value

  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 TMessageReadRangeEntry:
  """
  Attributes:
   - startMessageId
   - endMessageId
   - startTime
   - endTime
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'startMessageId', None, None, ), # 1
    (2, TType.I64, 'endMessageId', None, None, ), # 2
    (3, TType.I64, 'startTime', None, None, ), # 3
    (4, TType.I64, 'endTime', None, None, ), # 4
  )

  def __init__(self, startMessageId=None, endMessageId=None, startTime=None, endTime=None,):
    self.startMessageId = startMessageId
    self.endMessageId = endMessageId
    self.startTime = startTime
    self.endTime = endTime

  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.startMessageId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.endMessageId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.startTime = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.endTime = iprot.readI64()
        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('TMessageReadRangeEntry')
    if self.startMessageId is not None:
      oprot.writeFieldBegin('startMessageId', TType.I64, 1)
      oprot.writeI64(self.startMessageId)
      oprot.writeFieldEnd()
    if self.endMessageId is not None:
      oprot.writeFieldBegin('endMessageId', TType.I64, 2)
      oprot.writeI64(self.endMessageId)
      oprot.writeFieldEnd()
    if self.startTime is not None:
      oprot.writeFieldBegin('startTime', TType.I64, 3)
      oprot.writeI64(self.startTime)
      oprot.writeFieldEnd()
    if self.endTime is not None:
      oprot.writeFieldBegin('endTime', TType.I64, 4)
      oprot.writeI64(self.endTime)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.startMessageId)
    value = (value * 31) ^ hash(self.endMessageId)
    value = (value * 31) ^ hash(self.startTime)
    value = (value * 31) ^ hash(self.endTime)
    return value

  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 TMessageReadRange:
  """
  Attributes:
   - chatId
   - ranges
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'chatId', None, None, ), # 1
    (2, TType.MAP, 'ranges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(TMessageReadRangeEntry, TMessageReadRangeEntry.thrift_spec))), None, ), # 2
  )

  def __init__(self, chatId=None, ranges=None,):
    self.chatId = chatId
    self.ranges = ranges

  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.chatId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.ranges = {}
          (_ktype471, _vtype472, _size470 ) = iprot.readMapBegin()
          for _i474 in xrange(_size470):
            _key475 = iprot.readString()
            _val476 = []
            (_etype480, _size477) = iprot.readListBegin()
            for _i481 in xrange(_size477):
              _elem482 = TMessageReadRangeEntry()
              _elem482.read(iprot)
              _val476.append(_elem482)
            iprot.readListEnd()
            self.ranges[_key475] = _val476
          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('TMessageReadRange')
    if self.chatId is not None:
      oprot.writeFieldBegin('chatId', TType.STRING, 1)
      oprot.writeString(self.chatId)
      oprot.writeFieldEnd()
    if self.ranges is not None:
      oprot.writeFieldBegin('ranges', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.ranges))
      for kiter483,viter484 in self.ranges.items():
        oprot.writeString(kiter483)
        oprot.writeListBegin(TType.STRUCT, len(viter484))
        for iter485 in viter484:
          iter485.write(oprot)
        oprot.writeListEnd()
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.chatId)
    value = (value * 31) ^ hash(self.ranges)
    return value

  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 ChatRoomAnnouncementContents:
  """
  Attributes:
   - displayFields
   - text
   - link
   - thumbnail
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'displayFields', None, None, ), # 1
    (2, TType.STRING, 'text', None, None, ), # 2
    (3, TType.STRING, 'link', None, None, ), # 3
    (4, TType.STRING, 'thumbnail', None, None, ), # 4
  )

  def __init__(self, displayFields=None, text=None, link=None, thumbnail=None,):
    self.displayFields = displayFields
    self.text = text
    self.link = link
    self.thumbnail = thumbnail

  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.displayFields = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.text = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.link = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.thumbnail = 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('ChatRoomAnnouncementContents')
    if self.displayFields is not None:
      oprot.writeFieldBegin('displayFields', TType.I32, 1)
      oprot.writeI32(self.displayFields)
      oprot.writeFieldEnd()
    if self.text is not None:
      oprot.writeFieldBegin('text', TType.STRING, 2)
      oprot.writeString(self.text)
      oprot.writeFieldEnd()
    if self.link is not None:
      oprot.writeFieldBegin('link', TType.STRING, 3)
      oprot.writeString(self.link)
      oprot.writeFieldEnd()
    if self.thumbnail is not None:
      oprot.writeFieldBegin('thumbnail', TType.STRING, 4)
      oprot.writeString(self.thumbnail)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.displayFields)
    value = (value * 31) ^ hash(self.text)
    value = (value * 31) ^ hash(self.link)
    value = (value * 31) ^ hash(self.thumbnail)
    return value

  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 ChatRoomAnnouncement:
  """
  Attributes:
   - announcementSeq
   - type
   - contents
   - creatorMid
   - createdTime
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'announcementSeq', None, None, ), # 1
    (2, TType.I32, 'type', None, None, ), # 2
    (3, TType.STRUCT, 'contents', (ChatRoomAnnouncementContents, ChatRoomAnnouncementContents.thrift_spec), None, ), # 3
    (4, TType.STRING, 'creatorMid', None, None, ), # 4
    (5, TType.I64, 'createdTime', None, None, ), # 5
  )

  def __init__(self, announcementSeq=None, type=None, contents=None, creatorMid=None, createdTime=None,):
    self.announcementSeq = announcementSeq
    self.type = type
    self.contents = contents
    self.creatorMid = creatorMid
    self.createdTime = createdTime

  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.announcementSeq = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.type = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.contents = ChatRoomAnnouncementContents()
          self.contents.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.creatorMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.createdTime = iprot.readI64()
        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('ChatRoomAnnouncement')
    if self.announcementSeq is not None:
      oprot.writeFieldBegin('announcementSeq', TType.I64, 1)
      oprot.writeI64(self.announcementSeq)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 2)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.contents is not None:
      oprot.writeFieldBegin('contents', TType.STRUCT, 3)
      self.contents.write(oprot)
      oprot.writeFieldEnd()
    if self.creatorMid is not None:
      oprot.writeFieldBegin('creatorMid', TType.STRING, 4)
      oprot.writeString(self.creatorMid)
      oprot.writeFieldEnd()
    if self.createdTime is not None:
      oprot.writeFieldBegin('createdTime', TType.I64, 5)
      oprot.writeI64(self.createdTime)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.announcementSeq)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.contents)
    value = (value * 31) ^ hash(self.creatorMid)
    value = (value * 31) ^ hash(self.createdTime)
    return value

  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 ErrorExtraInfo:
  """
  Attributes:
   - preconditionFailedExtraInfo
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'preconditionFailedExtraInfo', None, None, ), # 1
  )

  def __init__(self, preconditionFailedExtraInfo=None,):
    self.preconditionFailedExtraInfo = preconditionFailedExtraInfo

  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.preconditionFailedExtraInfo = 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('ErrorExtraInfo')
    if self.preconditionFailedExtraInfo is not None:
      oprot.writeFieldBegin('preconditionFailedExtraInfo', TType.I32, 1)
      oprot.writeI32(self.preconditionFailedExtraInfo)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.preconditionFailedExtraInfo)
    return value

  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 SyncRelations:
  """
  Attributes:
   - syncAll
   - syncParamContact
   - syncParamMid
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'syncAll', None, None, ), # 1
    (2, TType.LIST, 'syncParamContact', (TType.STRUCT,(SyncParamContact, SyncParamContact.thrift_spec)), None, ), # 2
    (3, TType.LIST, 'syncParamMid', (TType.STRUCT,(SyncParamMid, SyncParamMid.thrift_spec)), None, ), # 3
  )

  def __init__(self, syncAll=None, syncParamContact=None, syncParamMid=None,):
    self.syncAll = syncAll
    self.syncParamContact = syncParamContact
    self.syncParamMid = syncParamMid

  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.BOOL:
          self.syncAll = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.syncParamContact = []
          (_etype489, _size486) = iprot.readListBegin()
          for _i490 in xrange(_size486):
            _elem491 = SyncParamContact()
            _elem491.read(iprot)
            self.syncParamContact.append(_elem491)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.syncParamMid = []
          (_etype495, _size492) = iprot.readListBegin()
          for _i496 in xrange(_size492):
            _elem497 = SyncParamMid()
            _elem497.read(iprot)
            self.syncParamMid.append(_elem497)
          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('SyncRelations')
    if self.syncAll is not None:
      oprot.writeFieldBegin('syncAll', TType.BOOL, 1)
      oprot.writeBool(self.syncAll)
      oprot.writeFieldEnd()
    if self.syncParamContact is not None:
      oprot.writeFieldBegin('syncParamContact', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.syncParamContact))
      for iter498 in self.syncParamContact:
        iter498.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.syncParamMid is not None:
      oprot.writeFieldBegin('syncParamMid', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.syncParamMid))
      for iter499 in self.syncParamMid:
        iter499.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.syncAll)
    value = (value * 31) ^ hash(self.syncParamContact)
    value = (value * 31) ^ hash(self.syncParamMid)
    return value

  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 SyncScope:
  """
  Attributes:
   - syncProfile
   - syncSettings
   - syncSticker
   - syncThemeShop
   - contact
   - group
   - room
   - chat
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'syncProfile', None, None, ), # 1
    (2, TType.BOOL, 'syncSettings', None, None, ), # 2
    (3, TType.BOOL, 'syncSticker', None, None, ), # 3
    (4, TType.BOOL, 'syncThemeShop', None, None, ), # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.STRUCT, 'contact', (SyncRelations, SyncRelations.thrift_spec), None, ), # 10
    (11, TType.STRUCT, 'group', (SyncRelations, SyncRelations.thrift_spec), None, ), # 11
    (12, TType.STRUCT, 'room', (SyncRelations, SyncRelations.thrift_spec), None, ), # 12
    (13, TType.STRUCT, 'chat', (SyncRelations, SyncRelations.thrift_spec), None, ), # 13
  )

  def __init__(self, syncProfile=None, syncSettings=None, syncSticker=None, syncThemeShop=None, contact=None, group=None, room=None, chat=None,):
    self.syncProfile = syncProfile
    self.syncSettings = syncSettings
    self.syncSticker = syncSticker
    self.syncThemeShop = syncThemeShop
    self.contact = contact
    self.group = group
    self.room = room
    self.chat = chat

  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.BOOL:
          self.syncProfile = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.syncSettings = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.syncSticker = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.syncThemeShop = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRUCT:
          self.contact = SyncRelations()
          self.contact.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRUCT:
          self.group = SyncRelations()
          self.group.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRUCT:
          self.room = SyncRelations()
          self.room.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.STRUCT:
          self.chat = SyncRelations()
          self.chat.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('SyncScope')
    if self.syncProfile is not None:
      oprot.writeFieldBegin('syncProfile', TType.BOOL, 1)
      oprot.writeBool(self.syncProfile)
      oprot.writeFieldEnd()
    if self.syncSettings is not None:
      oprot.writeFieldBegin('syncSettings', TType.BOOL, 2)
      oprot.writeBool(self.syncSettings)
      oprot.writeFieldEnd()
    if self.syncSticker is not None:
      oprot.writeFieldBegin('syncSticker', TType.BOOL, 3)
      oprot.writeBool(self.syncSticker)
      oprot.writeFieldEnd()
    if self.syncThemeShop is not None:
      oprot.writeFieldBegin('syncThemeShop', TType.BOOL, 4)
      oprot.writeBool(self.syncThemeShop)
      oprot.writeFieldEnd()
    if self.contact is not None:
      oprot.writeFieldBegin('contact', TType.STRUCT, 10)
      self.contact.write(oprot)
      oprot.writeFieldEnd()
    if self.group is not None:
      oprot.writeFieldBegin('group', TType.STRUCT, 11)
      self.group.write(oprot)
      oprot.writeFieldEnd()
    if self.room is not None:
      oprot.writeFieldBegin('room', TType.STRUCT, 12)
      self.room.write(oprot)
      oprot.writeFieldEnd()
    if self.chat is not None:
      oprot.writeFieldBegin('chat', TType.STRUCT, 13)
      self.chat.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.syncProfile)
    value = (value * 31) ^ hash(self.syncSettings)
    value = (value * 31) ^ hash(self.syncSticker)
    value = (value * 31) ^ hash(self.syncThemeShop)
    value = (value * 31) ^ hash(self.contact)
    value = (value * 31) ^ hash(self.group)
    value = (value * 31) ^ hash(self.room)
    value = (value * 31) ^ hash(self.chat)
    return value

  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 JoinSquareResponse:
  """
  Attributes:
   - square
   - squareAuthority
   - squareStatus
   - squareMember
   - squareFeatureSet
   - noteStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'squareAuthority', (SquareAuthority, SquareAuthority.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'squareStatus', (SquareStatus, SquareStatus.thrift_spec), None, ), # 3
    (4, TType.STRUCT, 'squareMember', (SquareMember, SquareMember.thrift_spec), None, ), # 4
    (5, TType.STRUCT, 'squareFeatureSet', (SquareFeatureSet, SquareFeatureSet.thrift_spec), None, ), # 5
    (6, TType.STRUCT, 'noteStatus', (NoteStatus, NoteStatus.thrift_spec), None, ), # 6
  )

  def __init__(self, square=None, squareAuthority=None, squareStatus=None, squareMember=None, squareFeatureSet=None, noteStatus=None,):
    self.square = square
    self.squareAuthority = squareAuthority
    self.squareStatus = squareStatus
    self.squareMember = squareMember
    self.squareFeatureSet = squareFeatureSet
    self.noteStatus = noteStatus

  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.square = Square()
          self.square.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareAuthority = SquareAuthority()
          self.squareAuthority.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareStatus = SquareStatus()
          self.squareStatus.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.squareMember = SquareMember()
          self.squareMember.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRUCT:
          self.squareFeatureSet = SquareFeatureSet()
          self.squareFeatureSet.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRUCT:
          self.noteStatus = NoteStatus()
          self.noteStatus.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('JoinSquareResponse')
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 1)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    if self.squareAuthority is not None:
      oprot.writeFieldBegin('squareAuthority', TType.STRUCT, 2)
      self.squareAuthority.write(oprot)
      oprot.writeFieldEnd()
    if self.squareStatus is not None:
      oprot.writeFieldBegin('squareStatus', TType.STRUCT, 3)
      self.squareStatus.write(oprot)
      oprot.writeFieldEnd()
    if self.squareMember is not None:
      oprot.writeFieldBegin('squareMember', TType.STRUCT, 4)
      self.squareMember.write(oprot)
      oprot.writeFieldEnd()
    if self.squareFeatureSet is not None:
      oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 5)
      self.squareFeatureSet.write(oprot)
      oprot.writeFieldEnd()
    if self.noteStatus is not None:
      oprot.writeFieldBegin('noteStatus', TType.STRUCT, 6)
      self.noteStatus.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.square)
    value = (value * 31) ^ hash(self.squareAuthority)
    value = (value * 31) ^ hash(self.squareStatus)
    value = (value * 31) ^ hash(self.squareMember)
    value = (value * 31) ^ hash(self.squareFeatureSet)
    value = (value * 31) ^ hash(self.noteStatus)
    return value

  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 JoinSquareRequest:
  """
  Attributes:
   - squareMid
   - member
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.STRUCT, 'member', (SquareMember, SquareMember.thrift_spec), None, ), # 3
  )

  def __init__(self, squareMid=None, member=None,):
    self.squareMid = squareMid
    self.member = member

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.member = SquareMember()
          self.member.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('JoinSquareRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.member is not None:
      oprot.writeFieldBegin('member', TType.STRUCT, 3)
      self.member.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.member)
    return value

  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 JoinSquareChatResponse:
  """
  Attributes:
   - squareChat
   - squareChatStatus
   - squareChatMember
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'squareChat', (SquareChat, SquareChat.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'squareChatStatus', (SquareChatStatus, SquareChatStatus.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'squareChatMember', (SquareChatMember, SquareChatMember.thrift_spec), None, ), # 3
  )

  def __init__(self, squareChat=None, squareChatStatus=None, squareChatMember=None,):
    self.squareChat = squareChat
    self.squareChatStatus = squareChatStatus
    self.squareChatMember = squareChatMember

  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.squareChat = SquareChat()
          self.squareChat.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareChatStatus = SquareChatStatus()
          self.squareChatStatus.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareChatMember = SquareChatMember()
          self.squareChatMember.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('JoinSquareChatResponse')
    if self.squareChat is not None:
      oprot.writeFieldBegin('squareChat', TType.STRUCT, 1)
      self.squareChat.write(oprot)
      oprot.writeFieldEnd()
    if self.squareChatStatus is not None:
      oprot.writeFieldBegin('squareChatStatus', TType.STRUCT, 2)
      self.squareChatStatus.write(oprot)
      oprot.writeFieldEnd()
    if self.squareChatMember is not None:
      oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 3)
      self.squareChatMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChat)
    value = (value * 31) ^ hash(self.squareChatStatus)
    value = (value * 31) ^ hash(self.squareChatMember)
    return value

  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 JoinSquareChatRequest:
  """
  Attributes:
   - squareChatMid
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
  )

  def __init__(self, squareChatMid=None,):
    self.squareChatMid = squareChatMid

  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.squareChatMid = 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('JoinSquareChatRequest')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    return value

  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 SendMessageResponse:
  """
  Attributes:
   - createdSquareMessage
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'createdSquareMessage', (SquareMessage, SquareMessage.thrift_spec), None, ), # 1
  )

  def __init__(self, createdSquareMessage=None,):
    self.createdSquareMessage = createdSquareMessage

  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.createdSquareMessage = SquareMessage()
          self.createdSquareMessage.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('SendMessageResponse')
    if self.createdSquareMessage is not None:
      oprot.writeFieldBegin('createdSquareMessage', TType.STRUCT, 1)
      self.createdSquareMessage.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.createdSquareMessage)
    return value

  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 SendMessageRequest:
  """
  Attributes:
   - reqSeq
   - squareChatMid
   - squareMessage
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'reqSeq', None, None, ), # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
    (3, TType.STRUCT, 'squareMessage', (SquareMessage, SquareMessage.thrift_spec), None, ), # 3
  )

  def __init__(self, reqSeq=None, squareChatMid=None, squareMessage=None,):
    self.reqSeq = reqSeq
    self.squareChatMid = squareChatMid
    self.squareMessage = squareMessage

  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.reqSeq = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareMessage = SquareMessage()
          self.squareMessage.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('SendMessageRequest')
    if self.reqSeq is not None:
      oprot.writeFieldBegin('reqSeq', TType.I32, 1)
      oprot.writeI32(self.reqSeq)
      oprot.writeFieldEnd()
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareMessage is not None:
      oprot.writeFieldBegin('squareMessage', TType.STRUCT, 3)
      self.squareMessage.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.reqSeq)
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareMessage)
    return value

  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 MarkAsReadRequest:
  """
  Attributes:
   - squareChatMid
   - messageId
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
    None, # 3
    (4, TType.STRING, 'messageId', None, None, ), # 4
  )

  def __init__(self, squareChatMid=None, messageId=None,):
    self.squareChatMid = squareChatMid
    self.messageId = messageId

  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 == 2:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.messageId = 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('MarkAsReadRequest')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.messageId is not None:
      oprot.writeFieldBegin('messageId', TType.STRING, 4)
      oprot.writeString(self.messageId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.messageId)
    return value

  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 MarkAsReadResponse:

  thrift_spec = (
  )

  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
      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('MarkAsReadResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 SubscriptionState:
  """
  Attributes:
   - subscriptionId
   - ttlMillis
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'subscriptionId', None, None, ), # 1
    (2, TType.I64, 'ttlMillis', None, None, ), # 2
  )

  def __init__(self, subscriptionId=None, ttlMillis=None,):
    self.subscriptionId = subscriptionId
    self.ttlMillis = ttlMillis

  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.subscriptionId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.ttlMillis = iprot.readI64()
        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('SubscriptionState')
    if self.subscriptionId is not None:
      oprot.writeFieldBegin('subscriptionId', TType.I64, 1)
      oprot.writeI64(self.subscriptionId)
      oprot.writeFieldEnd()
    if self.ttlMillis is not None:
      oprot.writeFieldBegin('ttlMillis', TType.I64, 2)
      oprot.writeI64(self.ttlMillis)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.subscriptionId)
    value = (value * 31) ^ hash(self.ttlMillis)
    return value

  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 ApproveSquareMembersResponse:
  """
  Attributes:
   - approvedMembers
   - status
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'approvedMembers', (TType.STRUCT,(SquareMember, SquareMember.thrift_spec)), None, ), # 1
    (2, TType.STRUCT, 'status', (SquareStatus, SquareStatus.thrift_spec), None, ), # 2
  )

  def __init__(self, approvedMembers=None, status=None,):
    self.approvedMembers = approvedMembers
    self.status = status

  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.approvedMembers = []
          (_etype503, _size500) = iprot.readListBegin()
          for _i504 in xrange(_size500):
            _elem505 = SquareMember()
            _elem505.read(iprot)
            self.approvedMembers.append(_elem505)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.status = SquareStatus()
          self.status.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('ApproveSquareMembersResponse')
    if self.approvedMembers is not None:
      oprot.writeFieldBegin('approvedMembers', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.approvedMembers))
      for iter506 in self.approvedMembers:
        iter506.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.STRUCT, 2)
      self.status.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.approvedMembers)
    value = (value * 31) ^ hash(self.status)
    return value

  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 ApproveSquareMembersRequest:
  """
  Attributes:
   - squareMid
   - requestedMemberMids
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.LIST, 'requestedMemberMids', (TType.STRING,None), None, ), # 3
  )

  def __init__(self, squareMid=None, requestedMemberMids=None,):
    self.squareMid = squareMid
    self.requestedMemberMids = requestedMemberMids

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.requestedMemberMids = []
          (_etype510, _size507) = iprot.readListBegin()
          for _i511 in xrange(_size507):
            _elem512 = iprot.readString()
            self.requestedMemberMids.append(_elem512)
          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('ApproveSquareMembersRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.requestedMemberMids is not None:
      oprot.writeFieldBegin('requestedMemberMids', TType.LIST, 3)
      oprot.writeListBegin(TType.STRING, len(self.requestedMemberMids))
      for iter513 in self.requestedMemberMids:
        oprot.writeString(iter513)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.requestedMemberMids)
    return value

  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 CreateSquareChatResponse:
  """
  Attributes:
   - squareChat
   - squareChatStatus
   - squareChatMember
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'squareChat', (SquareChat, SquareChat.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'squareChatStatus', (SquareChatStatus, SquareChatStatus.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'squareChatMember', (SquareChatMember, SquareChatMember.thrift_spec), None, ), # 3
  )

  def __init__(self, squareChat=None, squareChatStatus=None, squareChatMember=None,):
    self.squareChat = squareChat
    self.squareChatStatus = squareChatStatus
    self.squareChatMember = squareChatMember

  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.squareChat = SquareChat()
          self.squareChat.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareChatStatus = SquareChatStatus()
          self.squareChatStatus.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareChatMember = SquareChatMember()
          self.squareChatMember.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('CreateSquareChatResponse')
    if self.squareChat is not None:
      oprot.writeFieldBegin('squareChat', TType.STRUCT, 1)
      self.squareChat.write(oprot)
      oprot.writeFieldEnd()
    if self.squareChatStatus is not None:
      oprot.writeFieldBegin('squareChatStatus', TType.STRUCT, 2)
      self.squareChatStatus.write(oprot)
      oprot.writeFieldEnd()
    if self.squareChatMember is not None:
      oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 3)
      self.squareChatMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChat)
    value = (value * 31) ^ hash(self.squareChatStatus)
    value = (value * 31) ^ hash(self.squareChatMember)
    return value

  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 CreateSquareChatRequest:
  """
  Attributes:
   - reqSeq
   - squareChat
   - squareMemberMids
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'reqSeq', None, None, ), # 1
    (2, TType.STRUCT, 'squareChat', (SquareChat, SquareChat.thrift_spec), None, ), # 2
    (3, TType.LIST, 'squareMemberMids', (TType.STRING,None), None, ), # 3
  )

  def __init__(self, reqSeq=None, squareChat=None, squareMemberMids=None,):
    self.reqSeq = reqSeq
    self.squareChat = squareChat
    self.squareMemberMids = squareMemberMids

  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.reqSeq = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareChat = SquareChat()
          self.squareChat.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.squareMemberMids = []
          (_etype517, _size514) = iprot.readListBegin()
          for _i518 in xrange(_size514):
            _elem519 = iprot.readString()
            self.squareMemberMids.append(_elem519)
          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('CreateSquareChatRequest')
    if self.reqSeq is not None:
      oprot.writeFieldBegin('reqSeq', TType.I32, 1)
      oprot.writeI32(self.reqSeq)
      oprot.writeFieldEnd()
    if self.squareChat is not None:
      oprot.writeFieldBegin('squareChat', TType.STRUCT, 2)
      self.squareChat.write(oprot)
      oprot.writeFieldEnd()
    if self.squareMemberMids is not None:
      oprot.writeFieldBegin('squareMemberMids', TType.LIST, 3)
      oprot.writeListBegin(TType.STRING, len(self.squareMemberMids))
      for iter520 in self.squareMemberMids:
        oprot.writeString(iter520)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.reqSeq)
    value = (value * 31) ^ hash(self.squareChat)
    value = (value * 31) ^ hash(self.squareMemberMids)
    return value

  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 CreateSquareResponse:
  """
  Attributes:
   - square
   - creator
   - authority
   - status
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'creator', (SquareMember, SquareMember.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'authority', (SquareAuthority, SquareAuthority.thrift_spec), None, ), # 3
    (4, TType.STRUCT, 'status', (SquareStatus, SquareStatus.thrift_spec), None, ), # 4
  )

  def __init__(self, square=None, creator=None, authority=None, status=None,):
    self.square = square
    self.creator = creator
    self.authority = authority
    self.status = status

  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.square = Square()
          self.square.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.creator = SquareMember()
          self.creator.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.authority = SquareAuthority()
          self.authority.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.status = SquareStatus()
          self.status.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('CreateSquareResponse')
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 1)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    if self.creator is not None:
      oprot.writeFieldBegin('creator', TType.STRUCT, 2)
      self.creator.write(oprot)
      oprot.writeFieldEnd()
    if self.authority is not None:
      oprot.writeFieldBegin('authority', TType.STRUCT, 3)
      self.authority.write(oprot)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.STRUCT, 4)
      self.status.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.square)
    value = (value * 31) ^ hash(self.creator)
    value = (value * 31) ^ hash(self.authority)
    value = (value * 31) ^ hash(self.status)
    return value

  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 CreateSquareRequest:
  """
  Attributes:
   - reqSeq
   - square
   - creator
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'reqSeq', None, None, ), # 1
    (2, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'creator', (SquareMember, SquareMember.thrift_spec), None, ), # 3
  )

  def __init__(self, reqSeq=None, square=None, creator=None,):
    self.reqSeq = reqSeq
    self.square = square
    self.creator = creator

  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.reqSeq = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.square = Square()
          self.square.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.creator = SquareMember()
          self.creator.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('CreateSquareRequest')
    if self.reqSeq is not None:
      oprot.writeFieldBegin('reqSeq', TType.I32, 1)
      oprot.writeI32(self.reqSeq)
      oprot.writeFieldEnd()
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 2)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    if self.creator is not None:
      oprot.writeFieldBegin('creator', TType.STRUCT, 3)
      self.creator.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.reqSeq)
    value = (value * 31) ^ hash(self.square)
    value = (value * 31) ^ hash(self.creator)
    return value

  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 DeleteSquareResponse:

  thrift_spec = (
  )

  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
      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('DeleteSquareResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 DeleteSquareRequest:
  """
  Attributes:
   - mid
   - revision
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'mid', None, None, ), # 2
    (3, TType.I64, 'revision', None, None, ), # 3
  )

  def __init__(self, mid=None, revision=None,):
    self.mid = mid
    self.revision = revision

  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 == 2:
        if ftype == TType.STRING:
          self.mid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        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('DeleteSquareRequest')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 2)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 3)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    value = (value * 31) ^ hash(self.revision)
    return value

  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 DestroyMessageResponse:

  thrift_spec = (
  )

  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
      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('DestroyMessageResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 DestroyMessageRequest:
  """
  Attributes:
   - squareChatMid
   - messageId
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
    None, # 3
    (4, TType.STRING, 'messageId', None, None, ), # 4
  )

  def __init__(self, squareChatMid=None, messageId=None,):
    self.squareChatMid = squareChatMid
    self.messageId = messageId

  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 == 2:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.messageId = 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('DestroyMessageRequest')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.messageId is not None:
      oprot.writeFieldBegin('messageId', TType.STRING, 4)
      oprot.writeString(self.messageId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.messageId)
    return value

  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 GetSquareChatMembersRequest:
  """
  Attributes:
   - squareChatMid
   - continuationToken
   - limit
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRING, 'continuationToken', None, None, ), # 2
    (3, TType.I32, 'limit', None, None, ), # 3
  )

  def __init__(self, squareChatMid=None, continuationToken=None, limit=None,):
    self.squareChatMid = squareChatMid
    self.continuationToken = continuationToken
    self.limit = limit

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.limit = 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('GetSquareChatMembersRequest')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I32, 3)
      oprot.writeI32(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.limit)
    return value

  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 GetSquareChatMembersResponse:
  """
  Attributes:
   - squareChatMembers
   - continuationToken
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'squareChatMembers', (SquareMember, SquareMember.thrift_spec), None, ), # 1
    (2, TType.STRING, 'continuationToken', None, None, ), # 2
  )

  def __init__(self, squareChatMembers=None, continuationToken=None,):
    self.squareChatMembers = squareChatMembers
    self.continuationToken = continuationToken

  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.squareChatMembers = SquareMember()
          self.squareChatMembers.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.continuationToken = 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('GetSquareChatMembersResponse')
    if self.squareChatMembers is not None:
      oprot.writeFieldBegin('squareChatMembers', TType.STRUCT, 1)
      self.squareChatMembers.write(oprot)
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMembers)
    value = (value * 31) ^ hash(self.continuationToken)
    return value

  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 GetSquareChatStatusRequest:
  """
  Attributes:
   - squareChatMid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
  )

  def __init__(self, squareChatMid=None,):
    self.squareChatMid = squareChatMid

  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 == 2:
        if ftype == TType.STRING:
          self.squareChatMid = 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('GetSquareChatStatusRequest')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    return value

  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 GetSquareChatStatusResponse:
  """
  Attributes:
   - chatStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'chatStatus', (SquareChatStatus, SquareChatStatus.thrift_spec), None, ), # 1
  )

  def __init__(self, chatStatus=None,):
    self.chatStatus = chatStatus

  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.chatStatus = SquareChatStatus()
          self.chatStatus.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('GetSquareChatStatusResponse')
    if self.chatStatus is not None:
      oprot.writeFieldBegin('chatStatus', TType.STRUCT, 1)
      self.chatStatus.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.chatStatus)
    return value

  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 GetSquareChatRequest:
  """
  Attributes:
   - squareChatMid
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
  )

  def __init__(self, squareChatMid=None,):
    self.squareChatMid = squareChatMid

  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.squareChatMid = 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('GetSquareChatRequest')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    return value

  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 GetSquareChatResponse:
  """
  Attributes:
   - squareChat
   - squareChatMember
   - squareChatStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'squareChat', (SquareChat, SquareChat.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'squareChatMember', (SquareChatMember, SquareChatMember.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'squareChatStatus', (SquareChatStatus, SquareChatStatus.thrift_spec), None, ), # 3
  )

  def __init__(self, squareChat=None, squareChatMember=None, squareChatStatus=None,):
    self.squareChat = squareChat
    self.squareChatMember = squareChatMember
    self.squareChatStatus = squareChatStatus

  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.squareChat = SquareChat()
          self.squareChat.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareChatMember = SquareChatMember()
          self.squareChatMember.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareChatStatus = SquareChatStatus()
          self.squareChatStatus.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('GetSquareChatResponse')
    if self.squareChat is not None:
      oprot.writeFieldBegin('squareChat', TType.STRUCT, 1)
      self.squareChat.write(oprot)
      oprot.writeFieldEnd()
    if self.squareChatMember is not None:
      oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 2)
      self.squareChatMember.write(oprot)
      oprot.writeFieldEnd()
    if self.squareChatStatus is not None:
      oprot.writeFieldBegin('squareChatStatus', TType.STRUCT, 3)
      self.squareChatStatus.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChat)
    value = (value * 31) ^ hash(self.squareChatMember)
    value = (value * 31) ^ hash(self.squareChatStatus)
    return value

  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 GetSquareAuthorityRequest:
  """
  Attributes:
   - squareMid
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
  )

  def __init__(self, squareMid=None,):
    self.squareMid = squareMid

  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.squareMid = 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('GetSquareAuthorityRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    return value

  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 GetSquareAuthorityResponse:
  """
  Attributes:
   - authority
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'authority', (SquareAuthority, SquareAuthority.thrift_spec), None, ), # 1
  )

  def __init__(self, authority=None,):
    self.authority = authority

  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.authority = SquareAuthority()
          self.authority.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('GetSquareAuthorityResponse')
    if self.authority is not None:
      oprot.writeFieldBegin('authority', TType.STRUCT, 1)
      self.authority.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.authority)
    return value

  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 GetJoinedSquaresRequest:
  """
  Attributes:
   - continuationToken
   - limit
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'continuationToken', None, None, ), # 2
    (3, TType.I32, 'limit', None, None, ), # 3
  )

  def __init__(self, continuationToken=None, limit=None,):
    self.continuationToken = continuationToken
    self.limit = limit

  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 == 2:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.limit = 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('GetJoinedSquaresRequest')
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I32, 3)
      oprot.writeI32(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.limit)
    return value

  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 GetJoinedSquaresResponse:
  """
  Attributes:
   - squares
   - members
   - authorities
   - statuses
   - continuationToken
   - noteStatuses
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'squares', (TType.STRUCT,(Square, Square.thrift_spec)), None, ), # 1
    (2, TType.MAP, 'members', (TType.STRING,None,TType.STRUCT,(SquareMember, SquareMember.thrift_spec)), None, ), # 2
    (3, TType.MAP, 'authorities', (TType.STRING,None,TType.STRUCT,(SquareAuthority, SquareAuthority.thrift_spec)), None, ), # 3
    (4, TType.MAP, 'statuses', (TType.STRING,None,TType.STRUCT,(SquareStatus, SquareStatus.thrift_spec)), None, ), # 4
    (5, TType.STRING, 'continuationToken', None, None, ), # 5
    (6, TType.MAP, 'noteStatuses', (TType.STRING,None,TType.STRUCT,(NoteStatus, NoteStatus.thrift_spec)), None, ), # 6
  )

  def __init__(self, squares=None, members=None, authorities=None, statuses=None, continuationToken=None, noteStatuses=None,):
    self.squares = squares
    self.members = members
    self.authorities = authorities
    self.statuses = statuses
    self.continuationToken = continuationToken
    self.noteStatuses = noteStatuses

  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.squares = []
          (_etype524, _size521) = iprot.readListBegin()
          for _i525 in xrange(_size521):
            _elem526 = Square()
            _elem526.read(iprot)
            self.squares.append(_elem526)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.members = {}
          (_ktype528, _vtype529, _size527 ) = iprot.readMapBegin()
          for _i531 in xrange(_size527):
            _key532 = iprot.readString()
            _val533 = SquareMember()
            _val533.read(iprot)
            self.members[_key532] = _val533
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.authorities = {}
          (_ktype535, _vtype536, _size534 ) = iprot.readMapBegin()
          for _i538 in xrange(_size534):
            _key539 = iprot.readString()
            _val540 = SquareAuthority()
            _val540.read(iprot)
            self.authorities[_key539] = _val540
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.MAP:
          self.statuses = {}
          (_ktype542, _vtype543, _size541 ) = iprot.readMapBegin()
          for _i545 in xrange(_size541):
            _key546 = iprot.readString()
            _val547 = SquareStatus()
            _val547.read(iprot)
            self.statuses[_key546] = _val547
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.MAP:
          self.noteStatuses = {}
          (_ktype549, _vtype550, _size548 ) = iprot.readMapBegin()
          for _i552 in xrange(_size548):
            _key553 = iprot.readString()
            _val554 = NoteStatus()
            _val554.read(iprot)
            self.noteStatuses[_key553] = _val554
          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('GetJoinedSquaresResponse')
    if self.squares is not None:
      oprot.writeFieldBegin('squares', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.squares))
      for iter555 in self.squares:
        iter555.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.members is not None:
      oprot.writeFieldBegin('members', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.members))
      for kiter556,viter557 in self.members.items():
        oprot.writeString(kiter556)
        viter557.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.authorities is not None:
      oprot.writeFieldBegin('authorities', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.authorities))
      for kiter558,viter559 in self.authorities.items():
        oprot.writeString(kiter558)
        viter559.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.statuses is not None:
      oprot.writeFieldBegin('statuses', TType.MAP, 4)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.statuses))
      for kiter560,viter561 in self.statuses.items():
        oprot.writeString(kiter560)
        viter561.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 5)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.noteStatuses is not None:
      oprot.writeFieldBegin('noteStatuses', TType.MAP, 6)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.noteStatuses))
      for kiter562,viter563 in self.noteStatuses.items():
        oprot.writeString(kiter562)
        viter563.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squares)
    value = (value * 31) ^ hash(self.members)
    value = (value * 31) ^ hash(self.authorities)
    value = (value * 31) ^ hash(self.statuses)
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.noteStatuses)
    return value

  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 GetJoinableSquareChatsRequest:
  """
  Attributes:
   - squareMid
   - continuationToken
   - limit
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    None, # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.STRING, 'continuationToken', None, None, ), # 10
    (11, TType.I32, 'limit', None, None, ), # 11
  )

  def __init__(self, squareMid=None, continuationToken=None, limit=None,):
    self.squareMid = squareMid
    self.continuationToken = continuationToken
    self.limit = limit

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I32:
          self.limit = 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('GetJoinableSquareChatsRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 10)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I32, 11)
      oprot.writeI32(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.limit)
    return value

  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 GetJoinableSquareChatsResponse:
  """
  Attributes:
   - squareChats
   - continuationToken
   - totalSquareChatCount
   - squareChatStatuses
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'squareChats', (TType.STRUCT,(SquareChat, SquareChat.thrift_spec)), None, ), # 1
    (2, TType.STRING, 'continuationToken', None, None, ), # 2
    (3, TType.I32, 'totalSquareChatCount', None, None, ), # 3
    (4, TType.MAP, 'squareChatStatuses', (TType.STRING,None,TType.STRUCT,(SquareChatStatus, SquareChatStatus.thrift_spec)), None, ), # 4
  )

  def __init__(self, squareChats=None, continuationToken=None, totalSquareChatCount=None, squareChatStatuses=None,):
    self.squareChats = squareChats
    self.continuationToken = continuationToken
    self.totalSquareChatCount = totalSquareChatCount
    self.squareChatStatuses = squareChatStatuses

  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.squareChats = []
          (_etype567, _size564) = iprot.readListBegin()
          for _i568 in xrange(_size564):
            _elem569 = SquareChat()
            _elem569.read(iprot)
            self.squareChats.append(_elem569)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.totalSquareChatCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.MAP:
          self.squareChatStatuses = {}
          (_ktype571, _vtype572, _size570 ) = iprot.readMapBegin()
          for _i574 in xrange(_size570):
            _key575 = iprot.readString()
            _val576 = SquareChatStatus()
            _val576.read(iprot)
            self.squareChatStatuses[_key575] = _val576
          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('GetJoinableSquareChatsResponse')
    if self.squareChats is not None:
      oprot.writeFieldBegin('squareChats', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.squareChats))
      for iter577 in self.squareChats:
        iter577.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.totalSquareChatCount is not None:
      oprot.writeFieldBegin('totalSquareChatCount', TType.I32, 3)
      oprot.writeI32(self.totalSquareChatCount)
      oprot.writeFieldEnd()
    if self.squareChatStatuses is not None:
      oprot.writeFieldBegin('squareChatStatuses', TType.MAP, 4)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.squareChatStatuses))
      for kiter578,viter579 in self.squareChatStatuses.items():
        oprot.writeString(kiter578)
        viter579.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChats)
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.totalSquareChatCount)
    value = (value * 31) ^ hash(self.squareChatStatuses)
    return value

  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 GetInvitationTicketUrlRequest:
  """
  Attributes:
   - mid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'mid', None, None, ), # 2
  )

  def __init__(self, mid=None,):
    self.mid = mid

  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 == 2:
        if ftype == TType.STRING:
          self.mid = 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('GetInvitationTicketUrlRequest')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 2)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    return value

  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 GetInvitationTicketUrlResponse:
  """
  Attributes:
   - invitationURL
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'invitationURL', None, None, ), # 1
  )

  def __init__(self, invitationURL=None,):
    self.invitationURL = invitationURL

  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.invitationURL = 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('GetInvitationTicketUrlResponse')
    if self.invitationURL is not None:
      oprot.writeFieldBegin('invitationURL', TType.STRING, 1)
      oprot.writeString(self.invitationURL)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.invitationURL)
    return value

  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 LeaveSquareRequest:
  """
  Attributes:
   - squareMid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
  )

  def __init__(self, squareMid=None,):
    self.squareMid = squareMid

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = 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('LeaveSquareRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    return value

  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 LeaveSquareResponse:

  thrift_spec = (
  )

  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
      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('LeaveSquareResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 LeaveSquareChatRequest:
  """
  Attributes:
   - squareChatMid
   - sayGoodbye
   - squareChatMemberRevision
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
    (3, TType.BOOL, 'sayGoodbye', None, None, ), # 3
    (4, TType.I64, 'squareChatMemberRevision', None, None, ), # 4
  )

  def __init__(self, squareChatMid=None, sayGoodbye=None, squareChatMemberRevision=None,):
    self.squareChatMid = squareChatMid
    self.sayGoodbye = sayGoodbye
    self.squareChatMemberRevision = squareChatMemberRevision

  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 == 2:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.sayGoodbye = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.squareChatMemberRevision = iprot.readI64()
        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('LeaveSquareChatRequest')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.sayGoodbye is not None:
      oprot.writeFieldBegin('sayGoodbye', TType.BOOL, 3)
      oprot.writeBool(self.sayGoodbye)
      oprot.writeFieldEnd()
    if self.squareChatMemberRevision is not None:
      oprot.writeFieldBegin('squareChatMemberRevision', TType.I64, 4)
      oprot.writeI64(self.squareChatMemberRevision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.sayGoodbye)
    value = (value * 31) ^ hash(self.squareChatMemberRevision)
    return value

  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 LeaveSquareChatResponse:

  thrift_spec = (
  )

  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
      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('LeaveSquareChatResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 SquareMemberSearchOption:
  """
  Attributes:
   - membershipState
   - memberRoles
   - displayName
   - ableToReceiveMessage
   - ableToReceiveFriendRequest
   - chatMidToExcludeMembers
   - includingMe
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'membershipState', None, None, ), # 1
    (2, TType.SET, 'memberRoles', (TType.I32,None), None, ), # 2
    (3, TType.STRING, 'displayName', None, None, ), # 3
    (4, TType.I32, 'ableToReceiveMessage', None, None, ), # 4
    (5, TType.I32, 'ableToReceiveFriendRequest', None, None, ), # 5
    (6, TType.STRING, 'chatMidToExcludeMembers', None, None, ), # 6
    (7, TType.BOOL, 'includingMe', None, None, ), # 7
  )

  def __init__(self, membershipState=None, memberRoles=None, displayName=None, ableToReceiveMessage=None, ableToReceiveFriendRequest=None, chatMidToExcludeMembers=None, includingMe=None,):
    self.membershipState = membershipState
    self.memberRoles = memberRoles
    self.displayName = displayName
    self.ableToReceiveMessage = ableToReceiveMessage
    self.ableToReceiveFriendRequest = ableToReceiveFriendRequest
    self.chatMidToExcludeMembers = chatMidToExcludeMembers
    self.includingMe = includingMe

  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.membershipState = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.SET:
          self.memberRoles = set()
          (_etype583, _size580) = iprot.readSetBegin()
          for _i584 in xrange(_size580):
            _elem585 = iprot.readI32()
            self.memberRoles.add(_elem585)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.displayName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.ableToReceiveMessage = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.ableToReceiveFriendRequest = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.chatMidToExcludeMembers = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.BOOL:
          self.includingMe = 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('SquareMemberSearchOption')
    if self.membershipState is not None:
      oprot.writeFieldBegin('membershipState', TType.I32, 1)
      oprot.writeI32(self.membershipState)
      oprot.writeFieldEnd()
    if self.memberRoles is not None:
      oprot.writeFieldBegin('memberRoles', TType.SET, 2)
      oprot.writeSetBegin(TType.I32, len(self.memberRoles))
      for iter586 in self.memberRoles:
        oprot.writeI32(iter586)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 3)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.ableToReceiveMessage is not None:
      oprot.writeFieldBegin('ableToReceiveMessage', TType.I32, 4)
      oprot.writeI32(self.ableToReceiveMessage)
      oprot.writeFieldEnd()
    if self.ableToReceiveFriendRequest is not None:
      oprot.writeFieldBegin('ableToReceiveFriendRequest', TType.I32, 5)
      oprot.writeI32(self.ableToReceiveFriendRequest)
      oprot.writeFieldEnd()
    if self.chatMidToExcludeMembers is not None:
      oprot.writeFieldBegin('chatMidToExcludeMembers', TType.STRING, 6)
      oprot.writeString(self.chatMidToExcludeMembers)
      oprot.writeFieldEnd()
    if self.includingMe is not None:
      oprot.writeFieldBegin('includingMe', TType.BOOL, 7)
      oprot.writeBool(self.includingMe)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.membershipState)
    value = (value * 31) ^ hash(self.memberRoles)
    value = (value * 31) ^ hash(self.displayName)
    value = (value * 31) ^ hash(self.ableToReceiveMessage)
    value = (value * 31) ^ hash(self.ableToReceiveFriendRequest)
    value = (value * 31) ^ hash(self.chatMidToExcludeMembers)
    value = (value * 31) ^ hash(self.includingMe)
    return value

  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 SearchSquareMembersRequest:
  """
  Attributes:
   - squareMid
   - searchOption
   - continuationToken
   - limit
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.STRUCT, 'searchOption', (SquareMemberSearchOption, SquareMemberSearchOption.thrift_spec), None, ), # 3
    (4, TType.STRING, 'continuationToken', None, None, ), # 4
    (5, TType.I32, 'limit', None, None, ), # 5
  )

  def __init__(self, squareMid=None, searchOption=None, continuationToken=None, limit=None,):
    self.squareMid = squareMid
    self.searchOption = searchOption
    self.continuationToken = continuationToken
    self.limit = limit

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.searchOption = SquareMemberSearchOption()
          self.searchOption.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.limit = 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('SearchSquareMembersRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.searchOption is not None:
      oprot.writeFieldBegin('searchOption', TType.STRUCT, 3)
      self.searchOption.write(oprot)
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I32, 5)
      oprot.writeI32(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.searchOption)
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.limit)
    return value

  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 SearchSquareMembersResponse:
  """
  Attributes:
   - members
   - revision
   - continuationToken
   - totalCount
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'members', (TType.STRUCT,(SquareMember, SquareMember.thrift_spec)), None, ), # 1
    (2, TType.I64, 'revision', None, None, ), # 2
    (3, TType.STRING, 'continuationToken', None, None, ), # 3
    (4, TType.I32, 'totalCount', None, None, ), # 4
  )

  def __init__(self, members=None, revision=None, continuationToken=None, totalCount=None,):
    self.members = members
    self.revision = revision
    self.continuationToken = continuationToken
    self.totalCount = totalCount

  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.members = []
          (_etype590, _size587) = iprot.readListBegin()
          for _i591 in xrange(_size587):
            _elem592 = SquareMember()
            _elem592.read(iprot)
            self.members.append(_elem592)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.totalCount = 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('SearchSquareMembersResponse')
    if self.members is not None:
      oprot.writeFieldBegin('members', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.members))
      for iter593 in self.members:
        iter593.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 2)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 3)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.totalCount is not None:
      oprot.writeFieldBegin('totalCount', TType.I32, 4)
      oprot.writeI32(self.totalCount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.members)
    value = (value * 31) ^ hash(self.revision)
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.totalCount)
    return value

  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 FindSquareByInvitationTicketRequest:
  """
  Attributes:
   - invitationTicket
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'invitationTicket', None, None, ), # 2
  )

  def __init__(self, invitationTicket=None,):
    self.invitationTicket = invitationTicket

  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 == 2:
        if ftype == TType.STRING:
          self.invitationTicket = 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('FindSquareByInvitationTicketRequest')
    if self.invitationTicket is not None:
      oprot.writeFieldBegin('invitationTicket', TType.STRING, 2)
      oprot.writeString(self.invitationTicket)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.invitationTicket)
    return value

  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 FindSquareByInvitationTicketResponse:
  """
  Attributes:
   - square
   - myMembership
   - squareAuthority
   - squareStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'myMembership', (SquareMember, SquareMember.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'squareAuthority', (SquareAuthority, SquareAuthority.thrift_spec), None, ), # 3
    (4, TType.STRUCT, 'squareStatus', (SquareStatus, SquareStatus.thrift_spec), None, ), # 4
  )

  def __init__(self, square=None, myMembership=None, squareAuthority=None, squareStatus=None,):
    self.square = square
    self.myMembership = myMembership
    self.squareAuthority = squareAuthority
    self.squareStatus = squareStatus

  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.square = Square()
          self.square.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.myMembership = SquareMember()
          self.myMembership.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareAuthority = SquareAuthority()
          self.squareAuthority.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.squareStatus = SquareStatus()
          self.squareStatus.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('FindSquareByInvitationTicketResponse')
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 1)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    if self.myMembership is not None:
      oprot.writeFieldBegin('myMembership', TType.STRUCT, 2)
      self.myMembership.write(oprot)
      oprot.writeFieldEnd()
    if self.squareAuthority is not None:
      oprot.writeFieldBegin('squareAuthority', TType.STRUCT, 3)
      self.squareAuthority.write(oprot)
      oprot.writeFieldEnd()
    if self.squareStatus is not None:
      oprot.writeFieldBegin('squareStatus', TType.STRUCT, 4)
      self.squareStatus.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.square)
    value = (value * 31) ^ hash(self.myMembership)
    value = (value * 31) ^ hash(self.squareAuthority)
    value = (value * 31) ^ hash(self.squareStatus)
    return value

  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 SquareEventReceiveMessage:
  """
  Attributes:
   - squareChatMid
   - squareMessage
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRUCT, 'squareMessage', (SquareMessage, SquareMessage.thrift_spec), None, ), # 2
  )

  def __init__(self, squareChatMid=None, squareMessage=None,):
    self.squareChatMid = squareChatMid
    self.squareMessage = squareMessage

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareMessage = SquareMessage()
          self.squareMessage.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('SquareEventReceiveMessage')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareMessage is not None:
      oprot.writeFieldBegin('squareMessage', TType.STRUCT, 2)
      self.squareMessage.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareMessage)
    return value

  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 SquareEventSendMessage:
  """
  Attributes:
   - squareChatMid
   - squareMessage
   - reqSeq
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRUCT, 'squareMessage', (SquareMessage, SquareMessage.thrift_spec), None, ), # 2
    (3, TType.I32, 'reqSeq', None, None, ), # 3
  )

  def __init__(self, squareChatMid=None, squareMessage=None, reqSeq=None,):
    self.squareChatMid = squareChatMid
    self.squareMessage = squareMessage
    self.reqSeq = reqSeq

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareMessage = SquareMessage()
          self.squareMessage.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.reqSeq = 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('SquareEventSendMessage')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareMessage is not None:
      oprot.writeFieldBegin('squareMessage', TType.STRUCT, 2)
      self.squareMessage.write(oprot)
      oprot.writeFieldEnd()
    if self.reqSeq is not None:
      oprot.writeFieldBegin('reqSeq', TType.I32, 3)
      oprot.writeI32(self.reqSeq)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareMessage)
    value = (value * 31) ^ hash(self.reqSeq)
    return value

  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 SquareEventNotifiedJoinSquareChat:
  """
  Attributes:
   - squareChatMid
   - joinedMember
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRUCT, 'joinedMember', (SquareMember, SquareMember.thrift_spec), None, ), # 2
  )

  def __init__(self, squareChatMid=None, joinedMember=None,):
    self.squareChatMid = squareChatMid
    self.joinedMember = joinedMember

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.joinedMember = SquareMember()
          self.joinedMember.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('SquareEventNotifiedJoinSquareChat')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.joinedMember is not None:
      oprot.writeFieldBegin('joinedMember', TType.STRUCT, 2)
      self.joinedMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.joinedMember)
    return value

  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 SquareEventNotifiedInviteIntoSquareChat:
  """
  Attributes:
   - squareChatMid
   - invitees
   - invitor
   - invitorRelation
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.LIST, 'invitees', (TType.STRUCT,(SquareMember, SquareMember.thrift_spec)), None, ), # 2
    (3, TType.STRUCT, 'invitor', (SquareMember, SquareMember.thrift_spec), None, ), # 3
    (4, TType.STRUCT, 'invitorRelation', (SquareMemberRelation, SquareMemberRelation.thrift_spec), None, ), # 4
  )

  def __init__(self, squareChatMid=None, invitees=None, invitor=None, invitorRelation=None,):
    self.squareChatMid = squareChatMid
    self.invitees = invitees
    self.invitor = invitor
    self.invitorRelation = invitorRelation

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.invitees = []
          (_etype597, _size594) = iprot.readListBegin()
          for _i598 in xrange(_size594):
            _elem599 = SquareMember()
            _elem599.read(iprot)
            self.invitees.append(_elem599)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.invitor = SquareMember()
          self.invitor.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.invitorRelation = SquareMemberRelation()
          self.invitorRelation.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('SquareEventNotifiedInviteIntoSquareChat')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.invitees is not None:
      oprot.writeFieldBegin('invitees', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.invitees))
      for iter600 in self.invitees:
        iter600.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.invitor is not None:
      oprot.writeFieldBegin('invitor', TType.STRUCT, 3)
      self.invitor.write(oprot)
      oprot.writeFieldEnd()
    if self.invitorRelation is not None:
      oprot.writeFieldBegin('invitorRelation', TType.STRUCT, 4)
      self.invitorRelation.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.invitees)
    value = (value * 31) ^ hash(self.invitor)
    value = (value * 31) ^ hash(self.invitorRelation)
    return value

  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 SquareEventNotifiedLeaveSquareChat:
  """
  Attributes:
   - squareChatMid
   - squareMemberMid
   - sayGoodbye
   - squareMember
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRING, 'squareMemberMid', None, None, ), # 2
    (3, TType.BOOL, 'sayGoodbye', None, None, ), # 3
    (4, TType.STRUCT, 'squareMember', (SquareMember, SquareMember.thrift_spec), None, ), # 4
  )

  def __init__(self, squareChatMid=None, squareMemberMid=None, sayGoodbye=None, squareMember=None,):
    self.squareChatMid = squareChatMid
    self.squareMemberMid = squareMemberMid
    self.sayGoodbye = sayGoodbye
    self.squareMember = squareMember

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.sayGoodbye = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.squareMember = SquareMember()
          self.squareMember.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('SquareEventNotifiedLeaveSquareChat')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareMemberMid is not None:
      oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
      oprot.writeString(self.squareMemberMid)
      oprot.writeFieldEnd()
    if self.sayGoodbye is not None:
      oprot.writeFieldBegin('sayGoodbye', TType.BOOL, 3)
      oprot.writeBool(self.sayGoodbye)
      oprot.writeFieldEnd()
    if self.squareMember is not None:
      oprot.writeFieldBegin('squareMember', TType.STRUCT, 4)
      self.squareMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareMemberMid)
    value = (value * 31) ^ hash(self.sayGoodbye)
    value = (value * 31) ^ hash(self.squareMember)
    return value

  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 SquareEventNotifiedDestroyMessage:
  """
  Attributes:
   - squareChatMid
   - messageId
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    None, # 2
    (3, TType.STRING, 'messageId', None, None, ), # 3
  )

  def __init__(self, squareChatMid=None, messageId=None,):
    self.squareChatMid = squareChatMid
    self.messageId = messageId

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.messageId = 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('SquareEventNotifiedDestroyMessage')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.messageId is not None:
      oprot.writeFieldBegin('messageId', TType.STRING, 3)
      oprot.writeString(self.messageId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.messageId)
    return value

  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 SquareEventNotifiedMarkAsRead:
  """
  Attributes:
   - squareChatMid
   - sMemberMid
   - messageId
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRING, 'sMemberMid', None, None, ), # 2
    None, # 3
    (4, TType.STRING, 'messageId', None, None, ), # 4
  )

  def __init__(self, squareChatMid=None, sMemberMid=None, messageId=None,):
    self.squareChatMid = squareChatMid
    self.sMemberMid = sMemberMid
    self.messageId = messageId

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.sMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.messageId = 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('SquareEventNotifiedMarkAsRead')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.sMemberMid is not None:
      oprot.writeFieldBegin('sMemberMid', TType.STRING, 2)
      oprot.writeString(self.sMemberMid)
      oprot.writeFieldEnd()
    if self.messageId is not None:
      oprot.writeFieldBegin('messageId', TType.STRING, 4)
      oprot.writeString(self.messageId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.sMemberMid)
    value = (value * 31) ^ hash(self.messageId)
    return value

  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 SquareEventNotifiedUpdateSquareMemberProfile:
  """
  Attributes:
   - squareChatMid
   - squareMember
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRUCT, 'squareMember', (SquareMember, SquareMember.thrift_spec), None, ), # 2
  )

  def __init__(self, squareChatMid=None, squareMember=None,):
    self.squareChatMid = squareChatMid
    self.squareMember = squareMember

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareMember = SquareMember()
          self.squareMember.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('SquareEventNotifiedUpdateSquareMemberProfile')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareMember is not None:
      oprot.writeFieldBegin('squareMember', TType.STRUCT, 2)
      self.squareMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareMember)
    return value

  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 SquareEventNotifiedKickoutFromSquare:
  """
  Attributes:
   - squareChatMid
   - kickees
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.LIST, 'kickees', (TType.STRUCT,(SquareMember, SquareMember.thrift_spec)), None, ), # 2
  )

  def __init__(self, squareChatMid=None, kickees=None,):
    self.squareChatMid = squareChatMid
    self.kickees = kickees

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.kickees = []
          (_etype604, _size601) = iprot.readListBegin()
          for _i605 in xrange(_size601):
            _elem606 = SquareMember()
            _elem606.read(iprot)
            self.kickees.append(_elem606)
          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('SquareEventNotifiedKickoutFromSquare')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.kickees is not None:
      oprot.writeFieldBegin('kickees', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.kickees))
      for iter607 in self.kickees:
        iter607.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.kickees)
    return value

  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 SquareEventNotifiedShutdownSquare:
  """
  Attributes:
   - squareChatMid
   - square
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 2
  )

  def __init__(self, squareChatMid=None, square=None,):
    self.squareChatMid = squareChatMid
    self.square = square

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.square = Square()
          self.square.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('SquareEventNotifiedShutdownSquare')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 2)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.square)
    return value

  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 SquareEventNotifiedDeleteSquareChat:
  """
  Attributes:
   - squareChat
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'squareChat', (SquareChat, SquareChat.thrift_spec), None, ), # 1
  )

  def __init__(self, squareChat=None,):
    self.squareChat = squareChat

  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.squareChat = SquareChat()
          self.squareChat.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('SquareEventNotifiedDeleteSquareChat')
    if self.squareChat is not None:
      oprot.writeFieldBegin('squareChat', TType.STRUCT, 1)
      self.squareChat.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChat)
    return value

  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 SquareEventNotifiedUpdateSquareChatProfileName:
  """
  Attributes:
   - squareChatMid
   - editor
   - updatedChatName
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRUCT, 'editor', (SquareMember, SquareMember.thrift_spec), None, ), # 2
    (3, TType.STRING, 'updatedChatName', None, None, ), # 3
  )

  def __init__(self, squareChatMid=None, editor=None, updatedChatName=None,):
    self.squareChatMid = squareChatMid
    self.editor = editor
    self.updatedChatName = updatedChatName

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.editor = SquareMember()
          self.editor.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.updatedChatName = 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('SquareEventNotifiedUpdateSquareChatProfileName')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.editor is not None:
      oprot.writeFieldBegin('editor', TType.STRUCT, 2)
      self.editor.write(oprot)
      oprot.writeFieldEnd()
    if self.updatedChatName is not None:
      oprot.writeFieldBegin('updatedChatName', TType.STRING, 3)
      oprot.writeString(self.updatedChatName)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.editor)
    value = (value * 31) ^ hash(self.updatedChatName)
    return value

  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 SquareEventNotifiedUpdateSquareChatProfileImage:
  """
  Attributes:
   - squareChatMid
   - editor
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRUCT, 'editor', (SquareMember, SquareMember.thrift_spec), None, ), # 2
  )

  def __init__(self, squareChatMid=None, editor=None,):
    self.squareChatMid = squareChatMid
    self.editor = editor

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.editor = SquareMember()
          self.editor.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('SquareEventNotifiedUpdateSquareChatProfileImage')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.editor is not None:
      oprot.writeFieldBegin('editor', TType.STRUCT, 2)
      self.editor.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.editor)
    return value

  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 SquareEventNotifiedUpdateSquareChatStatus:
  """
  Attributes:
   - squareChatMid
   - statusWithoutMessage
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRUCT, 'statusWithoutMessage', (SquareChatStatusWithoutMessage, SquareChatStatusWithoutMessage.thrift_spec), None, ), # 2
  )

  def __init__(self, squareChatMid=None, statusWithoutMessage=None,):
    self.squareChatMid = squareChatMid
    self.statusWithoutMessage = statusWithoutMessage

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.statusWithoutMessage = SquareChatStatusWithoutMessage()
          self.statusWithoutMessage.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('SquareEventNotifiedUpdateSquareChatStatus')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.statusWithoutMessage is not None:
      oprot.writeFieldBegin('statusWithoutMessage', TType.STRUCT, 2)
      self.statusWithoutMessage.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.statusWithoutMessage)
    return value

  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 SquareEventNotifiedUpdateSquareStatus:
  """
  Attributes:
   - squareMid
   - squareStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRUCT, 'squareStatus', (SquareStatus, SquareStatus.thrift_spec), None, ), # 2
  )

  def __init__(self, squareMid=None, squareStatus=None,):
    self.squareMid = squareMid
    self.squareStatus = squareStatus

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareStatus = SquareStatus()
          self.squareStatus.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('SquareEventNotifiedUpdateSquareStatus')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.squareStatus is not None:
      oprot.writeFieldBegin('squareStatus', TType.STRUCT, 2)
      self.squareStatus.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.squareStatus)
    return value

  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 SquareEventNotifiedCreateSquareMember:
  """
  Attributes:
   - square
   - squareAuthority
   - squareStatus
   - squareMember
   - squareFeatureSet
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'squareAuthority', (SquareAuthority, SquareAuthority.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'squareStatus', (SquareStatus, SquareStatus.thrift_spec), None, ), # 3
    (4, TType.STRUCT, 'squareMember', (SquareMember, SquareMember.thrift_spec), None, ), # 4
    (5, TType.STRUCT, 'squareFeatureSet', (SquareFeatureSet, SquareFeatureSet.thrift_spec), None, ), # 5
  )

  def __init__(self, square=None, squareAuthority=None, squareStatus=None, squareMember=None, squareFeatureSet=None,):
    self.square = square
    self.squareAuthority = squareAuthority
    self.squareStatus = squareStatus
    self.squareMember = squareMember
    self.squareFeatureSet = squareFeatureSet

  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.square = Square()
          self.square.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareAuthority = SquareAuthority()
          self.squareAuthority.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareStatus = SquareStatus()
          self.squareStatus.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.squareMember = SquareMember()
          self.squareMember.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRUCT:
          self.squareFeatureSet = SquareFeatureSet()
          self.squareFeatureSet.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('SquareEventNotifiedCreateSquareMember')
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 1)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    if self.squareAuthority is not None:
      oprot.writeFieldBegin('squareAuthority', TType.STRUCT, 2)
      self.squareAuthority.write(oprot)
      oprot.writeFieldEnd()
    if self.squareStatus is not None:
      oprot.writeFieldBegin('squareStatus', TType.STRUCT, 3)
      self.squareStatus.write(oprot)
      oprot.writeFieldEnd()
    if self.squareMember is not None:
      oprot.writeFieldBegin('squareMember', TType.STRUCT, 4)
      self.squareMember.write(oprot)
      oprot.writeFieldEnd()
    if self.squareFeatureSet is not None:
      oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 5)
      self.squareFeatureSet.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.square)
    value = (value * 31) ^ hash(self.squareAuthority)
    value = (value * 31) ^ hash(self.squareStatus)
    value = (value * 31) ^ hash(self.squareMember)
    value = (value * 31) ^ hash(self.squareFeatureSet)
    return value

  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 SquareEventNotifiedCreateSquareChatMember:
  """
  Attributes:
   - squareChatMid
   - squareMemberMid
   - squareChatMember
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRING, 'squareMemberMid', None, None, ), # 2
    (3, TType.STRUCT, 'squareChatMember', (SquareChatMember, SquareChatMember.thrift_spec), None, ), # 3
  )

  def __init__(self, squareChatMid=None, squareMemberMid=None, squareChatMember=None,):
    self.squareChatMid = squareChatMid
    self.squareMemberMid = squareMemberMid
    self.squareChatMember = squareChatMember

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareChatMember = SquareChatMember()
          self.squareChatMember.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('SquareEventNotifiedCreateSquareChatMember')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareMemberMid is not None:
      oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
      oprot.writeString(self.squareMemberMid)
      oprot.writeFieldEnd()
    if self.squareChatMember is not None:
      oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 3)
      self.squareChatMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareMemberMid)
    value = (value * 31) ^ hash(self.squareChatMember)
    return value

  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 SquareEventNotifiedUpdateSquareMemberRelation:
  """
  Attributes:
   - squareMid
   - myMemberMid
   - targetSquareMemberMid
   - squareMemberRelation
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRING, 'myMemberMid', None, None, ), # 2
    (3, TType.STRING, 'targetSquareMemberMid', None, None, ), # 3
    (4, TType.STRUCT, 'squareMemberRelation', (SquareMemberRelation, SquareMemberRelation.thrift_spec), None, ), # 4
  )

  def __init__(self, squareMid=None, myMemberMid=None, targetSquareMemberMid=None, squareMemberRelation=None,):
    self.squareMid = squareMid
    self.myMemberMid = myMemberMid
    self.targetSquareMemberMid = targetSquareMemberMid
    self.squareMemberRelation = squareMemberRelation

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.myMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.targetSquareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.squareMemberRelation = SquareMemberRelation()
          self.squareMemberRelation.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('SquareEventNotifiedUpdateSquareMemberRelation')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.myMemberMid is not None:
      oprot.writeFieldBegin('myMemberMid', TType.STRING, 2)
      oprot.writeString(self.myMemberMid)
      oprot.writeFieldEnd()
    if self.targetSquareMemberMid is not None:
      oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 3)
      oprot.writeString(self.targetSquareMemberMid)
      oprot.writeFieldEnd()
    if self.squareMemberRelation is not None:
      oprot.writeFieldBegin('squareMemberRelation', TType.STRUCT, 4)
      self.squareMemberRelation.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.myMemberMid)
    value = (value * 31) ^ hash(self.targetSquareMemberMid)
    value = (value * 31) ^ hash(self.squareMemberRelation)
    return value

  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 SquareEventNotifiedUpdateSquare:
  """
  Attributes:
   - squareMid
   - square
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 2
  )

  def __init__(self, squareMid=None, square=None,):
    self.squareMid = squareMid
    self.square = square

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.square = Square()
          self.square.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('SquareEventNotifiedUpdateSquare')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 2)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.square)
    return value

  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 SquareEventNotifiedUpdateSquareMember:
  """
  Attributes:
   - squareMid
   - squareMemberMid
   - squareMember
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRING, 'squareMemberMid', None, None, ), # 2
    (3, TType.STRUCT, 'squareMember', (SquareMember, SquareMember.thrift_spec), None, ), # 3
  )

  def __init__(self, squareMid=None, squareMemberMid=None, squareMember=None,):
    self.squareMid = squareMid
    self.squareMemberMid = squareMemberMid
    self.squareMember = squareMember

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareMember = SquareMember()
          self.squareMember.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('SquareEventNotifiedUpdateSquareMember')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.squareMemberMid is not None:
      oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
      oprot.writeString(self.squareMemberMid)
      oprot.writeFieldEnd()
    if self.squareMember is not None:
      oprot.writeFieldBegin('squareMember', TType.STRUCT, 3)
      self.squareMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.squareMemberMid)
    value = (value * 31) ^ hash(self.squareMember)
    return value

  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 SquareEventNotifiedUpdateSquareChat:
  """
  Attributes:
   - squareMid
   - squareChatMid
   - squareChat
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
    (3, TType.STRUCT, 'squareChat', (SquareChat, SquareChat.thrift_spec), None, ), # 3
  )

  def __init__(self, squareMid=None, squareChatMid=None, squareChat=None,):
    self.squareMid = squareMid
    self.squareChatMid = squareChatMid
    self.squareChat = squareChat

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareChat = SquareChat()
          self.squareChat.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('SquareEventNotifiedUpdateSquareChat')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareChat is not None:
      oprot.writeFieldBegin('squareChat', TType.STRUCT, 3)
      self.squareChat.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareChat)
    return value

  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 SquareEventNotificationJoinRequest:
  """
  Attributes:
   - squareMid
   - squareName
   - requestMemberName
   - profileImageObsHash
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRING, 'squareName', None, None, ), # 2
    (3, TType.STRING, 'requestMemberName', None, None, ), # 3
    (4, TType.STRING, 'profileImageObsHash', None, None, ), # 4
  )

  def __init__(self, squareMid=None, squareName=None, requestMemberName=None, profileImageObsHash=None,):
    self.squareMid = squareMid
    self.squareName = squareName
    self.requestMemberName = requestMemberName
    self.profileImageObsHash = profileImageObsHash

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.requestMemberName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.profileImageObsHash = 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('SquareEventNotificationJoinRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.squareName is not None:
      oprot.writeFieldBegin('squareName', TType.STRING, 2)
      oprot.writeString(self.squareName)
      oprot.writeFieldEnd()
    if self.requestMemberName is not None:
      oprot.writeFieldBegin('requestMemberName', TType.STRING, 3)
      oprot.writeString(self.requestMemberName)
      oprot.writeFieldEnd()
    if self.profileImageObsHash is not None:
      oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 4)
      oprot.writeString(self.profileImageObsHash)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.squareName)
    value = (value * 31) ^ hash(self.requestMemberName)
    value = (value * 31) ^ hash(self.profileImageObsHash)
    return value

  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 SquareEventNotificationMemberUpdate:
  """
  Attributes:
   - squareMid
   - squareName
   - profileImageObsHash
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRING, 'squareName', None, None, ), # 2
    (3, TType.STRING, 'profileImageObsHash', None, None, ), # 3
  )

  def __init__(self, squareMid=None, squareName=None, profileImageObsHash=None,):
    self.squareMid = squareMid
    self.squareName = squareName
    self.profileImageObsHash = profileImageObsHash

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.profileImageObsHash = 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('SquareEventNotificationMemberUpdate')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.squareName is not None:
      oprot.writeFieldBegin('squareName', TType.STRING, 2)
      oprot.writeString(self.squareName)
      oprot.writeFieldEnd()
    if self.profileImageObsHash is not None:
      oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 3)
      oprot.writeString(self.profileImageObsHash)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.squareName)
    value = (value * 31) ^ hash(self.profileImageObsHash)
    return value

  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 SquareEventNotificationSquareDelete:
  """
  Attributes:
   - squareMid
   - squareName
   - profileImageObsHash
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRING, 'squareName', None, None, ), # 2
    (3, TType.STRING, 'profileImageObsHash', None, None, ), # 3
  )

  def __init__(self, squareMid=None, squareName=None, profileImageObsHash=None,):
    self.squareMid = squareMid
    self.squareName = squareName
    self.profileImageObsHash = profileImageObsHash

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.profileImageObsHash = 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('SquareEventNotificationSquareDelete')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.squareName is not None:
      oprot.writeFieldBegin('squareName', TType.STRING, 2)
      oprot.writeString(self.squareName)
      oprot.writeFieldEnd()
    if self.profileImageObsHash is not None:
      oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 3)
      oprot.writeString(self.profileImageObsHash)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.squareName)
    value = (value * 31) ^ hash(self.profileImageObsHash)
    return value

  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 SquareEventNotificationSquareChatDelete:
  """
  Attributes:
   - squareChatMid
   - squareChatName
   - profileImageObsHash
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRING, 'squareChatName', None, None, ), # 2
    (3, TType.STRING, 'profileImageObsHash', None, None, ), # 3
  )

  def __init__(self, squareChatMid=None, squareChatName=None, profileImageObsHash=None,):
    self.squareChatMid = squareChatMid
    self.squareChatName = squareChatName
    self.profileImageObsHash = profileImageObsHash

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareChatName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.profileImageObsHash = 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('SquareEventNotificationSquareChatDelete')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareChatName is not None:
      oprot.writeFieldBegin('squareChatName', TType.STRING, 2)
      oprot.writeString(self.squareChatName)
      oprot.writeFieldEnd()
    if self.profileImageObsHash is not None:
      oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 3)
      oprot.writeString(self.profileImageObsHash)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareChatName)
    value = (value * 31) ^ hash(self.profileImageObsHash)
    return value

  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 SquareEventNotificationMessage:
  """
  Attributes:
   - squareChatMid
   - squareMessage
   - senderDisplayName
   - unreadCount
   - requiredToFetchChatEvents
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRUCT, 'squareMessage', (SquareMessage, SquareMessage.thrift_spec), None, ), # 2
    (3, TType.STRING, 'senderDisplayName', None, None, ), # 3
    (4, TType.I32, 'unreadCount', None, None, ), # 4
    (5, TType.BOOL, 'requiredToFetchChatEvents', None, None, ), # 5
  )

  def __init__(self, squareChatMid=None, squareMessage=None, senderDisplayName=None, unreadCount=None, requiredToFetchChatEvents=None,):
    self.squareChatMid = squareChatMid
    self.squareMessage = squareMessage
    self.senderDisplayName = senderDisplayName
    self.unreadCount = unreadCount
    self.requiredToFetchChatEvents = requiredToFetchChatEvents

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareMessage = SquareMessage()
          self.squareMessage.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.senderDisplayName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.unreadCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.requiredToFetchChatEvents = 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('SquareEventNotificationMessage')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareMessage is not None:
      oprot.writeFieldBegin('squareMessage', TType.STRUCT, 2)
      self.squareMessage.write(oprot)
      oprot.writeFieldEnd()
    if self.senderDisplayName is not None:
      oprot.writeFieldBegin('senderDisplayName', TType.STRING, 3)
      oprot.writeString(self.senderDisplayName)
      oprot.writeFieldEnd()
    if self.unreadCount is not None:
      oprot.writeFieldBegin('unreadCount', TType.I32, 4)
      oprot.writeI32(self.unreadCount)
      oprot.writeFieldEnd()
    if self.requiredToFetchChatEvents is not None:
      oprot.writeFieldBegin('requiredToFetchChatEvents', TType.BOOL, 5)
      oprot.writeBool(self.requiredToFetchChatEvents)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareMessage)
    value = (value * 31) ^ hash(self.senderDisplayName)
    value = (value * 31) ^ hash(self.unreadCount)
    value = (value * 31) ^ hash(self.requiredToFetchChatEvents)
    return value

  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 SquareEventNotifiedUpdateSquareChatMember:
  """
  Attributes:
   - squareChatMid
   - squareMemberMid
   - squareChatMember
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareChatMid', None, None, ), # 1
    (2, TType.STRING, 'squareMemberMid', None, None, ), # 2
    (3, TType.STRUCT, 'squareChatMember', (SquareChatMember, SquareChatMember.thrift_spec), None, ), # 3
  )

  def __init__(self, squareChatMid=None, squareMemberMid=None, squareChatMember=None,):
    self.squareChatMid = squareChatMid
    self.squareMemberMid = squareMemberMid
    self.squareChatMember = squareChatMember

  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.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareChatMember = SquareChatMember()
          self.squareChatMember.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('SquareEventNotifiedUpdateSquareChatMember')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareMemberMid is not None:
      oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
      oprot.writeString(self.squareMemberMid)
      oprot.writeFieldEnd()
    if self.squareChatMember is not None:
      oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 3)
      self.squareChatMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareMemberMid)
    value = (value * 31) ^ hash(self.squareChatMember)
    return value

  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 SquareEventNotifiedUpdateSquareAuthority:
  """
  Attributes:
   - squareMid
   - squareAuthority
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRUCT, 'squareAuthority', (SquareAuthority, SquareAuthority.thrift_spec), None, ), # 2
  )

  def __init__(self, squareMid=None, squareAuthority=None,):
    self.squareMid = squareMid
    self.squareAuthority = squareAuthority

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareAuthority = SquareAuthority()
          self.squareAuthority.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('SquareEventNotifiedUpdateSquareAuthority')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.squareAuthority is not None:
      oprot.writeFieldBegin('squareAuthority', TType.STRUCT, 2)
      self.squareAuthority.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.squareAuthority)
    return value

  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 SquareEventNotifiedUpdateSquareFeatureSet:
  """
  Attributes:
   - squareFeatureSet
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'squareFeatureSet', (SquareFeatureSet, SquareFeatureSet.thrift_spec), None, ), # 1
  )

  def __init__(self, squareFeatureSet=None,):
    self.squareFeatureSet = squareFeatureSet

  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.squareFeatureSet = SquareFeatureSet()
          self.squareFeatureSet.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('SquareEventNotifiedUpdateSquareFeatureSet')
    if self.squareFeatureSet is not None:
      oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 1)
      self.squareFeatureSet.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareFeatureSet)
    return value

  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 SquareEventPayload:
  """
  Attributes:
   - receiveMessage
   - sendMessage
   - notifiedJoinSquareChat
   - notifiedInviteIntoSquareChat
   - notifiedLeaveSquareChat
   - notifiedDestroyMessage
   - notifiedMarkAsRead
   - notifiedUpdateSquareMemberProfile
   - notifiedKickoutFromSquare
   - notifiedShutdownSquare
   - notifiedDeleteSquareChat
   - notifiedUpdateSquareChatProfileName
   - notifiedUpdateSquareChatProfileImage
   - notifiedUpdateSquareStatus
   - notifiedUpdateSquareChatStatus
   - notifiedCreateSquareMember
   - notifiedCreateSquareChatMember
   - notifiedUpdateSquareMemberRelation
   - notifiedUpdateSquare
   - notifiedUpdateSquareMember
   - notifiedUpdateSquareChat
   - notificationJoinRequest
   - notificationJoined
   - notificationPromoteCoadmin
   - notificationPromoteAdmin
   - notificationDemoteMember
   - notificationKickedOut
   - notificationSquareDelete
   - notificationSquareChatDelete
   - notificationMessage
   - notifiedUpdateSquareChatMember
   - notifiedUpdateSquareAuthority
   - notifiedUpdateSquareFeatureSet
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'receiveMessage', (SquareEventReceiveMessage, SquareEventReceiveMessage.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'sendMessage', (SquareEventSendMessage, SquareEventSendMessage.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'notifiedJoinSquareChat', (SquareEventNotifiedJoinSquareChat, SquareEventNotifiedJoinSquareChat.thrift_spec), None, ), # 3
    (4, TType.STRUCT, 'notifiedInviteIntoSquareChat', (SquareEventNotifiedInviteIntoSquareChat, SquareEventNotifiedInviteIntoSquareChat.thrift_spec), None, ), # 4
    (5, TType.STRUCT, 'notifiedLeaveSquareChat', (SquareEventNotifiedLeaveSquareChat, SquareEventNotifiedLeaveSquareChat.thrift_spec), None, ), # 5
    (6, TType.STRUCT, 'notifiedDestroyMessage', (SquareEventNotifiedDestroyMessage, SquareEventNotifiedDestroyMessage.thrift_spec), None, ), # 6
    (7, TType.STRUCT, 'notifiedMarkAsRead', (SquareEventNotifiedMarkAsRead, SquareEventNotifiedMarkAsRead.thrift_spec), None, ), # 7
    (8, TType.STRUCT, 'notifiedUpdateSquareMemberProfile', (SquareEventNotifiedUpdateSquareMemberProfile, SquareEventNotifiedUpdateSquareMemberProfile.thrift_spec), None, ), # 8
    (9, TType.STRUCT, 'notifiedUpdateSquare', (SquareEventNotifiedUpdateSquare, SquareEventNotifiedUpdateSquare.thrift_spec), None, ), # 9
    (10, TType.STRUCT, 'notifiedUpdateSquareMember', (SquareEventNotifiedUpdateSquareMember, SquareEventNotifiedUpdateSquareMember.thrift_spec), None, ), # 10
    (11, TType.STRUCT, 'notifiedUpdateSquareChat', (SquareEventNotifiedUpdateSquareChat, SquareEventNotifiedUpdateSquareChat.thrift_spec), None, ), # 11
    (12, TType.STRUCT, 'notifiedUpdateSquareChatMember', (SquareEventNotifiedUpdateSquareChatMember, SquareEventNotifiedUpdateSquareChatMember.thrift_spec), None, ), # 12
    (13, TType.STRUCT, 'notifiedUpdateSquareAuthority', (SquareEventNotifiedUpdateSquareAuthority, SquareEventNotifiedUpdateSquareAuthority.thrift_spec), None, ), # 13
    (14, TType.STRUCT, 'notifiedUpdateSquareStatus', (SquareEventNotifiedUpdateSquareStatus, SquareEventNotifiedUpdateSquareStatus.thrift_spec), None, ), # 14
    (15, TType.STRUCT, 'notifiedUpdateSquareChatStatus', (SquareEventNotifiedUpdateSquareChatStatus, SquareEventNotifiedUpdateSquareChatStatus.thrift_spec), None, ), # 15
    (16, TType.STRUCT, 'notifiedCreateSquareMember', (SquareEventNotifiedCreateSquareMember, SquareEventNotifiedCreateSquareMember.thrift_spec), None, ), # 16
    (17, TType.STRUCT, 'notifiedCreateSquareChatMember', (SquareEventNotifiedCreateSquareChatMember, SquareEventNotifiedCreateSquareChatMember.thrift_spec), None, ), # 17
    (18, TType.STRUCT, 'notifiedUpdateSquareMemberRelation', (SquareEventNotifiedUpdateSquareMemberRelation, SquareEventNotifiedUpdateSquareMemberRelation.thrift_spec), None, ), # 18
    (19, TType.STRUCT, 'notifiedShutdownSquare', (SquareEventNotifiedShutdownSquare, SquareEventNotifiedShutdownSquare.thrift_spec), None, ), # 19
    (20, TType.STRUCT, 'notifiedKickoutFromSquare', (SquareEventNotifiedKickoutFromSquare, SquareEventNotifiedKickoutFromSquare.thrift_spec), None, ), # 20
    (21, TType.STRUCT, 'notifiedDeleteSquareChat', (SquareEventNotifiedDeleteSquareChat, SquareEventNotifiedDeleteSquareChat.thrift_spec), None, ), # 21
    (22, TType.STRUCT, 'notificationJoinRequest', (SquareEventNotificationJoinRequest, SquareEventNotificationJoinRequest.thrift_spec), None, ), # 22
    (23, TType.STRUCT, 'notificationJoined', (SquareEventNotificationMemberUpdate, SquareEventNotificationMemberUpdate.thrift_spec), None, ), # 23
    (24, TType.STRUCT, 'notificationPromoteCoadmin', (SquareEventNotificationMemberUpdate, SquareEventNotificationMemberUpdate.thrift_spec), None, ), # 24
    (25, TType.STRUCT, 'notificationPromoteAdmin', (SquareEventNotificationMemberUpdate, SquareEventNotificationMemberUpdate.thrift_spec), None, ), # 25
    (26, TType.STRUCT, 'notificationDemoteMember', (SquareEventNotificationMemberUpdate, SquareEventNotificationMemberUpdate.thrift_spec), None, ), # 26
    (27, TType.STRUCT, 'notificationKickedOut', (SquareEventNotificationMemberUpdate, SquareEventNotificationMemberUpdate.thrift_spec), None, ), # 27
    (28, TType.STRUCT, 'notificationSquareDelete', (SquareEventNotificationSquareDelete, SquareEventNotificationSquareDelete.thrift_spec), None, ), # 28
    (29, TType.STRUCT, 'notificationSquareChatDelete', (SquareEventNotificationSquareChatDelete, SquareEventNotificationSquareChatDelete.thrift_spec), None, ), # 29
    (30, TType.STRUCT, 'notificationMessage', (SquareEventNotificationMessage, SquareEventNotificationMessage.thrift_spec), None, ), # 30
    (31, TType.STRUCT, 'notifiedUpdateSquareChatProfileName', (SquareEventNotifiedUpdateSquareChatProfileName, SquareEventNotifiedUpdateSquareChatProfileName.thrift_spec), None, ), # 31
    (32, TType.STRUCT, 'notifiedUpdateSquareChatProfileImage', (SquareEventNotifiedUpdateSquareChatProfileImage, SquareEventNotifiedUpdateSquareChatProfileImage.thrift_spec), None, ), # 32
    (33, TType.STRUCT, 'notifiedUpdateSquareFeatureSet', (SquareEventNotifiedUpdateSquareFeatureSet, SquareEventNotifiedUpdateSquareFeatureSet.thrift_spec), None, ), # 33
  )

  def __init__(self, receiveMessage=None, sendMessage=None, notifiedJoinSquareChat=None, notifiedInviteIntoSquareChat=None, notifiedLeaveSquareChat=None, notifiedDestroyMessage=None, notifiedMarkAsRead=None, notifiedUpdateSquareMemberProfile=None, notifiedKickoutFromSquare=None, notifiedShutdownSquare=None, notifiedDeleteSquareChat=None, notifiedUpdateSquareChatProfileName=None, notifiedUpdateSquareChatProfileImage=None, notifiedUpdateSquareStatus=None, notifiedUpdateSquareChatStatus=None, notifiedCreateSquareMember=None, notifiedCreateSquareChatMember=None, notifiedUpdateSquareMemberRelation=None, notifiedUpdateSquare=None, notifiedUpdateSquareMember=None, notifiedUpdateSquareChat=None, notificationJoinRequest=None, notificationJoined=None, notificationPromoteCoadmin=None, notificationPromoteAdmin=None, notificationDemoteMember=None, notificationKickedOut=None, notificationSquareDelete=None, notificationSquareChatDelete=None, notificationMessage=None, notifiedUpdateSquareChatMember=None, notifiedUpdateSquareAuthority=None, notifiedUpdateSquareFeatureSet=None,):
    self.receiveMessage = receiveMessage
    self.sendMessage = sendMessage
    self.notifiedJoinSquareChat = notifiedJoinSquareChat
    self.notifiedInviteIntoSquareChat = notifiedInviteIntoSquareChat
    self.notifiedLeaveSquareChat = notifiedLeaveSquareChat
    self.notifiedDestroyMessage = notifiedDestroyMessage
    self.notifiedMarkAsRead = notifiedMarkAsRead
    self.notifiedUpdateSquareMemberProfile = notifiedUpdateSquareMemberProfile
    self.notifiedKickoutFromSquare = notifiedKickoutFromSquare
    self.notifiedShutdownSquare = notifiedShutdownSquare
    self.notifiedDeleteSquareChat = notifiedDeleteSquareChat
    self.notifiedUpdateSquareChatProfileName = notifiedUpdateSquareChatProfileName
    self.notifiedUpdateSquareChatProfileImage = notifiedUpdateSquareChatProfileImage
    self.notifiedUpdateSquareStatus = notifiedUpdateSquareStatus
    self.notifiedUpdateSquareChatStatus = notifiedUpdateSquareChatStatus
    self.notifiedCreateSquareMember = notifiedCreateSquareMember
    self.notifiedCreateSquareChatMember = notifiedCreateSquareChatMember
    self.notifiedUpdateSquareMemberRelation = notifiedUpdateSquareMemberRelation
    self.notifiedUpdateSquare = notifiedUpdateSquare
    self.notifiedUpdateSquareMember = notifiedUpdateSquareMember
    self.notifiedUpdateSquareChat = notifiedUpdateSquareChat
    self.notificationJoinRequest = notificationJoinRequest
    self.notificationJoined = notificationJoined
    self.notificationPromoteCoadmin = notificationPromoteCoadmin
    self.notificationPromoteAdmin = notificationPromoteAdmin
    self.notificationDemoteMember = notificationDemoteMember
    self.notificationKickedOut = notificationKickedOut
    self.notificationSquareDelete = notificationSquareDelete
    self.notificationSquareChatDelete = notificationSquareChatDelete
    self.notificationMessage = notificationMessage
    self.notifiedUpdateSquareChatMember = notifiedUpdateSquareChatMember
    self.notifiedUpdateSquareAuthority = notifiedUpdateSquareAuthority
    self.notifiedUpdateSquareFeatureSet = notifiedUpdateSquareFeatureSet

  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.receiveMessage = SquareEventReceiveMessage()
          self.receiveMessage.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.sendMessage = SquareEventSendMessage()
          self.sendMessage.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.notifiedJoinSquareChat = SquareEventNotifiedJoinSquareChat()
          self.notifiedJoinSquareChat.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.notifiedInviteIntoSquareChat = SquareEventNotifiedInviteIntoSquareChat()
          self.notifiedInviteIntoSquareChat.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRUCT:
          self.notifiedLeaveSquareChat = SquareEventNotifiedLeaveSquareChat()
          self.notifiedLeaveSquareChat.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRUCT:
          self.notifiedDestroyMessage = SquareEventNotifiedDestroyMessage()
          self.notifiedDestroyMessage.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRUCT:
          self.notifiedMarkAsRead = SquareEventNotifiedMarkAsRead()
          self.notifiedMarkAsRead.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareMemberProfile = SquareEventNotifiedUpdateSquareMemberProfile()
          self.notifiedUpdateSquareMemberProfile.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.STRUCT:
          self.notifiedKickoutFromSquare = SquareEventNotifiedKickoutFromSquare()
          self.notifiedKickoutFromSquare.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 19:
        if ftype == TType.STRUCT:
          self.notifiedShutdownSquare = SquareEventNotifiedShutdownSquare()
          self.notifiedShutdownSquare.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.STRUCT:
          self.notifiedDeleteSquareChat = SquareEventNotifiedDeleteSquareChat()
          self.notifiedDeleteSquareChat.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 31:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareChatProfileName = SquareEventNotifiedUpdateSquareChatProfileName()
          self.notifiedUpdateSquareChatProfileName.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 32:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareChatProfileImage = SquareEventNotifiedUpdateSquareChatProfileImage()
          self.notifiedUpdateSquareChatProfileImage.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareStatus = SquareEventNotifiedUpdateSquareStatus()
          self.notifiedUpdateSquareStatus.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareChatStatus = SquareEventNotifiedUpdateSquareChatStatus()
          self.notifiedUpdateSquareChatStatus.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.STRUCT:
          self.notifiedCreateSquareMember = SquareEventNotifiedCreateSquareMember()
          self.notifiedCreateSquareMember.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.STRUCT:
          self.notifiedCreateSquareChatMember = SquareEventNotifiedCreateSquareChatMember()
          self.notifiedCreateSquareChatMember.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareMemberRelation = SquareEventNotifiedUpdateSquareMemberRelation()
          self.notifiedUpdateSquareMemberRelation.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquare = SquareEventNotifiedUpdateSquare()
          self.notifiedUpdateSquare.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareMember = SquareEventNotifiedUpdateSquareMember()
          self.notifiedUpdateSquareMember.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareChat = SquareEventNotifiedUpdateSquareChat()
          self.notifiedUpdateSquareChat.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRUCT:
          self.notificationJoinRequest = SquareEventNotificationJoinRequest()
          self.notificationJoinRequest.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 23:
        if ftype == TType.STRUCT:
          self.notificationJoined = SquareEventNotificationMemberUpdate()
          self.notificationJoined.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 24:
        if ftype == TType.STRUCT:
          self.notificationPromoteCoadmin = SquareEventNotificationMemberUpdate()
          self.notificationPromoteCoadmin.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 25:
        if ftype == TType.STRUCT:
          self.notificationPromoteAdmin = SquareEventNotificationMemberUpdate()
          self.notificationPromoteAdmin.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 26:
        if ftype == TType.STRUCT:
          self.notificationDemoteMember = SquareEventNotificationMemberUpdate()
          self.notificationDemoteMember.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 27:
        if ftype == TType.STRUCT:
          self.notificationKickedOut = SquareEventNotificationMemberUpdate()
          self.notificationKickedOut.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 28:
        if ftype == TType.STRUCT:
          self.notificationSquareDelete = SquareEventNotificationSquareDelete()
          self.notificationSquareDelete.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 29:
        if ftype == TType.STRUCT:
          self.notificationSquareChatDelete = SquareEventNotificationSquareChatDelete()
          self.notificationSquareChatDelete.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 30:
        if ftype == TType.STRUCT:
          self.notificationMessage = SquareEventNotificationMessage()
          self.notificationMessage.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareChatMember = SquareEventNotifiedUpdateSquareChatMember()
          self.notifiedUpdateSquareChatMember.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareAuthority = SquareEventNotifiedUpdateSquareAuthority()
          self.notifiedUpdateSquareAuthority.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 33:
        if ftype == TType.STRUCT:
          self.notifiedUpdateSquareFeatureSet = SquareEventNotifiedUpdateSquareFeatureSet()
          self.notifiedUpdateSquareFeatureSet.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('SquareEventPayload')
    if self.receiveMessage is not None:
      oprot.writeFieldBegin('receiveMessage', TType.STRUCT, 1)
      self.receiveMessage.write(oprot)
      oprot.writeFieldEnd()
    if self.sendMessage is not None:
      oprot.writeFieldBegin('sendMessage', TType.STRUCT, 2)
      self.sendMessage.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedJoinSquareChat is not None:
      oprot.writeFieldBegin('notifiedJoinSquareChat', TType.STRUCT, 3)
      self.notifiedJoinSquareChat.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedInviteIntoSquareChat is not None:
      oprot.writeFieldBegin('notifiedInviteIntoSquareChat', TType.STRUCT, 4)
      self.notifiedInviteIntoSquareChat.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedLeaveSquareChat is not None:
      oprot.writeFieldBegin('notifiedLeaveSquareChat', TType.STRUCT, 5)
      self.notifiedLeaveSquareChat.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedDestroyMessage is not None:
      oprot.writeFieldBegin('notifiedDestroyMessage', TType.STRUCT, 6)
      self.notifiedDestroyMessage.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedMarkAsRead is not None:
      oprot.writeFieldBegin('notifiedMarkAsRead', TType.STRUCT, 7)
      self.notifiedMarkAsRead.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareMemberProfile is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareMemberProfile', TType.STRUCT, 8)
      self.notifiedUpdateSquareMemberProfile.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquare is not None:
      oprot.writeFieldBegin('notifiedUpdateSquare', TType.STRUCT, 9)
      self.notifiedUpdateSquare.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareMember is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareMember', TType.STRUCT, 10)
      self.notifiedUpdateSquareMember.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareChat is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareChat', TType.STRUCT, 11)
      self.notifiedUpdateSquareChat.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareChatMember is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareChatMember', TType.STRUCT, 12)
      self.notifiedUpdateSquareChatMember.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareAuthority is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareAuthority', TType.STRUCT, 13)
      self.notifiedUpdateSquareAuthority.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareStatus is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareStatus', TType.STRUCT, 14)
      self.notifiedUpdateSquareStatus.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareChatStatus is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareChatStatus', TType.STRUCT, 15)
      self.notifiedUpdateSquareChatStatus.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedCreateSquareMember is not None:
      oprot.writeFieldBegin('notifiedCreateSquareMember', TType.STRUCT, 16)
      self.notifiedCreateSquareMember.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedCreateSquareChatMember is not None:
      oprot.writeFieldBegin('notifiedCreateSquareChatMember', TType.STRUCT, 17)
      self.notifiedCreateSquareChatMember.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareMemberRelation is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareMemberRelation', TType.STRUCT, 18)
      self.notifiedUpdateSquareMemberRelation.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedShutdownSquare is not None:
      oprot.writeFieldBegin('notifiedShutdownSquare', TType.STRUCT, 19)
      self.notifiedShutdownSquare.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedKickoutFromSquare is not None:
      oprot.writeFieldBegin('notifiedKickoutFromSquare', TType.STRUCT, 20)
      self.notifiedKickoutFromSquare.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedDeleteSquareChat is not None:
      oprot.writeFieldBegin('notifiedDeleteSquareChat', TType.STRUCT, 21)
      self.notifiedDeleteSquareChat.write(oprot)
      oprot.writeFieldEnd()
    if self.notificationJoinRequest is not None:
      oprot.writeFieldBegin('notificationJoinRequest', TType.STRUCT, 22)
      self.notificationJoinRequest.write(oprot)
      oprot.writeFieldEnd()
    if self.notificationJoined is not None:
      oprot.writeFieldBegin('notificationJoined', TType.STRUCT, 23)
      self.notificationJoined.write(oprot)
      oprot.writeFieldEnd()
    if self.notificationPromoteCoadmin is not None:
      oprot.writeFieldBegin('notificationPromoteCoadmin', TType.STRUCT, 24)
      self.notificationPromoteCoadmin.write(oprot)
      oprot.writeFieldEnd()
    if self.notificationPromoteAdmin is not None:
      oprot.writeFieldBegin('notificationPromoteAdmin', TType.STRUCT, 25)
      self.notificationPromoteAdmin.write(oprot)
      oprot.writeFieldEnd()
    if self.notificationDemoteMember is not None:
      oprot.writeFieldBegin('notificationDemoteMember', TType.STRUCT, 26)
      self.notificationDemoteMember.write(oprot)
      oprot.writeFieldEnd()
    if self.notificationKickedOut is not None:
      oprot.writeFieldBegin('notificationKickedOut', TType.STRUCT, 27)
      self.notificationKickedOut.write(oprot)
      oprot.writeFieldEnd()
    if self.notificationSquareDelete is not None:
      oprot.writeFieldBegin('notificationSquareDelete', TType.STRUCT, 28)
      self.notificationSquareDelete.write(oprot)
      oprot.writeFieldEnd()
    if self.notificationSquareChatDelete is not None:
      oprot.writeFieldBegin('notificationSquareChatDelete', TType.STRUCT, 29)
      self.notificationSquareChatDelete.write(oprot)
      oprot.writeFieldEnd()
    if self.notificationMessage is not None:
      oprot.writeFieldBegin('notificationMessage', TType.STRUCT, 30)
      self.notificationMessage.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareChatProfileName is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareChatProfileName', TType.STRUCT, 31)
      self.notifiedUpdateSquareChatProfileName.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareChatProfileImage is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareChatProfileImage', TType.STRUCT, 32)
      self.notifiedUpdateSquareChatProfileImage.write(oprot)
      oprot.writeFieldEnd()
    if self.notifiedUpdateSquareFeatureSet is not None:
      oprot.writeFieldBegin('notifiedUpdateSquareFeatureSet', TType.STRUCT, 33)
      self.notifiedUpdateSquareFeatureSet.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.receiveMessage)
    value = (value * 31) ^ hash(self.sendMessage)
    value = (value * 31) ^ hash(self.notifiedJoinSquareChat)
    value = (value * 31) ^ hash(self.notifiedInviteIntoSquareChat)
    value = (value * 31) ^ hash(self.notifiedLeaveSquareChat)
    value = (value * 31) ^ hash(self.notifiedDestroyMessage)
    value = (value * 31) ^ hash(self.notifiedMarkAsRead)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareMemberProfile)
    value = (value * 31) ^ hash(self.notifiedKickoutFromSquare)
    value = (value * 31) ^ hash(self.notifiedShutdownSquare)
    value = (value * 31) ^ hash(self.notifiedDeleteSquareChat)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareChatProfileName)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareChatProfileImage)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareStatus)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareChatStatus)
    value = (value * 31) ^ hash(self.notifiedCreateSquareMember)
    value = (value * 31) ^ hash(self.notifiedCreateSquareChatMember)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareMemberRelation)
    value = (value * 31) ^ hash(self.notifiedUpdateSquare)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareMember)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareChat)
    value = (value * 31) ^ hash(self.notificationJoinRequest)
    value = (value * 31) ^ hash(self.notificationJoined)
    value = (value * 31) ^ hash(self.notificationPromoteCoadmin)
    value = (value * 31) ^ hash(self.notificationPromoteAdmin)
    value = (value * 31) ^ hash(self.notificationDemoteMember)
    value = (value * 31) ^ hash(self.notificationKickedOut)
    value = (value * 31) ^ hash(self.notificationSquareDelete)
    value = (value * 31) ^ hash(self.notificationSquareChatDelete)
    value = (value * 31) ^ hash(self.notificationMessage)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareChatMember)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareAuthority)
    value = (value * 31) ^ hash(self.notifiedUpdateSquareFeatureSet)
    return value

  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 SquareEvent:
  """
  Attributes:
   - createdTime
   - type
   - payload
   - syncToken
   - eventStatus
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.I64, 'createdTime', None, None, ), # 2
    (3, TType.I32, 'type', None, None, ), # 3
    (4, TType.STRUCT, 'payload', (SquareEventPayload, SquareEventPayload.thrift_spec), None, ), # 4
    (5, TType.STRING, 'syncToken', None, None, ), # 5
    (6, TType.I32, 'eventStatus', None, None, ), # 6
  )

  def __init__(self, createdTime=None, type=None, payload=None, syncToken=None, eventStatus=None,):
    self.createdTime = createdTime
    self.type = type
    self.payload = payload
    self.syncToken = syncToken
    self.eventStatus = eventStatus

  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 == 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.STRUCT:
          self.payload = SquareEventPayload()
          self.payload.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.syncToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.eventStatus = 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('SquareEvent')
    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.payload is not None:
      oprot.writeFieldBegin('payload', TType.STRUCT, 4)
      self.payload.write(oprot)
      oprot.writeFieldEnd()
    if self.syncToken is not None:
      oprot.writeFieldBegin('syncToken', TType.STRING, 5)
      oprot.writeString(self.syncToken)
      oprot.writeFieldEnd()
    if self.eventStatus is not None:
      oprot.writeFieldBegin('eventStatus', TType.I32, 6)
      oprot.writeI32(self.eventStatus)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.createdTime)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.payload)
    value = (value * 31) ^ hash(self.syncToken)
    value = (value * 31) ^ hash(self.eventStatus)
    return value

  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 FetchMyEventsRequest:
  """
  Attributes:
   - subscriptionId
   - syncToken
   - limit
   - continuationToken
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'subscriptionId', None, None, ), # 1
    (2, TType.STRING, 'syncToken', None, None, ), # 2
    (3, TType.I32, 'limit', None, None, ), # 3
    (4, TType.STRING, 'continuationToken', None, None, ), # 4
  )

  def __init__(self, subscriptionId=None, syncToken=None, limit=None, continuationToken=None,):
    self.subscriptionId = subscriptionId
    self.syncToken = syncToken
    self.limit = limit
    self.continuationToken = continuationToken

  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.subscriptionId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.syncToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.limit = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.continuationToken = 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('FetchMyEventsRequest')
    if self.subscriptionId is not None:
      oprot.writeFieldBegin('subscriptionId', TType.I64, 1)
      oprot.writeI64(self.subscriptionId)
      oprot.writeFieldEnd()
    if self.syncToken is not None:
      oprot.writeFieldBegin('syncToken', TType.STRING, 2)
      oprot.writeString(self.syncToken)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I32, 3)
      oprot.writeI32(self.limit)
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.subscriptionId)
    value = (value * 31) ^ hash(self.syncToken)
    value = (value * 31) ^ hash(self.limit)
    value = (value * 31) ^ hash(self.continuationToken)
    return value

  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 FetchMyEventsResponse:
  """
  Attributes:
   - subscription
   - events
   - syncToken
   - continuationToken
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'subscription', (SubscriptionState, SubscriptionState.thrift_spec), None, ), # 1
    (2, TType.LIST, 'events', (TType.STRUCT,(SquareEvent, SquareEvent.thrift_spec)), None, ), # 2
    (3, TType.STRING, 'syncToken', None, None, ), # 3
    (4, TType.STRING, 'continuationToken', None, None, ), # 4
  )

  def __init__(self, subscription=None, events=None, syncToken=None, continuationToken=None,):
    self.subscription = subscription
    self.events = events
    self.syncToken = syncToken
    self.continuationToken = continuationToken

  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.subscription = SubscriptionState()
          self.subscription.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.events = []
          (_etype611, _size608) = iprot.readListBegin()
          for _i612 in xrange(_size608):
            _elem613 = SquareEvent()
            _elem613.read(iprot)
            self.events.append(_elem613)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.syncToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.continuationToken = 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('FetchMyEventsResponse')
    if self.subscription is not None:
      oprot.writeFieldBegin('subscription', TType.STRUCT, 1)
      self.subscription.write(oprot)
      oprot.writeFieldEnd()
    if self.events is not None:
      oprot.writeFieldBegin('events', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.events))
      for iter614 in self.events:
        iter614.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.syncToken is not None:
      oprot.writeFieldBegin('syncToken', TType.STRING, 3)
      oprot.writeString(self.syncToken)
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.subscription)
    value = (value * 31) ^ hash(self.events)
    value = (value * 31) ^ hash(self.syncToken)
    value = (value * 31) ^ hash(self.continuationToken)
    return value

  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 FetchSquareChatEventsRequest:
  """
  Attributes:
   - subscriptionId
   - squareChatMid
   - syncToken
   - limit
   - direction
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'subscriptionId', None, None, ), # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
    (3, TType.STRING, 'syncToken', None, None, ), # 3
    (4, TType.I32, 'limit', None, None, ), # 4
    (5, TType.I32, 'direction', None, None, ), # 5
  )

  def __init__(self, subscriptionId=None, squareChatMid=None, syncToken=None, limit=None, direction=None,):
    self.subscriptionId = subscriptionId
    self.squareChatMid = squareChatMid
    self.syncToken = syncToken
    self.limit = limit
    self.direction = direction

  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.subscriptionId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.syncToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.limit = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.direction = 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('FetchSquareChatEventsRequest')
    if self.subscriptionId is not None:
      oprot.writeFieldBegin('subscriptionId', TType.I64, 1)
      oprot.writeI64(self.subscriptionId)
      oprot.writeFieldEnd()
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.syncToken is not None:
      oprot.writeFieldBegin('syncToken', TType.STRING, 3)
      oprot.writeString(self.syncToken)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I32, 4)
      oprot.writeI32(self.limit)
      oprot.writeFieldEnd()
    if self.direction is not None:
      oprot.writeFieldBegin('direction', TType.I32, 5)
      oprot.writeI32(self.direction)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.subscriptionId)
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.syncToken)
    value = (value * 31) ^ hash(self.limit)
    value = (value * 31) ^ hash(self.direction)
    return value

  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 FetchSquareChatEventsResponse:
  """
  Attributes:
   - subscription
   - events
   - syncToken
   - continuationToken
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'subscription', (SubscriptionState, SubscriptionState.thrift_spec), None, ), # 1
    (2, TType.LIST, 'events', (TType.STRUCT,(SquareEvent, SquareEvent.thrift_spec)), None, ), # 2
    (3, TType.STRING, 'syncToken', None, None, ), # 3
    (4, TType.STRING, 'continuationToken', None, None, ), # 4
  )

  def __init__(self, subscription=None, events=None, syncToken=None, continuationToken=None,):
    self.subscription = subscription
    self.events = events
    self.syncToken = syncToken
    self.continuationToken = continuationToken

  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.subscription = SubscriptionState()
          self.subscription.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.events = []
          (_etype618, _size615) = iprot.readListBegin()
          for _i619 in xrange(_size615):
            _elem620 = SquareEvent()
            _elem620.read(iprot)
            self.events.append(_elem620)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.syncToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.continuationToken = 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('FetchSquareChatEventsResponse')
    if self.subscription is not None:
      oprot.writeFieldBegin('subscription', TType.STRUCT, 1)
      self.subscription.write(oprot)
      oprot.writeFieldEnd()
    if self.events is not None:
      oprot.writeFieldBegin('events', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.events))
      for iter621 in self.events:
        iter621.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.syncToken is not None:
      oprot.writeFieldBegin('syncToken', TType.STRING, 3)
      oprot.writeString(self.syncToken)
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.subscription)
    value = (value * 31) ^ hash(self.events)
    value = (value * 31) ^ hash(self.syncToken)
    value = (value * 31) ^ hash(self.continuationToken)
    return value

  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 InviteToSquareRequest:
  """
  Attributes:
   - squareMid
   - invitees
   - squareChatMid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.LIST, 'invitees', (TType.STRING,None), None, ), # 3
    (4, TType.STRING, 'squareChatMid', None, None, ), # 4
  )

  def __init__(self, squareMid=None, invitees=None, squareChatMid=None,):
    self.squareMid = squareMid
    self.invitees = invitees
    self.squareChatMid = squareChatMid

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.invitees = []
          (_etype625, _size622) = iprot.readListBegin()
          for _i626 in xrange(_size622):
            _elem627 = iprot.readString()
            self.invitees.append(_elem627)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.squareChatMid = 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('InviteToSquareRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.invitees is not None:
      oprot.writeFieldBegin('invitees', TType.LIST, 3)
      oprot.writeListBegin(TType.STRING, len(self.invitees))
      for iter628 in self.invitees:
        oprot.writeString(iter628)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 4)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.invitees)
    value = (value * 31) ^ hash(self.squareChatMid)
    return value

  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 InviteToSquareResponse:

  thrift_spec = (
  )

  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
      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('InviteToSquareResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 InviteToSquareChatRequest:
  """
  Attributes:
   - inviteeMids
   - squareChatMid
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'inviteeMids', (TType.STRING,None), None, ), # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
  )

  def __init__(self, inviteeMids=None, squareChatMid=None,):
    self.inviteeMids = inviteeMids
    self.squareChatMid = squareChatMid

  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.inviteeMids = []
          (_etype632, _size629) = iprot.readListBegin()
          for _i633 in xrange(_size629):
            _elem634 = iprot.readString()
            self.inviteeMids.append(_elem634)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareChatMid = 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('InviteToSquareChatRequest')
    if self.inviteeMids is not None:
      oprot.writeFieldBegin('inviteeMids', TType.LIST, 1)
      oprot.writeListBegin(TType.STRING, len(self.inviteeMids))
      for iter635 in self.inviteeMids:
        oprot.writeString(iter635)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.inviteeMids)
    value = (value * 31) ^ hash(self.squareChatMid)
    return value

  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 InviteToSquareChatResponse:
  """
  Attributes:
   - inviteeMids
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'inviteeMids', (TType.STRING,None), None, ), # 1
  )

  def __init__(self, inviteeMids=None,):
    self.inviteeMids = inviteeMids

  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.inviteeMids = []
          (_etype639, _size636) = iprot.readListBegin()
          for _i640 in xrange(_size636):
            _elem641 = iprot.readString()
            self.inviteeMids.append(_elem641)
          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('InviteToSquareChatResponse')
    if self.inviteeMids is not None:
      oprot.writeFieldBegin('inviteeMids', TType.LIST, 1)
      oprot.writeListBegin(TType.STRING, len(self.inviteeMids))
      for iter642 in self.inviteeMids:
        oprot.writeString(iter642)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.inviteeMids)
    return value

  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 GetSquareMemberRequest:
  """
  Attributes:
   - squareMemberMid
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMemberMid', None, None, ), # 1
  )

  def __init__(self, squareMemberMid=None,):
    self.squareMemberMid = squareMemberMid

  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.squareMemberMid = 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('GetSquareMemberRequest')
    if self.squareMemberMid is not None:
      oprot.writeFieldBegin('squareMemberMid', TType.STRING, 1)
      oprot.writeString(self.squareMemberMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMemberMid)
    return value

  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 GetSquareMemberResponse:
  """
  Attributes:
   - squareMember
   - relation
   - oneOnOneChatMid
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'squareMember', (SquareMember, SquareMember.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'relation', (SquareMemberRelation, SquareMemberRelation.thrift_spec), None, ), # 2
    (3, TType.STRING, 'oneOnOneChatMid', None, None, ), # 3
  )

  def __init__(self, squareMember=None, relation=None, oneOnOneChatMid=None,):
    self.squareMember = squareMember
    self.relation = relation
    self.oneOnOneChatMid = oneOnOneChatMid

  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.squareMember = SquareMember()
          self.squareMember.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.relation = SquareMemberRelation()
          self.relation.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.oneOnOneChatMid = 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('GetSquareMemberResponse')
    if self.squareMember is not None:
      oprot.writeFieldBegin('squareMember', TType.STRUCT, 1)
      self.squareMember.write(oprot)
      oprot.writeFieldEnd()
    if self.relation is not None:
      oprot.writeFieldBegin('relation', TType.STRUCT, 2)
      self.relation.write(oprot)
      oprot.writeFieldEnd()
    if self.oneOnOneChatMid is not None:
      oprot.writeFieldBegin('oneOnOneChatMid', TType.STRING, 3)
      oprot.writeString(self.oneOnOneChatMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMember)
    value = (value * 31) ^ hash(self.relation)
    value = (value * 31) ^ hash(self.oneOnOneChatMid)
    return value

  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 GetSquareMembersRequest:
  """
  Attributes:
   - mids
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.SET, 'mids', (TType.STRING,None), None, ), # 2
  )

  def __init__(self, mids=None,):
    self.mids = mids

  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 == 2:
        if ftype == TType.SET:
          self.mids = set()
          (_etype646, _size643) = iprot.readSetBegin()
          for _i647 in xrange(_size643):
            _elem648 = iprot.readString()
            self.mids.add(_elem648)
          iprot.readSetEnd()
        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('GetSquareMembersRequest')
    if self.mids is not None:
      oprot.writeFieldBegin('mids', TType.SET, 2)
      oprot.writeSetBegin(TType.STRING, len(self.mids))
      for iter649 in self.mids:
        oprot.writeString(iter649)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mids)
    return value

  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 GetSquareMembersResponse:
  """
  Attributes:
   - members
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'members', (SquareMember, SquareMember.thrift_spec), None, ), # 1
  )

  def __init__(self, members=None,):
    self.members = members

  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.members = SquareMember()
          self.members.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('GetSquareMembersResponse')
    if self.members is not None:
      oprot.writeFieldBegin('members', TType.STRUCT, 1)
      self.members.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.members)
    return value

  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 GetSquareMemberRelationsRequest:
  """
  Attributes:
   - state
   - continuationToken
   - limit
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.I32, 'state', None, None, ), # 2
    (3, TType.STRING, 'continuationToken', None, None, ), # 3
    (4, TType.I32, 'limit', None, None, ), # 4
  )

  def __init__(self, state=None, continuationToken=None, limit=None,):
    self.state = state
    self.continuationToken = continuationToken
    self.limit = limit

  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 == 2:
        if ftype == TType.I32:
          self.state = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.limit = 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('GetSquareMemberRelationsRequest')
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.I32, 2)
      oprot.writeI32(self.state)
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 3)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I32, 4)
      oprot.writeI32(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.state)
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.limit)
    return value

  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 GetSquareMemberRelationsResponse:
  """
  Attributes:
   - squareMembers
   - relations
   - continuationToken
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'squareMembers', (TType.STRUCT,(SquareMember, SquareMember.thrift_spec)), None, ), # 1
    (2, TType.MAP, 'relations', (TType.STRING,None,TType.STRUCT,(SquareMemberRelation, SquareMemberRelation.thrift_spec)), None, ), # 2
    (3, TType.STRING, 'continuationToken', None, None, ), # 3
  )

  def __init__(self, squareMembers=None, relations=None, continuationToken=None,):
    self.squareMembers = squareMembers
    self.relations = relations
    self.continuationToken = continuationToken

  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.squareMembers = []
          (_etype653, _size650) = iprot.readListBegin()
          for _i654 in xrange(_size650):
            _elem655 = SquareMember()
            _elem655.read(iprot)
            self.squareMembers.append(_elem655)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.relations = {}
          (_ktype657, _vtype658, _size656 ) = iprot.readMapBegin()
          for _i660 in xrange(_size656):
            _key661 = iprot.readString()
            _val662 = SquareMemberRelation()
            _val662.read(iprot)
            self.relations[_key661] = _val662
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.continuationToken = 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('GetSquareMemberRelationsResponse')
    if self.squareMembers is not None:
      oprot.writeFieldBegin('squareMembers', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.squareMembers))
      for iter663 in self.squareMembers:
        iter663.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.relations is not None:
      oprot.writeFieldBegin('relations', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.relations))
      for kiter664,viter665 in self.relations.items():
        oprot.writeString(kiter664)
        viter665.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 3)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMembers)
    value = (value * 31) ^ hash(self.relations)
    value = (value * 31) ^ hash(self.continuationToken)
    return value

  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 GetSquareMemberRelationRequest:
  """
  Attributes:
   - squareMid
   - targetSquareMemberMid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.STRING, 'targetSquareMemberMid', None, None, ), # 3
  )

  def __init__(self, squareMid=None, targetSquareMemberMid=None,):
    self.squareMid = squareMid
    self.targetSquareMemberMid = targetSquareMemberMid

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.targetSquareMemberMid = 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('GetSquareMemberRelationRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.targetSquareMemberMid is not None:
      oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 3)
      oprot.writeString(self.targetSquareMemberMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.targetSquareMemberMid)
    return value

  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 GetSquareMemberRelationResponse:
  """
  Attributes:
   - squareMid
   - targetSquareMemberMid
   - relation
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRING, 'targetSquareMemberMid', None, None, ), # 2
    (3, TType.STRUCT, 'relation', (SquareMemberRelation, SquareMemberRelation.thrift_spec), None, ), # 3
  )

  def __init__(self, squareMid=None, targetSquareMemberMid=None, relation=None,):
    self.squareMid = squareMid
    self.targetSquareMemberMid = targetSquareMemberMid
    self.relation = relation

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.targetSquareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.relation = SquareMemberRelation()
          self.relation.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('GetSquareMemberRelationResponse')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.targetSquareMemberMid is not None:
      oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 2)
      oprot.writeString(self.targetSquareMemberMid)
      oprot.writeFieldEnd()
    if self.relation is not None:
      oprot.writeFieldBegin('relation', TType.STRUCT, 3)
      self.relation.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.targetSquareMemberMid)
    value = (value * 31) ^ hash(self.relation)
    return value

  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 Category:
  """
  Attributes:
   - id
   - name
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'id', None, None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
  )

  def __init__(self, id=None, name=None,):
    self.id = id
    self.name = name

  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.id = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = 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('Category')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I32, 1)
      oprot.writeI32(self.id)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.name)
    return value

  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 GetSquareCategoriesRequest:

  thrift_spec = (
  )

  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
      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('GetSquareCategoriesRequest')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 GetSquareCategoriesResponse:
  """
  Attributes:
   - categoryList
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'categoryList', (TType.STRUCT,(Category, Category.thrift_spec)), None, ), # 1
  )

  def __init__(self, categoryList=None,):
    self.categoryList = categoryList

  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.categoryList = []
          (_etype669, _size666) = iprot.readListBegin()
          for _i670 in xrange(_size666):
            _elem671 = Category()
            _elem671.read(iprot)
            self.categoryList.append(_elem671)
          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('GetSquareCategoriesResponse')
    if self.categoryList is not None:
      oprot.writeFieldBegin('categoryList', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.categoryList))
      for iter672 in self.categoryList:
        iter672.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.categoryList)
    return value

  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 UpdateSquareRequest:
  """
  Attributes:
   - updatedAttrs
   - square
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 2
    (3, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 3
  )

  def __init__(self, updatedAttrs=None, square=None,):
    self.updatedAttrs = updatedAttrs
    self.square = square

  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 == 2:
        if ftype == TType.SET:
          self.updatedAttrs = set()
          (_etype676, _size673) = iprot.readSetBegin()
          for _i677 in xrange(_size673):
            _elem678 = iprot.readI32()
            self.updatedAttrs.add(_elem678)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.square = Square()
          self.square.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('UpdateSquareRequest')
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 2)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter679 in self.updatedAttrs:
        oprot.writeI32(iter679)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 3)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.square)
    return value

  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 UpdateSquareResponse:
  """
  Attributes:
   - updatedAttrs
   - square
  """

  thrift_spec = (
    None, # 0
    (1, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 1
    (2, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 2
  )

  def __init__(self, updatedAttrs=None, square=None,):
    self.updatedAttrs = updatedAttrs
    self.square = square

  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.SET:
          self.updatedAttrs = set()
          (_etype683, _size680) = iprot.readSetBegin()
          for _i684 in xrange(_size680):
            _elem685 = iprot.readI32()
            self.updatedAttrs.add(_elem685)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.square = Square()
          self.square.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('UpdateSquareResponse')
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 1)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter686 in self.updatedAttrs:
        oprot.writeI32(iter686)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 2)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.square)
    return value

  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 SearchSquaresRequest:
  """
  Attributes:
   - query
   - continuationToken
   - limit
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'query', None, None, ), # 2
    (3, TType.STRING, 'continuationToken', None, None, ), # 3
    (4, TType.I32, 'limit', None, None, ), # 4
  )

  def __init__(self, query=None, continuationToken=None, limit=None,):
    self.query = query
    self.continuationToken = continuationToken
    self.limit = limit

  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 == 2:
        if ftype == TType.STRING:
          self.query = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.limit = 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('SearchSquaresRequest')
    if self.query is not None:
      oprot.writeFieldBegin('query', TType.STRING, 2)
      oprot.writeString(self.query)
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 3)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I32, 4)
      oprot.writeI32(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.query)
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.limit)
    return value

  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 SearchSquaresResponse:
  """
  Attributes:
   - squares
   - squareStatuses
   - myMemberships
   - continuationToken
   - noteStatuses
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'squares', (TType.STRUCT,(Square, Square.thrift_spec)), None, ), # 1
    (2, TType.MAP, 'squareStatuses', (TType.STRING,None,TType.STRUCT,(SquareStatus, SquareStatus.thrift_spec)), None, ), # 2
    (3, TType.MAP, 'myMemberships', (TType.STRING,None,TType.STRUCT,(SquareMember, SquareMember.thrift_spec)), None, ), # 3
    (4, TType.STRING, 'continuationToken', None, None, ), # 4
    (5, TType.MAP, 'noteStatuses', (TType.STRING,None,TType.STRUCT,(NoteStatus, NoteStatus.thrift_spec)), None, ), # 5
  )

  def __init__(self, squares=None, squareStatuses=None, myMemberships=None, continuationToken=None, noteStatuses=None,):
    self.squares = squares
    self.squareStatuses = squareStatuses
    self.myMemberships = myMemberships
    self.continuationToken = continuationToken
    self.noteStatuses = noteStatuses

  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.squares = []
          (_etype690, _size687) = iprot.readListBegin()
          for _i691 in xrange(_size687):
            _elem692 = Square()
            _elem692.read(iprot)
            self.squares.append(_elem692)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.squareStatuses = {}
          (_ktype694, _vtype695, _size693 ) = iprot.readMapBegin()
          for _i697 in xrange(_size693):
            _key698 = iprot.readString()
            _val699 = SquareStatus()
            _val699.read(iprot)
            self.squareStatuses[_key698] = _val699
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.myMemberships = {}
          (_ktype701, _vtype702, _size700 ) = iprot.readMapBegin()
          for _i704 in xrange(_size700):
            _key705 = iprot.readString()
            _val706 = SquareMember()
            _val706.read(iprot)
            self.myMemberships[_key705] = _val706
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.MAP:
          self.noteStatuses = {}
          (_ktype708, _vtype709, _size707 ) = iprot.readMapBegin()
          for _i711 in xrange(_size707):
            _key712 = iprot.readString()
            _val713 = NoteStatus()
            _val713.read(iprot)
            self.noteStatuses[_key712] = _val713
          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('SearchSquaresResponse')
    if self.squares is not None:
      oprot.writeFieldBegin('squares', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.squares))
      for iter714 in self.squares:
        iter714.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.squareStatuses is not None:
      oprot.writeFieldBegin('squareStatuses', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.squareStatuses))
      for kiter715,viter716 in self.squareStatuses.items():
        oprot.writeString(kiter715)
        viter716.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.myMemberships is not None:
      oprot.writeFieldBegin('myMemberships', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.myMemberships))
      for kiter717,viter718 in self.myMemberships.items():
        oprot.writeString(kiter717)
        viter718.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.noteStatuses is not None:
      oprot.writeFieldBegin('noteStatuses', TType.MAP, 5)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.noteStatuses))
      for kiter719,viter720 in self.noteStatuses.items():
        oprot.writeString(kiter719)
        viter720.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squares)
    value = (value * 31) ^ hash(self.squareStatuses)
    value = (value * 31) ^ hash(self.myMemberships)
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.noteStatuses)
    return value

  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 GetSquareFeatureSetRequest:
  """
  Attributes:
   - squareMid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
  )

  def __init__(self, squareMid=None,):
    self.squareMid = squareMid

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = 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('GetSquareFeatureSetRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    return value

  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 GetSquareFeatureSetResponse:
  """
  Attributes:
   - squareFeatureSet
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'squareFeatureSet', (SquareFeatureSet, SquareFeatureSet.thrift_spec), None, ), # 1
  )

  def __init__(self, squareFeatureSet=None,):
    self.squareFeatureSet = squareFeatureSet

  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.squareFeatureSet = SquareFeatureSet()
          self.squareFeatureSet.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('GetSquareFeatureSetResponse')
    if self.squareFeatureSet is not None:
      oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 1)
      self.squareFeatureSet.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareFeatureSet)
    return value

  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 UpdateSquareFeatureSetRequest:
  """
  Attributes:
   - updateAttributes
   - squareFeatureSet
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.SET, 'updateAttributes', (TType.I32,None), None, ), # 2
    (3, TType.STRUCT, 'squareFeatureSet', (SquareFeatureSet, SquareFeatureSet.thrift_spec), None, ), # 3
  )

  def __init__(self, updateAttributes=None, squareFeatureSet=None,):
    self.updateAttributes = updateAttributes
    self.squareFeatureSet = squareFeatureSet

  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 == 2:
        if ftype == TType.SET:
          self.updateAttributes = set()
          (_etype724, _size721) = iprot.readSetBegin()
          for _i725 in xrange(_size721):
            _elem726 = iprot.readI32()
            self.updateAttributes.add(_elem726)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareFeatureSet = SquareFeatureSet()
          self.squareFeatureSet.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('UpdateSquareFeatureSetRequest')
    if self.updateAttributes is not None:
      oprot.writeFieldBegin('updateAttributes', TType.SET, 2)
      oprot.writeSetBegin(TType.I32, len(self.updateAttributes))
      for iter727 in self.updateAttributes:
        oprot.writeI32(iter727)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.squareFeatureSet is not None:
      oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 3)
      self.squareFeatureSet.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updateAttributes)
    value = (value * 31) ^ hash(self.squareFeatureSet)
    return value

  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 UpdateSquareFeatureSetResponse:
  """
  Attributes:
   - updateAttributes
   - squareFeatureSet
  """

  thrift_spec = (
    None, # 0
    (1, TType.SET, 'updateAttributes', (TType.I32,None), None, ), # 1
    (2, TType.STRUCT, 'squareFeatureSet', (SquareFeatureSet, SquareFeatureSet.thrift_spec), None, ), # 2
  )

  def __init__(self, updateAttributes=None, squareFeatureSet=None,):
    self.updateAttributes = updateAttributes
    self.squareFeatureSet = squareFeatureSet

  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.SET:
          self.updateAttributes = set()
          (_etype731, _size728) = iprot.readSetBegin()
          for _i732 in xrange(_size728):
            _elem733 = iprot.readI32()
            self.updateAttributes.add(_elem733)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareFeatureSet = SquareFeatureSet()
          self.squareFeatureSet.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('UpdateSquareFeatureSetResponse')
    if self.updateAttributes is not None:
      oprot.writeFieldBegin('updateAttributes', TType.SET, 1)
      oprot.writeSetBegin(TType.I32, len(self.updateAttributes))
      for iter734 in self.updateAttributes:
        oprot.writeI32(iter734)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.squareFeatureSet is not None:
      oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 2)
      self.squareFeatureSet.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updateAttributes)
    value = (value * 31) ^ hash(self.squareFeatureSet)
    return value

  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 UpdateSquareMemberRequest:
  """
  Attributes:
   - updatedAttrs
   - updatedPreferenceAttrs
   - squareMember
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 2
    (3, TType.SET, 'updatedPreferenceAttrs', (TType.I32,None), None, ), # 3
    (4, TType.STRUCT, 'squareMember', (SquareMember, SquareMember.thrift_spec), None, ), # 4
  )

  def __init__(self, updatedAttrs=None, updatedPreferenceAttrs=None, squareMember=None,):
    self.updatedAttrs = updatedAttrs
    self.updatedPreferenceAttrs = updatedPreferenceAttrs
    self.squareMember = squareMember

  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 == 2:
        if ftype == TType.SET:
          self.updatedAttrs = set()
          (_etype738, _size735) = iprot.readSetBegin()
          for _i739 in xrange(_size735):
            _elem740 = iprot.readI32()
            self.updatedAttrs.add(_elem740)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.SET:
          self.updatedPreferenceAttrs = set()
          (_etype744, _size741) = iprot.readSetBegin()
          for _i745 in xrange(_size741):
            _elem746 = iprot.readI32()
            self.updatedPreferenceAttrs.add(_elem746)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.squareMember = SquareMember()
          self.squareMember.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('UpdateSquareMemberRequest')
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 2)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter747 in self.updatedAttrs:
        oprot.writeI32(iter747)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.updatedPreferenceAttrs is not None:
      oprot.writeFieldBegin('updatedPreferenceAttrs', TType.SET, 3)
      oprot.writeSetBegin(TType.I32, len(self.updatedPreferenceAttrs))
      for iter748 in self.updatedPreferenceAttrs:
        oprot.writeI32(iter748)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.squareMember is not None:
      oprot.writeFieldBegin('squareMember', TType.STRUCT, 4)
      self.squareMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.updatedPreferenceAttrs)
    value = (value * 31) ^ hash(self.squareMember)
    return value

  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 UpdateSquareMemberResponse:
  """
  Attributes:
   - updatedAttrs
   - squareMember
   - updatedPreferenceAttrs
  """

  thrift_spec = (
    None, # 0
    (1, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 1
    (2, TType.STRUCT, 'squareMember', (SquareMember, SquareMember.thrift_spec), None, ), # 2
    (3, TType.SET, 'updatedPreferenceAttrs', (TType.I32,None), None, ), # 3
  )

  def __init__(self, updatedAttrs=None, squareMember=None, updatedPreferenceAttrs=None,):
    self.updatedAttrs = updatedAttrs
    self.squareMember = squareMember
    self.updatedPreferenceAttrs = updatedPreferenceAttrs

  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.SET:
          self.updatedAttrs = set()
          (_etype752, _size749) = iprot.readSetBegin()
          for _i753 in xrange(_size749):
            _elem754 = iprot.readI32()
            self.updatedAttrs.add(_elem754)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareMember = SquareMember()
          self.squareMember.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.SET:
          self.updatedPreferenceAttrs = set()
          (_etype758, _size755) = iprot.readSetBegin()
          for _i759 in xrange(_size755):
            _elem760 = iprot.readI32()
            self.updatedPreferenceAttrs.add(_elem760)
          iprot.readSetEnd()
        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('UpdateSquareMemberResponse')
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 1)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter761 in self.updatedAttrs:
        oprot.writeI32(iter761)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.squareMember is not None:
      oprot.writeFieldBegin('squareMember', TType.STRUCT, 2)
      self.squareMember.write(oprot)
      oprot.writeFieldEnd()
    if self.updatedPreferenceAttrs is not None:
      oprot.writeFieldBegin('updatedPreferenceAttrs', TType.SET, 3)
      oprot.writeSetBegin(TType.I32, len(self.updatedPreferenceAttrs))
      for iter762 in self.updatedPreferenceAttrs:
        oprot.writeI32(iter762)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.squareMember)
    value = (value * 31) ^ hash(self.updatedPreferenceAttrs)
    return value

  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 UpdateSquareMembersRequest:
  """
  Attributes:
   - updatedAttrs
   - members
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 2
    (3, TType.LIST, 'members', (TType.STRUCT,(SquareMember, SquareMember.thrift_spec)), None, ), # 3
  )

  def __init__(self, updatedAttrs=None, members=None,):
    self.updatedAttrs = updatedAttrs
    self.members = members

  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 == 2:
        if ftype == TType.SET:
          self.updatedAttrs = set()
          (_etype766, _size763) = iprot.readSetBegin()
          for _i767 in xrange(_size763):
            _elem768 = iprot.readI32()
            self.updatedAttrs.add(_elem768)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.members = []
          (_etype772, _size769) = iprot.readListBegin()
          for _i773 in xrange(_size769):
            _elem774 = SquareMember()
            _elem774.read(iprot)
            self.members.append(_elem774)
          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('UpdateSquareMembersRequest')
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 2)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter775 in self.updatedAttrs:
        oprot.writeI32(iter775)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.members is not None:
      oprot.writeFieldBegin('members', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.members))
      for iter776 in self.members:
        iter776.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.members)
    return value

  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 UpdateSquareMembersResponse:
  """
  Attributes:
   - updatedAttrs
   - editor
   - members
  """

  thrift_spec = (
    None, # 0
    (1, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 1
    (2, TType.STRUCT, 'editor', (SquareMember, SquareMember.thrift_spec), None, ), # 2
    (3, TType.MAP, 'members', (TType.STRING,None,TType.STRUCT,(SquareMember, SquareMember.thrift_spec)), None, ), # 3
  )

  def __init__(self, updatedAttrs=None, editor=None, members=None,):
    self.updatedAttrs = updatedAttrs
    self.editor = editor
    self.members = members

  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.SET:
          self.updatedAttrs = set()
          (_etype780, _size777) = iprot.readSetBegin()
          for _i781 in xrange(_size777):
            _elem782 = iprot.readI32()
            self.updatedAttrs.add(_elem782)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.editor = SquareMember()
          self.editor.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.members = {}
          (_ktype784, _vtype785, _size783 ) = iprot.readMapBegin()
          for _i787 in xrange(_size783):
            _key788 = iprot.readString()
            _val789 = SquareMember()
            _val789.read(iprot)
            self.members[_key788] = _val789
          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('UpdateSquareMembersResponse')
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 1)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter790 in self.updatedAttrs:
        oprot.writeI32(iter790)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.editor is not None:
      oprot.writeFieldBegin('editor', TType.STRUCT, 2)
      self.editor.write(oprot)
      oprot.writeFieldEnd()
    if self.members is not None:
      oprot.writeFieldBegin('members', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.members))
      for kiter791,viter792 in self.members.items():
        oprot.writeString(kiter791)
        viter792.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.editor)
    value = (value * 31) ^ hash(self.members)
    return value

  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 RejectSquareMembersRequest:
  """
  Attributes:
   - squareMid
   - requestedMemberMids
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.LIST, 'requestedMemberMids', (TType.STRING,None), None, ), # 3
  )

  def __init__(self, squareMid=None, requestedMemberMids=None,):
    self.squareMid = squareMid
    self.requestedMemberMids = requestedMemberMids

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.requestedMemberMids = []
          (_etype796, _size793) = iprot.readListBegin()
          for _i797 in xrange(_size793):
            _elem798 = iprot.readString()
            self.requestedMemberMids.append(_elem798)
          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('RejectSquareMembersRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.requestedMemberMids is not None:
      oprot.writeFieldBegin('requestedMemberMids', TType.LIST, 3)
      oprot.writeListBegin(TType.STRING, len(self.requestedMemberMids))
      for iter799 in self.requestedMemberMids:
        oprot.writeString(iter799)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.requestedMemberMids)
    return value

  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 RejectSquareMembersResponse:
  """
  Attributes:
   - rejectedMembers
   - status
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'rejectedMembers', (TType.STRUCT,(SquareMember, SquareMember.thrift_spec)), None, ), # 1
    (2, TType.STRUCT, 'status', (SquareStatus, SquareStatus.thrift_spec), None, ), # 2
  )

  def __init__(self, rejectedMembers=None, status=None,):
    self.rejectedMembers = rejectedMembers
    self.status = status

  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.rejectedMembers = []
          (_etype803, _size800) = iprot.readListBegin()
          for _i804 in xrange(_size800):
            _elem805 = SquareMember()
            _elem805.read(iprot)
            self.rejectedMembers.append(_elem805)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.status = SquareStatus()
          self.status.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('RejectSquareMembersResponse')
    if self.rejectedMembers is not None:
      oprot.writeFieldBegin('rejectedMembers', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.rejectedMembers))
      for iter806 in self.rejectedMembers:
        iter806.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.STRUCT, 2)
      self.status.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.rejectedMembers)
    value = (value * 31) ^ hash(self.status)
    return value

  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 RemoveSubscriptionsRequest:
  """
  Attributes:
   - unsubscriptions
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.LIST, 'unsubscriptions', (TType.I64,None), None, ), # 2
  )

  def __init__(self, unsubscriptions=None,):
    self.unsubscriptions = unsubscriptions

  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 == 2:
        if ftype == TType.LIST:
          self.unsubscriptions = []
          (_etype810, _size807) = iprot.readListBegin()
          for _i811 in xrange(_size807):
            _elem812 = iprot.readI64()
            self.unsubscriptions.append(_elem812)
          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('RemoveSubscriptionsRequest')
    if self.unsubscriptions is not None:
      oprot.writeFieldBegin('unsubscriptions', TType.LIST, 2)
      oprot.writeListBegin(TType.I64, len(self.unsubscriptions))
      for iter813 in self.unsubscriptions:
        oprot.writeI64(iter813)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.unsubscriptions)
    return value

  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 RemoveSubscriptionsResponse:

  thrift_spec = (
  )

  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
      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('RemoveSubscriptionsResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 RefreshSubscriptionsRequest:
  """
  Attributes:
   - subscriptions
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.LIST, 'subscriptions', (TType.I64,None), None, ), # 2
  )

  def __init__(self, subscriptions=None,):
    self.subscriptions = subscriptions

  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 == 2:
        if ftype == TType.LIST:
          self.subscriptions = []
          (_etype817, _size814) = iprot.readListBegin()
          for _i818 in xrange(_size814):
            _elem819 = iprot.readI64()
            self.subscriptions.append(_elem819)
          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('RefreshSubscriptionsRequest')
    if self.subscriptions is not None:
      oprot.writeFieldBegin('subscriptions', TType.LIST, 2)
      oprot.writeListBegin(TType.I64, len(self.subscriptions))
      for iter820 in self.subscriptions:
        oprot.writeI64(iter820)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.subscriptions)
    return value

  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 RefreshSubscriptionsResponse:
  """
  Attributes:
   - ttlMillis
   - subscriptionStates
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'ttlMillis', None, None, ), # 1
    (2, TType.MAP, 'subscriptionStates', (TType.I64,None,TType.STRUCT,(SubscriptionState, SubscriptionState.thrift_spec)), None, ), # 2
  )

  def __init__(self, ttlMillis=None, subscriptionStates=None,):
    self.ttlMillis = ttlMillis
    self.subscriptionStates = subscriptionStates

  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.ttlMillis = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.subscriptionStates = {}
          (_ktype822, _vtype823, _size821 ) = iprot.readMapBegin()
          for _i825 in xrange(_size821):
            _key826 = iprot.readI64()
            _val827 = SubscriptionState()
            _val827.read(iprot)
            self.subscriptionStates[_key826] = _val827
          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('RefreshSubscriptionsResponse')
    if self.ttlMillis is not None:
      oprot.writeFieldBegin('ttlMillis', TType.I64, 1)
      oprot.writeI64(self.ttlMillis)
      oprot.writeFieldEnd()
    if self.subscriptionStates is not None:
      oprot.writeFieldBegin('subscriptionStates', TType.MAP, 2)
      oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.subscriptionStates))
      for kiter828,viter829 in self.subscriptionStates.items():
        oprot.writeI64(kiter828)
        viter829.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.ttlMillis)
    value = (value * 31) ^ hash(self.subscriptionStates)
    return value

  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 UpdateSquareChatRequest:
  """
  Attributes:
   - updatedAttrs
   - squareChat
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 2
    (3, TType.STRUCT, 'squareChat', (SquareChat, SquareChat.thrift_spec), None, ), # 3
  )

  def __init__(self, updatedAttrs=None, squareChat=None,):
    self.updatedAttrs = updatedAttrs
    self.squareChat = squareChat

  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 == 2:
        if ftype == TType.SET:
          self.updatedAttrs = set()
          (_etype833, _size830) = iprot.readSetBegin()
          for _i834 in xrange(_size830):
            _elem835 = iprot.readI32()
            self.updatedAttrs.add(_elem835)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareChat = SquareChat()
          self.squareChat.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('UpdateSquareChatRequest')
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 2)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter836 in self.updatedAttrs:
        oprot.writeI32(iter836)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.squareChat is not None:
      oprot.writeFieldBegin('squareChat', TType.STRUCT, 3)
      self.squareChat.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.squareChat)
    return value

  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 UpdateSquareChatResponse:
  """
  Attributes:
   - updatedAttrs
   - squareChat
  """

  thrift_spec = (
    None, # 0
    (1, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 1
    (2, TType.STRUCT, 'squareChat', (SquareChat, SquareChat.thrift_spec), None, ), # 2
  )

  def __init__(self, updatedAttrs=None, squareChat=None,):
    self.updatedAttrs = updatedAttrs
    self.squareChat = squareChat

  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.SET:
          self.updatedAttrs = set()
          (_etype840, _size837) = iprot.readSetBegin()
          for _i841 in xrange(_size837):
            _elem842 = iprot.readI32()
            self.updatedAttrs.add(_elem842)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.squareChat = SquareChat()
          self.squareChat.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('UpdateSquareChatResponse')
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 1)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter843 in self.updatedAttrs:
        oprot.writeI32(iter843)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.squareChat is not None:
      oprot.writeFieldBegin('squareChat', TType.STRUCT, 2)
      self.squareChat.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.squareChat)
    return value

  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 DeleteSquareChatRequest:
  """
  Attributes:
   - squareChatMid
   - revision
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
    (3, TType.I64, 'revision', None, None, ), # 3
  )

  def __init__(self, squareChatMid=None, revision=None,):
    self.squareChatMid = squareChatMid
    self.revision = revision

  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 == 2:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.revision = iprot.readI64()
        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('DeleteSquareChatRequest')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.revision is not None:
      oprot.writeFieldBegin('revision', TType.I64, 3)
      oprot.writeI64(self.revision)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.revision)
    return value

  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 DeleteSquareChatResponse:

  thrift_spec = (
  )

  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
      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('DeleteSquareChatResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 UpdateSquareChatMemberRequest:
  """
  Attributes:
   - updatedAttrs
   - chatMember
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 2
    (3, TType.STRUCT, 'chatMember', (SquareChatMember, SquareChatMember.thrift_spec), None, ), # 3
  )

  def __init__(self, updatedAttrs=None, chatMember=None,):
    self.updatedAttrs = updatedAttrs
    self.chatMember = chatMember

  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 == 2:
        if ftype == TType.SET:
          self.updatedAttrs = set()
          (_etype847, _size844) = iprot.readSetBegin()
          for _i848 in xrange(_size844):
            _elem849 = iprot.readI32()
            self.updatedAttrs.add(_elem849)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.chatMember = SquareChatMember()
          self.chatMember.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('UpdateSquareChatMemberRequest')
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 2)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter850 in self.updatedAttrs:
        oprot.writeI32(iter850)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.chatMember is not None:
      oprot.writeFieldBegin('chatMember', TType.STRUCT, 3)
      self.chatMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.chatMember)
    return value

  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 UpdateSquareChatMemberResponse:
  """
  Attributes:
   - updatedChatMember
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'updatedChatMember', (SquareChatMember, SquareChatMember.thrift_spec), None, ), # 1
  )

  def __init__(self, updatedChatMember=None,):
    self.updatedChatMember = updatedChatMember

  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.updatedChatMember = SquareChatMember()
          self.updatedChatMember.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('UpdateSquareChatMemberResponse')
    if self.updatedChatMember is not None:
      oprot.writeFieldBegin('updatedChatMember', TType.STRUCT, 1)
      self.updatedChatMember.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatedChatMember)
    return value

  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 UpdateSquareAuthorityRequest:
  """
  Attributes:
   - updateAttributes
   - authority
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.SET, 'updateAttributes', (TType.I32,None), None, ), # 2
    (3, TType.STRUCT, 'authority', (SquareAuthority, SquareAuthority.thrift_spec), None, ), # 3
  )

  def __init__(self, updateAttributes=None, authority=None,):
    self.updateAttributes = updateAttributes
    self.authority = authority

  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 == 2:
        if ftype == TType.SET:
          self.updateAttributes = set()
          (_etype854, _size851) = iprot.readSetBegin()
          for _i855 in xrange(_size851):
            _elem856 = iprot.readI32()
            self.updateAttributes.add(_elem856)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.authority = SquareAuthority()
          self.authority.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('UpdateSquareAuthorityRequest')
    if self.updateAttributes is not None:
      oprot.writeFieldBegin('updateAttributes', TType.SET, 2)
      oprot.writeSetBegin(TType.I32, len(self.updateAttributes))
      for iter857 in self.updateAttributes:
        oprot.writeI32(iter857)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.authority is not None:
      oprot.writeFieldBegin('authority', TType.STRUCT, 3)
      self.authority.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updateAttributes)
    value = (value * 31) ^ hash(self.authority)
    return value

  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 UpdateSquareAuthorityResponse:
  """
  Attributes:
   - updatdAttributes
   - authority
  """

  thrift_spec = (
    None, # 0
    (1, TType.SET, 'updatdAttributes', (TType.I32,None), None, ), # 1
    (2, TType.STRUCT, 'authority', (SquareAuthority, SquareAuthority.thrift_spec), None, ), # 2
  )

  def __init__(self, updatdAttributes=None, authority=None,):
    self.updatdAttributes = updatdAttributes
    self.authority = authority

  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.SET:
          self.updatdAttributes = set()
          (_etype861, _size858) = iprot.readSetBegin()
          for _i862 in xrange(_size858):
            _elem863 = iprot.readI32()
            self.updatdAttributes.add(_elem863)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.authority = SquareAuthority()
          self.authority.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('UpdateSquareAuthorityResponse')
    if self.updatdAttributes is not None:
      oprot.writeFieldBegin('updatdAttributes', TType.SET, 1)
      oprot.writeSetBegin(TType.I32, len(self.updatdAttributes))
      for iter864 in self.updatdAttributes:
        oprot.writeI32(iter864)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.authority is not None:
      oprot.writeFieldBegin('authority', TType.STRUCT, 2)
      self.authority.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.updatdAttributes)
    value = (value * 31) ^ hash(self.authority)
    return value

  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 UpdateSquareMemberRelationRequest:
  """
  Attributes:
   - squareMid
   - targetSquareMemberMid
   - updatedAttrs
   - relation
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.STRING, 'targetSquareMemberMid', None, None, ), # 3
    (4, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 4
    (5, TType.STRUCT, 'relation', (SquareMemberRelation, SquareMemberRelation.thrift_spec), None, ), # 5
  )

  def __init__(self, squareMid=None, targetSquareMemberMid=None, updatedAttrs=None, relation=None,):
    self.squareMid = squareMid
    self.targetSquareMemberMid = targetSquareMemberMid
    self.updatedAttrs = updatedAttrs
    self.relation = relation

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.targetSquareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.SET:
          self.updatedAttrs = set()
          (_etype868, _size865) = iprot.readSetBegin()
          for _i869 in xrange(_size865):
            _elem870 = iprot.readI32()
            self.updatedAttrs.add(_elem870)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRUCT:
          self.relation = SquareMemberRelation()
          self.relation.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('UpdateSquareMemberRelationRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.targetSquareMemberMid is not None:
      oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 3)
      oprot.writeString(self.targetSquareMemberMid)
      oprot.writeFieldEnd()
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 4)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter871 in self.updatedAttrs:
        oprot.writeI32(iter871)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.relation is not None:
      oprot.writeFieldBegin('relation', TType.STRUCT, 5)
      self.relation.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.targetSquareMemberMid)
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.relation)
    return value

  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 UpdateSquareMemberRelationResponse:
  """
  Attributes:
   - squareMid
   - targetSquareMemberMid
   - updatedAttrs
   - relation
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRING, 'targetSquareMemberMid', None, None, ), # 2
    (3, TType.SET, 'updatedAttrs', (TType.I32,None), None, ), # 3
    (4, TType.STRUCT, 'relation', (SquareMemberRelation, SquareMemberRelation.thrift_spec), None, ), # 4
  )

  def __init__(self, squareMid=None, targetSquareMemberMid=None, updatedAttrs=None, relation=None,):
    self.squareMid = squareMid
    self.targetSquareMemberMid = targetSquareMemberMid
    self.updatedAttrs = updatedAttrs
    self.relation = relation

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.targetSquareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.SET:
          self.updatedAttrs = set()
          (_etype875, _size872) = iprot.readSetBegin()
          for _i876 in xrange(_size872):
            _elem877 = iprot.readI32()
            self.updatedAttrs.add(_elem877)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.relation = SquareMemberRelation()
          self.relation.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('UpdateSquareMemberRelationResponse')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.targetSquareMemberMid is not None:
      oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 2)
      oprot.writeString(self.targetSquareMemberMid)
      oprot.writeFieldEnd()
    if self.updatedAttrs is not None:
      oprot.writeFieldBegin('updatedAttrs', TType.SET, 3)
      oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
      for iter878 in self.updatedAttrs:
        oprot.writeI32(iter878)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.relation is not None:
      oprot.writeFieldBegin('relation', TType.STRUCT, 4)
      self.relation.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.targetSquareMemberMid)
    value = (value * 31) ^ hash(self.updatedAttrs)
    value = (value * 31) ^ hash(self.relation)
    return value

  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 ReportSquareRequest:
  """
  Attributes:
   - squareMid
   - reportType
   - otherReason
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.I32, 'reportType', None, None, ), # 3
    (4, TType.STRING, 'otherReason', None, None, ), # 4
  )

  def __init__(self, squareMid=None, reportType=None, otherReason=None,):
    self.squareMid = squareMid
    self.reportType = reportType
    self.otherReason = otherReason

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.reportType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.otherReason = 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('ReportSquareRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.reportType is not None:
      oprot.writeFieldBegin('reportType', TType.I32, 3)
      oprot.writeI32(self.reportType)
      oprot.writeFieldEnd()
    if self.otherReason is not None:
      oprot.writeFieldBegin('otherReason', TType.STRING, 4)
      oprot.writeString(self.otherReason)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.reportType)
    value = (value * 31) ^ hash(self.otherReason)
    return value

  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 ReportSquareResponse:

  thrift_spec = (
  )

  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
      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('ReportSquareResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 ReportSquareChatRequest:
  """
  Attributes:
   - squareMid
   - squareChatMid
   - reportType
   - otherReason
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.STRING, 'squareChatMid', None, None, ), # 3
    None, # 4
    (5, TType.I32, 'reportType', None, None, ), # 5
    (6, TType.STRING, 'otherReason', None, None, ), # 6
  )

  def __init__(self, squareMid=None, squareChatMid=None, reportType=None, otherReason=None,):
    self.squareMid = squareMid
    self.squareChatMid = squareChatMid
    self.reportType = reportType
    self.otherReason = otherReason

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.reportType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.otherReason = 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('ReportSquareChatRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 3)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.reportType is not None:
      oprot.writeFieldBegin('reportType', TType.I32, 5)
      oprot.writeI32(self.reportType)
      oprot.writeFieldEnd()
    if self.otherReason is not None:
      oprot.writeFieldBegin('otherReason', TType.STRING, 6)
      oprot.writeString(self.otherReason)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.reportType)
    value = (value * 31) ^ hash(self.otherReason)
    return value

  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 ReportSquareChatResponse:

  thrift_spec = (
  )

  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
      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('ReportSquareChatResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 ReportSquareMessageRequest:
  """
  Attributes:
   - squareMid
   - squareChatMid
   - squareMessageId
   - reportType
   - otherReason
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
    (3, TType.STRING, 'squareChatMid', None, None, ), # 3
    (4, TType.STRING, 'squareMessageId', None, None, ), # 4
    (5, TType.I32, 'reportType', None, None, ), # 5
    (6, TType.STRING, 'otherReason', None, None, ), # 6
  )

  def __init__(self, squareMid=None, squareChatMid=None, squareMessageId=None, reportType=None, otherReason=None,):
    self.squareMid = squareMid
    self.squareChatMid = squareChatMid
    self.squareMessageId = squareMessageId
    self.reportType = reportType
    self.otherReason = otherReason

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.squareMessageId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.reportType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.otherReason = 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('ReportSquareMessageRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 3)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareMessageId is not None:
      oprot.writeFieldBegin('squareMessageId', TType.STRING, 4)
      oprot.writeString(self.squareMessageId)
      oprot.writeFieldEnd()
    if self.reportType is not None:
      oprot.writeFieldBegin('reportType', TType.I32, 5)
      oprot.writeI32(self.reportType)
      oprot.writeFieldEnd()
    if self.otherReason is not None:
      oprot.writeFieldBegin('otherReason', TType.STRING, 6)
      oprot.writeString(self.otherReason)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareMessageId)
    value = (value * 31) ^ hash(self.reportType)
    value = (value * 31) ^ hash(self.otherReason)
    return value

  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 ReportSquareMessageResponse:

  thrift_spec = (
  )

  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
      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('ReportSquareMessageResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 ReportSquareMemberRequest:
  """
  Attributes:
   - squareMemberMid
   - reportType
   - otherReason
   - squareChatMid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMemberMid', None, None, ), # 2
    (3, TType.I32, 'reportType', None, None, ), # 3
    (4, TType.STRING, 'otherReason', None, None, ), # 4
    (5, TType.STRING, 'squareChatMid', None, None, ), # 5
  )

  def __init__(self, squareMemberMid=None, reportType=None, otherReason=None, squareChatMid=None,):
    self.squareMemberMid = squareMemberMid
    self.reportType = reportType
    self.otherReason = otherReason
    self.squareChatMid = squareChatMid

  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 == 2:
        if ftype == TType.STRING:
          self.squareMemberMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.reportType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.otherReason = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.squareChatMid = 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('ReportSquareMemberRequest')
    if self.squareMemberMid is not None:
      oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
      oprot.writeString(self.squareMemberMid)
      oprot.writeFieldEnd()
    if self.reportType is not None:
      oprot.writeFieldBegin('reportType', TType.I32, 3)
      oprot.writeI32(self.reportType)
      oprot.writeFieldEnd()
    if self.otherReason is not None:
      oprot.writeFieldBegin('otherReason', TType.STRING, 4)
      oprot.writeString(self.otherReason)
      oprot.writeFieldEnd()
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 5)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMemberMid)
    value = (value * 31) ^ hash(self.reportType)
    value = (value * 31) ^ hash(self.otherReason)
    value = (value * 31) ^ hash(self.squareChatMid)
    return value

  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 ReportSquareMemberResponse:

  thrift_spec = (
  )

  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
      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('ReportSquareMemberResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 GetSquareRequest:
  """
  Attributes:
   - mid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'mid', None, None, ), # 2
  )

  def __init__(self, mid=None,):
    self.mid = mid

  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 == 2:
        if ftype == TType.STRING:
          self.mid = 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('GetSquareRequest')
    if self.mid is not None:
      oprot.writeFieldBegin('mid', TType.STRING, 2)
      oprot.writeString(self.mid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.mid)
    return value

  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 GetSquareResponse:
  """
  Attributes:
   - square
   - myMembership
   - squareAuthority
   - squareStatus
   - squareFeatureSet
   - noteStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'square', (Square, Square.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'myMembership', (SquareMember, SquareMember.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'squareAuthority', (SquareAuthority, SquareAuthority.thrift_spec), None, ), # 3
    (4, TType.STRUCT, 'squareStatus', (SquareStatus, SquareStatus.thrift_spec), None, ), # 4
    (5, TType.STRUCT, 'squareFeatureSet', (SquareFeatureSet, SquareFeatureSet.thrift_spec), None, ), # 5
    (6, TType.STRUCT, 'noteStatus', (NoteStatus, NoteStatus.thrift_spec), None, ), # 6
  )

  def __init__(self, square=None, myMembership=None, squareAuthority=None, squareStatus=None, squareFeatureSet=None, noteStatus=None,):
    self.square = square
    self.myMembership = myMembership
    self.squareAuthority = squareAuthority
    self.squareStatus = squareStatus
    self.squareFeatureSet = squareFeatureSet
    self.noteStatus = noteStatus

  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.square = Square()
          self.square.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.myMembership = SquareMember()
          self.myMembership.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareAuthority = SquareAuthority()
          self.squareAuthority.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.squareStatus = SquareStatus()
          self.squareStatus.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRUCT:
          self.squareFeatureSet = SquareFeatureSet()
          self.squareFeatureSet.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRUCT:
          self.noteStatus = NoteStatus()
          self.noteStatus.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('GetSquareResponse')
    if self.square is not None:
      oprot.writeFieldBegin('square', TType.STRUCT, 1)
      self.square.write(oprot)
      oprot.writeFieldEnd()
    if self.myMembership is not None:
      oprot.writeFieldBegin('myMembership', TType.STRUCT, 2)
      self.myMembership.write(oprot)
      oprot.writeFieldEnd()
    if self.squareAuthority is not None:
      oprot.writeFieldBegin('squareAuthority', TType.STRUCT, 3)
      self.squareAuthority.write(oprot)
      oprot.writeFieldEnd()
    if self.squareStatus is not None:
      oprot.writeFieldBegin('squareStatus', TType.STRUCT, 4)
      self.squareStatus.write(oprot)
      oprot.writeFieldEnd()
    if self.squareFeatureSet is not None:
      oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 5)
      self.squareFeatureSet.write(oprot)
      oprot.writeFieldEnd()
    if self.noteStatus is not None:
      oprot.writeFieldBegin('noteStatus', TType.STRUCT, 6)
      self.noteStatus.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.square)
    value = (value * 31) ^ hash(self.myMembership)
    value = (value * 31) ^ hash(self.squareAuthority)
    value = (value * 31) ^ hash(self.squareStatus)
    value = (value * 31) ^ hash(self.squareFeatureSet)
    value = (value * 31) ^ hash(self.noteStatus)
    return value

  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 GetSquareStatusRequest:
  """
  Attributes:
   - squareMid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
  )

  def __init__(self, squareMid=None,):
    self.squareMid = squareMid

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = 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('GetSquareStatusRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    return value

  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 GetSquareStatusResponse:
  """
  Attributes:
   - squareStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'squareStatus', (SquareStatus, SquareStatus.thrift_spec), None, ), # 1
  )

  def __init__(self, squareStatus=None,):
    self.squareStatus = squareStatus

  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.squareStatus = SquareStatus()
          self.squareStatus.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('GetSquareStatusResponse')
    if self.squareStatus is not None:
      oprot.writeFieldBegin('squareStatus', TType.STRUCT, 1)
      self.squareStatus.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareStatus)
    return value

  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 GetNoteStatusRequest:
  """
  Attributes:
   - squareMid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareMid', None, None, ), # 2
  )

  def __init__(self, squareMid=None,):
    self.squareMid = squareMid

  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 == 2:
        if ftype == TType.STRING:
          self.squareMid = 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('GetNoteStatusRequest')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 2)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    return value

  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 GetNoteStatusResponse:
  """
  Attributes:
   - squareMid
   - status
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'squareMid', None, None, ), # 1
    (2, TType.STRUCT, 'status', (NoteStatus, NoteStatus.thrift_spec), None, ), # 2
  )

  def __init__(self, squareMid=None, status=None,):
    self.squareMid = squareMid
    self.status = status

  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.squareMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.status = NoteStatus()
          self.status.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('GetNoteStatusResponse')
    if self.squareMid is not None:
      oprot.writeFieldBegin('squareMid', TType.STRING, 1)
      oprot.writeString(self.squareMid)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.STRUCT, 2)
      self.status.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareMid)
    value = (value * 31) ^ hash(self.status)
    return value

  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 CreateSquareChatAnnouncementRequest:
  """
  Attributes:
   - reqSeq
   - squareChatMid
   - squareChatAnnouncement
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'reqSeq', None, None, ), # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
    (3, TType.STRUCT, 'squareChatAnnouncement', (SquareChatAnnouncement, SquareChatAnnouncement.thrift_spec), None, ), # 3
  )

  def __init__(self, reqSeq=None, squareChatMid=None, squareChatAnnouncement=None,):
    self.reqSeq = reqSeq
    self.squareChatMid = squareChatMid
    self.squareChatAnnouncement = squareChatAnnouncement

  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.reqSeq = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.squareChatAnnouncement = SquareChatAnnouncement()
          self.squareChatAnnouncement.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('CreateSquareChatAnnouncementRequest')
    if self.reqSeq is not None:
      oprot.writeFieldBegin('reqSeq', TType.I32, 1)
      oprot.writeI32(self.reqSeq)
      oprot.writeFieldEnd()
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.squareChatAnnouncement is not None:
      oprot.writeFieldBegin('squareChatAnnouncement', TType.STRUCT, 3)
      self.squareChatAnnouncement.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.reqSeq)
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.squareChatAnnouncement)
    return value

  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 CreateSquareChatAnnouncementResponse:
  """
  Attributes:
   - announcement
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'announcement', (SquareChatAnnouncement, SquareChatAnnouncement.thrift_spec), None, ), # 1
  )

  def __init__(self, announcement=None,):
    self.announcement = announcement

  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.announcement = SquareChatAnnouncement()
          self.announcement.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('CreateSquareChatAnnouncementResponse')
    if self.announcement is not None:
      oprot.writeFieldBegin('announcement', TType.STRUCT, 1)
      self.announcement.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.announcement)
    return value

  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 DeleteSquareChatAnnouncementRequest:
  """
  Attributes:
   - squareChatMid
   - announcementSeq
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
    (3, TType.I64, 'announcementSeq', None, None, ), # 3
  )

  def __init__(self, squareChatMid=None, announcementSeq=None,):
    self.squareChatMid = squareChatMid
    self.announcementSeq = announcementSeq

  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 == 2:
        if ftype == TType.STRING:
          self.squareChatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.announcementSeq = iprot.readI64()
        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('DeleteSquareChatAnnouncementRequest')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    if self.announcementSeq is not None:
      oprot.writeFieldBegin('announcementSeq', TType.I64, 3)
      oprot.writeI64(self.announcementSeq)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    value = (value * 31) ^ hash(self.announcementSeq)
    return value

  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 DeleteSquareChatAnnouncementResponse:

  thrift_spec = (
  )

  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
      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('DeleteSquareChatAnnouncementResponse')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    return value

  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 GetSquareChatAnnouncementsRequest:
  """
  Attributes:
   - squareChatMid
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'squareChatMid', None, None, ), # 2
  )

  def __init__(self, squareChatMid=None,):
    self.squareChatMid = squareChatMid

  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 == 2:
        if ftype == TType.STRING:
          self.squareChatMid = 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('GetSquareChatAnnouncementsRequest')
    if self.squareChatMid is not None:
      oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
      oprot.writeString(self.squareChatMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.squareChatMid)
    return value

  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 GetSquareChatAnnouncementsResponse:
  """
  Attributes:
   - announcements
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'announcements', (TType.STRUCT,(SquareChatAnnouncement, SquareChatAnnouncement.thrift_spec)), None, ), # 1
  )

  def __init__(self, announcements=None,):
    self.announcements = announcements

  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.announcements = []
          (_etype882, _size879) = iprot.readListBegin()
          for _i883 in xrange(_size879):
            _elem884 = SquareChatAnnouncement()
            _elem884.read(iprot)
            self.announcements.append(_elem884)
          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('GetSquareChatAnnouncementsResponse')
    if self.announcements is not None:
      oprot.writeFieldBegin('announcements', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.announcements))
      for iter885 in self.announcements:
        iter885.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.announcements)
    return value

  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 GetJoinedSquareChatsRequest:
  """
  Attributes:
   - continuationToken
   - limit
  """

  thrift_spec = (
    None, # 0
    None, # 1
    (2, TType.STRING, 'continuationToken', None, None, ), # 2
    (3, TType.I32, 'limit', None, None, ), # 3
  )

  def __init__(self, continuationToken=None, limit=None,):
    self.continuationToken = continuationToken
    self.limit = limit

  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 == 2:
        if ftype == TType.STRING:
          self.continuationToken = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.limit = 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('GetJoinedSquareChatsRequest')
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I32, 3)
      oprot.writeI32(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.continuationToken)
    value = (value * 31) ^ hash(self.limit)
    return value

  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 GetJoinedSquareChatsResponse:
  """
  Attributes:
   - chats
   - chatMembers
   - statuses
   - continuationToken
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'chats', (TType.STRUCT,(SquareChat, SquareChat.thrift_spec)), None, ), # 1
    (2, TType.MAP, 'chatMembers', (TType.STRING,None,TType.STRUCT,(SquareChatMember, SquareChatMember.thrift_spec)), None, ), # 2
    (3, TType.MAP, 'statuses', (TType.STRING,None,TType.STRUCT,(SquareChatStatus, SquareChatStatus.thrift_spec)), None, ), # 3
    (4, TType.STRING, 'continuationToken', None, None, ), # 4
  )

  def __init__(self, chats=None, chatMembers=None, statuses=None, continuationToken=None,):
    self.chats = chats
    self.chatMembers = chatMembers
    self.statuses = statuses
    self.continuationToken = continuationToken

  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.chats = []
          (_etype889, _size886) = iprot.readListBegin()
          for _i890 in xrange(_size886):
            _elem891 = SquareChat()
            _elem891.read(iprot)
            self.chats.append(_elem891)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.chatMembers = {}
          (_ktype893, _vtype894, _size892 ) = iprot.readMapBegin()
          for _i896 in xrange(_size892):
            _key897 = iprot.readString()
            _val898 = SquareChatMember()
            _val898.read(iprot)
            self.chatMembers[_key897] = _val898
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.statuses = {}
          (_ktype900, _vtype901, _size899 ) = iprot.readMapBegin()
          for _i903 in xrange(_size899):
            _key904 = iprot.readString()
            _val905 = SquareChatStatus()
            _val905.read(iprot)
            self.statuses[_key904] = _val905
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.continuationToken = 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('GetJoinedSquareChatsResponse')
    if self.chats is not None:
      oprot.writeFieldBegin('chats', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.chats))
      for iter906 in self.chats:
        iter906.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.chatMembers is not None:
      oprot.writeFieldBegin('chatMembers', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.chatMembers))
      for kiter907,viter908 in self.chatMembers.items():
        oprot.writeString(kiter907)
        viter908.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.statuses is not None:
      oprot.writeFieldBegin('statuses', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.statuses))
      for kiter909,viter910 in self.statuses.items():
        oprot.writeString(kiter909)
        viter910.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.continuationToken is not None:
      oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
      oprot.writeString(self.continuationToken)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.chats)
    value = (value * 31) ^ hash(self.chatMembers)
    value = (value * 31) ^ hash(self.statuses)
    value = (value * 31) ^ hash(self.continuationToken)
    return value

  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 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 = {}
          (_ktype912, _vtype913, _size911 ) = iprot.readMapBegin()
          for _i915 in xrange(_size911):
            _key916 = iprot.readString()
            _val917 = iprot.readString()
            self.parameterMap[_key916] = _val917
          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 kiter918,viter919 in self.parameterMap.items():
        oprot.writeString(kiter918)
        oprot.writeString(viter919)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.code)
    value = (value * 31) ^ hash(self.reason)
    value = (value * 31) ^ hash(self.parameterMap)
    return value

  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 ShouldSyncException(TException):
  """
  Attributes:
   - syncOpRevision
   - syncScope
   - syncReason
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'syncOpRevision', None, None, ), # 1
    (2, TType.STRUCT, 'syncScope', (SyncScope, SyncScope.thrift_spec), None, ), # 2
    (3, TType.I32, 'syncReason', None, None, ), # 3
    (4, TType.STRING, 'message', None, None, ), # 4
  )

  def __init__(self, syncOpRevision=None, syncScope=None, syncReason=None, message=None,):
    self.syncOpRevision = syncOpRevision
    self.syncScope = syncScope
    self.syncReason = syncReason
    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.syncOpRevision = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.syncScope = SyncScope()
          self.syncScope.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.syncReason = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.message = 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('ShouldSyncException')
    if self.syncOpRevision is not None:
      oprot.writeFieldBegin('syncOpRevision', TType.I64, 1)
      oprot.writeI64(self.syncOpRevision)
      oprot.writeFieldEnd()
    if self.syncScope is not None:
      oprot.writeFieldBegin('syncScope', TType.STRUCT, 2)
      self.syncScope.write(oprot)
      oprot.writeFieldEnd()
    if self.syncReason is not None:
      oprot.writeFieldBegin('syncReason', TType.I32, 3)
      oprot.writeI32(self.syncReason)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 4)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.syncOpRevision)
    value = (value * 31) ^ hash(self.syncScope)
    value = (value * 31) ^ hash(self.syncReason)
    value = (value * 31) ^ hash(self.message)
    return value

  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 PointException(TException):
  """
  Attributes:
   - code
   - reason
   - extra
  """

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

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

  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.extra = {}
          (_ktype921, _vtype922, _size920 ) = iprot.readMapBegin()
          for _i924 in xrange(_size920):
            _key925 = iprot.readString()
            _val926 = iprot.readString()
            self.extra[_key925] = _val926
          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('PointException')
    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.extra is not None:
      oprot.writeFieldBegin('extra', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extra))
      for kiter927,viter928 in self.extra.items():
        oprot.writeString(kiter927)
        oprot.writeString(viter928)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.code)
    value = (value * 31) ^ hash(self.reason)
    value = (value * 31) ^ hash(self.extra)
    return value

  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 ChannelException(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 = {}
          (_ktype930, _vtype931, _size929 ) = iprot.readMapBegin()
          for _i933 in xrange(_size929):
            _key934 = iprot.readString()
            _val935 = iprot.readString()
            self.parameterMap[_key934] = _val935
          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('ChannelException')
    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 kiter936,viter937 in self.parameterMap.items():
        oprot.writeString(kiter936)
        oprot.writeString(viter937)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.code)
    value = (value * 31) ^ hash(self.reason)
    value = (value * 31) ^ hash(self.parameterMap)
    return value

  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 SquareException(TException):
  """
  Attributes:
   - errorCode
   - errorExtraInfo
   - reason
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'errorCode', None, None, ), # 1
    (2, TType.STRUCT, 'errorExtraInfo', (ErrorExtraInfo, ErrorExtraInfo.thrift_spec), None, ), # 2
    (3, TType.STRING, 'reason', None, None, ), # 3
  )

  def __init__(self, errorCode=None, errorExtraInfo=None, reason=None,):
    self.errorCode = errorCode
    self.errorExtraInfo = errorExtraInfo
    self.reason = reason

  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.errorCode = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.errorExtraInfo = ErrorExtraInfo()
          self.errorExtraInfo.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.reason = 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('SquareException')
    if self.errorCode is not None:
      oprot.writeFieldBegin('errorCode', TType.I32, 1)
      oprot.writeI32(self.errorCode)
      oprot.writeFieldEnd()
    if self.errorExtraInfo is not None:
      oprot.writeFieldBegin('errorExtraInfo', TType.STRUCT, 2)
      self.errorExtraInfo.write(oprot)
      oprot.writeFieldEnd()
    if self.reason is not None:
      oprot.writeFieldBegin('reason', TType.STRING, 3)
      oprot.writeString(self.reason)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.errorCode)
    value = (value * 31) ^ hash(self.errorExtraInfo)
    value = (value * 31) ^ hash(self.reason)
    return value

  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 UniversalNotificationServiceException(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 = {}
          (_ktype939, _vtype940, _size938 ) = iprot.readMapBegin()
          for _i942 in xrange(_size938):
            _key943 = iprot.readString()
            _val944 = iprot.readString()
            self.parameterMap[_key943] = _val944
          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('UniversalNotificationServiceException')
    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 kiter945,viter946 in self.parameterMap.items():
        oprot.writeString(kiter945)
        oprot.writeString(viter946)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.code)
    value = (value * 31) ^ hash(self.reason)
    value = (value * 31) ^ hash(self.parameterMap)
    return value

  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 UpdateBuddyProfileResult:
  """
  Attributes:
   - requestId
   - state
   - eventNo
   - receiverCount
   - successCount
   - failCount
   - cancelCount
   - unregisterCount
   - timestamp
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'requestId', None, None, ), # 1
    (2, TType.I32, 'state', None, None, ), # 2
    (3, TType.I32, 'eventNo', None, None, ), # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    None, # 10
    (11, TType.I64, 'receiverCount', None, None, ), # 11
    (12, TType.I64, 'successCount', None, None, ), # 12
    (13, TType.I64, 'failCount', None, None, ), # 13
    (14, TType.I64, 'cancelCount', None, None, ), # 14
    (15, TType.I64, 'unregisterCount', None, None, ), # 15
    None, # 16
    None, # 17
    None, # 18
    None, # 19
    None, # 20
    (21, TType.I64, 'timestamp', None, None, ), # 21
    (22, TType.STRING, 'message', None, None, ), # 22
  )

  def __init__(self, requestId=None, state=None, eventNo=None, receiverCount=None, successCount=None, failCount=None, cancelCount=None, unregisterCount=None, timestamp=None, message=None,):
    self.requestId = requestId
    self.state = state
    self.eventNo = eventNo
    self.receiverCount = receiverCount
    self.successCount = successCount
    self.failCount = failCount
    self.cancelCount = cancelCount
    self.unregisterCount = unregisterCount
    self.timestamp = timestamp
    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.STRING:
          self.requestId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.state = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.eventNo = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.receiverCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I64:
          self.successCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.I64:
          self.failCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.I64:
          self.cancelCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.I64:
          self.unregisterCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.I64:
          self.timestamp = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRING:
          self.message = 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('UpdateBuddyProfileResult')
    if self.requestId is not None:
      oprot.writeFieldBegin('requestId', TType.STRING, 1)
      oprot.writeString(self.requestId)
      oprot.writeFieldEnd()
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.I32, 2)
      oprot.writeI32(self.state)
      oprot.writeFieldEnd()
    if self.eventNo is not None:
      oprot.writeFieldBegin('eventNo', TType.I32, 3)
      oprot.writeI32(self.eventNo)
      oprot.writeFieldEnd()
    if self.receiverCount is not None:
      oprot.writeFieldBegin('receiverCount', TType.I64, 11)
      oprot.writeI64(self.receiverCount)
      oprot.writeFieldEnd()
    if self.successCount is not None:
      oprot.writeFieldBegin('successCount', TType.I64, 12)
      oprot.writeI64(self.successCount)
      oprot.writeFieldEnd()
    if self.failCount is not None:
      oprot.writeFieldBegin('failCount', TType.I64, 13)
      oprot.writeI64(self.failCount)
      oprot.writeFieldEnd()
    if self.cancelCount is not None:
      oprot.writeFieldBegin('cancelCount', TType.I64, 14)
      oprot.writeI64(self.cancelCount)
      oprot.writeFieldEnd()
    if self.unregisterCount is not None:
      oprot.writeFieldBegin('unregisterCount', TType.I64, 15)
      oprot.writeI64(self.unregisterCount)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 21)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 22)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.requestId)
    value = (value * 31) ^ hash(self.state)
    value = (value * 31) ^ hash(self.eventNo)
    value = (value * 31) ^ hash(self.receiverCount)
    value = (value * 31) ^ hash(self.successCount)
    value = (value * 31) ^ hash(self.failCount)
    value = (value * 31) ^ hash(self.cancelCount)
    value = (value * 31) ^ hash(self.unregisterCount)
    value = (value * 31) ^ hash(self.timestamp)
    value = (value * 31) ^ hash(self.message)
    return value

  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 UserAuthStatus:
  """
  Attributes:
   - phoneNumberRegistered
   - registeredSnsIdTypes
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'phoneNumberRegistered', None, None, ), # 1
    (2, TType.LIST, 'registeredSnsIdTypes', (TType.I32,None), None, ), # 2
  )

  def __init__(self, phoneNumberRegistered=None, registeredSnsIdTypes=None,):
    self.phoneNumberRegistered = phoneNumberRegistered
    self.registeredSnsIdTypes = registeredSnsIdTypes

  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.BOOL:
          self.phoneNumberRegistered = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.registeredSnsIdTypes = []
          (_etype950, _size947) = iprot.readListBegin()
          for _i951 in xrange(_size947):
            _elem952 = iprot.readI32()
            self.registeredSnsIdTypes.append(_elem952)
          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('UserAuthStatus')
    if self.phoneNumberRegistered is not None:
      oprot.writeFieldBegin('phoneNumberRegistered', TType.BOOL, 1)
      oprot.writeBool(self.phoneNumberRegistered)
      oprot.writeFieldEnd()
    if self.registeredSnsIdTypes is not None:
      oprot.writeFieldBegin('registeredSnsIdTypes', TType.LIST, 2)
      oprot.writeListBegin(TType.I32, len(self.registeredSnsIdTypes))
      for iter953 in self.registeredSnsIdTypes:
        oprot.writeI32(iter953)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.phoneNumberRegistered)
    value = (value * 31) ^ hash(self.registeredSnsIdTypes)
    return value

  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 WapInvitation:
  """
  Attributes:
   - type
   - inviteeEmail
   - inviterMid
   - roomMid
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'type', None, None, ), # 1
    None, # 2
    None, # 3
    None, # 4
    None, # 5
    None, # 6
    None, # 7
    None, # 8
    None, # 9
    (10, TType.STRING, 'inviteeEmail', None, None, ), # 10
    (11, TType.STRING, 'inviterMid', None, None, ), # 11
    (12, TType.STRING, 'roomMid', None, None, ), # 12
  )

  def __init__(self, type=None, inviteeEmail=None, inviterMid=None, roomMid=None,):
    self.type = type
    self.inviteeEmail = inviteeEmail
    self.inviterMid = inviterMid
    self.roomMid = roomMid

  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.type = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.inviteeEmail = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.inviterMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.roomMid = 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('WapInvitation')
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 1)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.inviteeEmail is not None:
      oprot.writeFieldBegin('inviteeEmail', TType.STRING, 10)
      oprot.writeString(self.inviteeEmail)
      oprot.writeFieldEnd()
    if self.inviterMid is not None:
      oprot.writeFieldBegin('inviterMid', TType.STRING, 11)
      oprot.writeString(self.inviterMid)
      oprot.writeFieldEnd()
    if self.roomMid is not None:
      oprot.writeFieldBegin('roomMid', TType.STRING, 12)
      oprot.writeString(self.roomMid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.inviteeEmail)
    value = (value * 31) ^ hash(self.inviterMid)
    value = (value * 31) ^ hash(self.roomMid)
    return value

  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 GroupCall:
  """
  Attributes:
   - online
   - chatMid
   - hostMids
   - memberMids
   - started
   - mediaType
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'online', None, None, ), # 1
    (2, TType.STRING, 'chatMid', None, None, ), # 2
    (3, TType.STRING, 'hostMids', None, None, ), # 3
    (4, TType.LIST, 'memberMids', (TType.STRING,None), None, ), # 4
    (5, TType.I64, 'started', None, None, ), # 5
    (6, TType.I32, 'mediaType', None, None, ), # 6
  )

  def __init__(self, online=None, chatMid=None, hostMids=None, memberMids=None, started=None, mediaType=None,):
    self.online = online
    self.chatMid = chatMid
    self.hostMids = hostMids
    self.memberMids = memberMids
    self.started = started
    self.mediaType = mediaType

  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.BOOL:
          self.online = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.chatMid = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.hostMids = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.memberMids = []
          (_etype957, _size954) = iprot.readListBegin()
          for _i958 in xrange(_size954):
            _elem959 = iprot.readString()
            self.memberMids.append(_elem959)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.started = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.mediaType = 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('GroupCall')
    if self.online is not None:
      oprot.writeFieldBegin('online', TType.BOOL, 1)
      oprot.writeBool(self.online)
      oprot.writeFieldEnd()
    if self.chatMid is not None:
      oprot.writeFieldBegin('chatMid', TType.STRING, 2)
      oprot.writeString(self.chatMid)
      oprot.writeFieldEnd()
    if self.hostMids is not None:
      oprot.writeFieldBegin('hostMids', TType.STRING, 3)
      oprot.writeString(self.hostMids)
      oprot.writeFieldEnd()
    if self.memberMids is not None:
      oprot.writeFieldBegin('memberMids', TType.LIST, 4)
      oprot.writeListBegin(TType.STRING, len(self.memberMids))
      for iter960 in self.memberMids:
        oprot.writeString(iter960)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.started is not None:
      oprot.writeFieldBegin('started', TType.I64, 5)
      oprot.writeI64(self.started)
      oprot.writeFieldEnd()
    if self.mediaType is not None:
      oprot.writeFieldBegin('mediaType', TType.I32, 6)
      oprot.writeI32(self.mediaType)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.online)
    value = (value * 31) ^ hash(self.chatMid)
    value = (value * 31) ^ hash(self.hostMids)
    value = (value * 31) ^ hash(self.memberMids)
    value = (value * 31) ^ hash(self.started)
    value = (value * 31) ^ hash(self.mediaType)
    return value

  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 GroupCallRoute:
  """
  Attributes:
   - token
   - cscf
   - mix
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'token', None, None, ), # 1
    (2, TType.STRUCT, 'cscf', (CallHost, CallHost.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'mix', (CallHost, CallHost.thrift_spec), None, ), # 3
  )

  def __init__(self, token=None, cscf=None, mix=None,):
    self.token = token
    self.cscf = cscf
    self.mix = mix

  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.token = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.cscf = CallHost()
          self.cscf.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.mix = CallHost()
          self.mix.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('GroupCallRoute')
    if self.token is not None:
      oprot.writeFieldBegin('token', TType.STRING, 1)
      oprot.writeString(self.token)
      oprot.writeFieldEnd()
    if self.cscf is not None:
      oprot.writeFieldBegin('cscf', TType.STRUCT, 2)
      self.cscf.write(oprot)
      oprot.writeFieldEnd()
    if self.mix is not None:
      oprot.writeFieldBegin('mix', TType.STRUCT, 3)
      self.mix.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.token)
    value = (value * 31) ^ hash(self.cscf)
    value = (value * 31) ^ hash(self.mix)
    return value

  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)
