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

from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
import sys

from thrift.transport import TTransport


class ApplicationType(object):
    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(object):

    _VALUES_TO_NAMES = {
    }

    _NAMES_TO_VALUES = {
    }


class PrivacyLevelType(object):
    PUBLIC = 0
    PRIVATE = 1

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

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


class PaidCallerIdStatus(object):
    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(object):
    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(object):
    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(object):
    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(object):
    ON_AIR = 0
    LIVE = 1

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

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


class BuddyBannerLinkType(object):
    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(object):
    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(object):
    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 SyncTriggerReason(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    NORMAL = 0
    RECOMMEND = 1

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

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


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

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

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


class AsymmetricKeyAlgorithm(object):
    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(object):
    CONTACT_SETTING_NOTIFICATION_DISABLE = 1
    CONTACT_SETTING_DISPLAY_NAME_OVERRIDE = 2
    CONTACT_SETTING_CONTACT_HIDE = 4
    CONTACT_SETTING_FAVORITE = 8
    CONTACT_SETTING_DELETE = 16

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

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


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

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

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


class ContactType(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    ALL = 255
    NOTIFICATION_SETTING = 1

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

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


class UserStatus(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    TEXT_MESSAGE = 0

    _VALUES_TO_NAMES = {
        0: "TEXT_MESSAGE",
    }

    _NAMES_TO_VALUES = {
        "TEXT_MESSAGE": 0,
    }


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

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

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


class FriendRequestMethod(object):
    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(object):
    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(object):
    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(object):
    ALL = 0
    APPEND = 1

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

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


class NotificationQueueType(object):
    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(object):
    AUDIO = 1
    VIDEO = 2

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

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


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

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

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


class PointErrorCode(object):
    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(object):
    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(object):
    HIDDEN = 0
    PUBLIC = 1000

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

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


class RedirectType(object):
    NONE = 0
    EXPIRE_SECOND = 1

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

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


class RegistrationType(object):
    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(object):
    MESSAGE = 0
    NOTE = 1

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

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


class SettingsAttribute(object):
    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(object):
    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(object):
    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(object):
    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(object):
    SYNC = 0
    REPORT = 1

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

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


class SpotCategory(object):
    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(object):
    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(object):
    ACTIVATED = 1
    UNREAD = 2

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

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


class UniversalNotificationServiceErrorCode(object):
    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(object):
    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(object):
    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(object):
    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(object):
    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(object):
    REGISTRATION = 1
    CHAT = 2

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

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


class MediaType(object):
    AUDIO = 1
    VIDEO = 2

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

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


class SQErrorCode(object):
    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(object):
    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 = 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
    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",
        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",
        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": 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,
        "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(object):
    NONE = 1
    BLOCKED = 2

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

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


class SquareFeatureControlState(object):
    DISABLED = 1
    ENABLED = 2

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

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


class BooleanState(object):
    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(object):
    CLOSED = 0
    OPEN = 1

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

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


class SquareChatType(object):
    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 SquareChatState(object):
    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 SquareMembershipState(object):
    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 SquareMemberRole(object):
    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(object):
    DUPLICATED_DISPLAY_NAME = 0

    _VALUES_TO_NAMES = {
        0: "DUPLICATED_DISPLAY_NAME",
    }

    _NAMES_TO_VALUES = {
        "DUPLICATED_DISPLAY_NAME": 0,
    }


class SquareChatMembershipState(object):
    JOINED = 1
    LEFT = 2

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

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


class FetchDirection(object):
    FORWARD = 1
    BACKWARD = 2

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

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


class SquareEventStatus(object):
    NORMAL = 1
    ALERT_DISABLED = 2

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

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


class SuggestDictionaryIncrementStatus(object):
    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(object):
    """
    Attributes:
     - title
     - address
     - latitude
     - longitude
     - phone
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'title', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'address', 'UTF8', None, ),  # 2
        (3, TType.DOUBLE, 'latitude', None, None, ),  # 3
        (4, TType.DOUBLE, 'longitude', None, None, ),  # 4
        (5, TType.STRING, 'phone', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.address = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.title)
            oprot.writeFieldEnd()
        if self.address is not None:
            oprot.writeFieldBegin('address', TType.STRING, 2)
            oprot.writeString(self.address.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.phone)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - requestId
     - state
     - messageStoreRequestId
     - messageIds
     - receiverCount
     - successCount
     - failCount
     - blockCount
     - unregisteredCount
     - unrelatedCount
     - errorDescription
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'requestId', 'UTF8', None, ),  # 1
        (2, TType.I32, 'state', None, None, ),  # 2
        (3, TType.STRING, 'messageStoreRequestId', 'UTF8', None, ),  # 3
        (4, TType.LIST, 'messageIds', (TType.STRING, 'UTF8', False), 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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.messageIds = []
                    (_etype3, _size0) = iprot.readListBegin()
                    for _i4 in range(_size0):
                        _elem5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.errorDescription)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - host
     - port
     - zone
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'host', 'UTF8', None, ),  # 1
        (2, TType.I32, 'port', None, None, ),  # 2
        (3, TType.STRING, 'zone', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.zone)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - authUrl
     - userAgeType
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'authUrl', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - authUrl
     - sessionId
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.authUrl)
            oprot.writeFieldEnd()
        if self.sessionId is not None:
            oprot.writeFieldBegin('sessionId', TType.STRING, 2)
            oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - messageId
     - text
     - senderSquareMemberMid
     - createdAt
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'messageId', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'text', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'senderSquareMemberMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.text = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.senderSquareMemberMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.messageId)
            oprot.writeFieldEnd()
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 2)
            oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text)
            oprot.writeFieldEnd()
        if self.senderSquareMemberMid is not None:
            oprot.writeFieldBegin('senderSquareMemberMid', TType.STRING, 3)
            oprot.writeString(self.senderSquareMemberMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 11
        (12, TType.STRING, 'text', 'UTF8', None, ),  # 12
        (13, TType.I64, 'createdTime', None, None, ),  # 13
        (14, TType.STRING, 'pictureUrl', 'UTF8', None, ),  # 14
        (15, TType.STRING, 'thumbnailUrl', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.text = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.STRING:
                    self.thumbnailUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.title)
            oprot.writeFieldEnd()
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 12)
            oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.pictureUrl)
            oprot.writeFieldEnd()
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 15)
            oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - name
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'BINARY', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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.readBinary()
                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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.writeBinary(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - host
     - removed
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'host', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - allowedTypes
     - publicKey
    """

    thrift_spec = (
        None,  # 0
        (1, TType.SET, 'allowedTypes', (TType.I32, None, False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - otpId
     - otp
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.otp = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.otpId)
            oprot.writeFieldEnd()
        if self.otp is not None:
            oprot.writeFieldBegin('otp', TType.STRING, 2)
            oprot.writeString(self.otp.encode('utf-8') if sys.version_info[0] == 2 else self.otp)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - name
     - welcomeMessage
     - profileImageObsHash
     - desc
     - searchable
     - type
     - categoryID
     - invitationURL
     - revision
     - ableToUseInvitationTicket
     - state
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'name', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'welcomeMessage', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'profileImageObsHash', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'desc', 'UTF8', 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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.welcomeMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.profileImageObsHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.desc = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.welcomeMessage is not None:
            oprot.writeFieldBegin('welcomeMessage', TType.STRING, 3)
            oprot.writeString(self.welcomeMessage.encode('utf-8') if sys.version_info[0] == 2 else self.welcomeMessage)
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 4)
            oprot.writeString(self.profileImageObsHash.encode('utf-8') if sys.version_info[0] == 2 else self.profileImageObsHash)
            oprot.writeFieldEnd()
        if self.desc is not None:
            oprot.writeFieldBegin('desc', TType.STRING, 5)
            oprot.writeString(self.desc.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - updateSquareProfile
     - inviteNewMember
     - approveJoinRequest
     - createPost
     - createOpenSquareChat
     - deleteSquareChatOrPost
     - removeSquareMember
     - grantRole
     - enableInvitationTicket
     - revision
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMemberMid
     - squareMid
     - displayName
     - profileImageObsHash
     - ableToReceiveMessage
     - membershipState
     - role
     - revision
     - preference
     - joinMessage
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMemberMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareMid', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'displayName', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'profileImageObsHash', 'UTF8', 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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.profileImageObsHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMemberMid)
            oprot.writeFieldEnd()
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(self.squareMid.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 3)
            oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName)
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 4)
            oprot.writeString(self.profileImageObsHash.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.joinMessage)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - revision
     - creatingSecretSquareChat
     - invitingIntoOpenSquareChat
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - squareMid
     - type
     - name
     - chatImageObsHash
     - squareChatRevision
     - maxMemberCount
     - state
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareMid', 'UTF8', None, ),  # 2
        (3, TType.I32, 'type', None, None, ),  # 3
        (4, TType.STRING, 'name', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'chatImageObsHash', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.chatImageObsHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(self.squareMid.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.chatImageObsHash is not None:
            oprot.writeFieldBegin('chatImageObsHash', TType.STRING, 5)
            oprot.writeString(self.chatImageObsHash.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - countryCode
     - rateDivision
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.rateDivision = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.countryCode)
            oprot.writeFieldEnd()
        if self.rateDivision is not None:
            oprot.writeFieldBegin('rateDivision', TType.STRING, 2)
            oprot.writeString(self.rateDivision.encode('utf-8') if sys.version_info[0] == 2 else self.rateDivision)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'unit', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.unit = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.productName)
            oprot.writeFieldEnd()
        if self.unit is not None:
            oprot.writeFieldBegin('unit', TType.STRING, 3)
            oprot.writeString(self.unit.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - currencyCode
     - currencyName
     - currencySign
     - preferred
     - coinRate
     - creditRate
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'currencyCode', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'currencyName', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'currencySign', 'UTF8', None, ),  # 3
        (4, TType.BOOL, 'preferred', None, None, ),  # 4
        (5, TType.STRING, 'coinRate', 'UTF8', None, ),  # 5
        (6, TType.STRING, 'creditRate', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.currencyName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.currencySign = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.creditRate = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.currencyCode)
            oprot.writeFieldEnd()
        if self.currencyName is not None:
            oprot.writeFieldBegin('currencyName', TType.STRING, 2)
            oprot.writeString(self.currencyName.encode('utf-8') if sys.version_info[0] == 2 else self.currencyName)
            oprot.writeFieldEnd()
        if self.currencySign is not None:
            oprot.writeFieldBegin('currencySign', TType.STRING, 3)
            oprot.writeString(self.currencySign.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.coinRate)
            oprot.writeFieldEnd()
        if self.creditRate is not None:
            oprot.writeFieldBegin('creditRate', TType.STRING, 6)
            oprot.writeString(self.creditRate.encode('utf-8') if sys.version_info[0] == 2 else self.creditRate)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - year
     - yearPrivacyLevelType
     - yearEnabled
     - day
     - dayPrivacyLevelType
     - dayEnabled
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'year', 'UTF8', None, ),  # 1
        (2, TType.I32, 'yearPrivacyLevelType', None, None, ),  # 2
        (3, TType.BOOL, 'yearEnabled', None, None, ),  # 3
        None,  # 4
        (5, TType.STRING, 'day', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'serviceDomain', 'UTF8', None, ),  # 3
        (4, TType.I32, 'productType', None, None, ),  # 4
        (5, TType.STRING, 'productName', 'UTF8', 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', 'UTF8', None, ),  # 11
        (12, TType.I32, 'rate', None, None, ),  # 12
        (13, TType.STRING, 'displayCode', 'UTF8', None, ),  # 13
        (14, TType.STRING, 'calledNumber', 'UTF8', None, ),  # 14
        (15, TType.STRING, 'calleeNationalNumber', 'UTF8', None, ),  # 15
        (16, TType.STRING, 'calleeCallingCode', 'UTF8', None, ),  # 16
        (17, TType.STRING, 'rateDivision', 'UTF8', None, ),  # 17
        None,  # 18
        None,  # 19
        (20, TType.I32, 'adMaxMin', None, None, ),  # 20
        (21, TType.I32, 'adRemains', None, None, ),  # 21
        (22, TType.STRING, 'adSessionId', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.serviceDomain = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRING:
                    self.calledNumber = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.STRING:
                    self.calleeNationalNumber = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.STRING:
                    self.calleeCallingCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRING:
                    self.rateDivision = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.dialedNumber)
            oprot.writeFieldEnd()
        if self.serviceDomain is not None:
            oprot.writeFieldBegin('serviceDomain', TType.STRING, 3)
            oprot.writeString(self.serviceDomain.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.displayCode)
            oprot.writeFieldEnd()
        if self.calledNumber is not None:
            oprot.writeFieldBegin('calledNumber', TType.STRING, 14)
            oprot.writeString(self.calledNumber.encode('utf-8') if sys.version_info[0] == 2 else self.calledNumber)
            oprot.writeFieldEnd()
        if self.calleeNationalNumber is not None:
            oprot.writeFieldBegin('calleeNationalNumber', TType.STRING, 15)
            oprot.writeString(self.calleeNationalNumber.encode('utf-8') if sys.version_info[0] == 2 else self.calleeNationalNumber)
            oprot.writeFieldEnd()
        if self.calleeCallingCode is not None:
            oprot.writeFieldBegin('calleeCallingCode', TType.STRING, 16)
            oprot.writeString(self.calleeCallingCode.encode('utf-8') if sys.version_info[0] == 2 else self.calleeCallingCode)
            oprot.writeFieldEnd()
        if self.rateDivision is not None:
            oprot.writeFieldBegin('rateDivision', TType.STRING, 17)
            oprot.writeString(self.rateDivision.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.adSessionId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - name
     - phone
     - category
     - mid
     - countryAreaCode
     - freePhoneCallable
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'name', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'phone', 'UTF8', None, ),  # 3
        (4, TType.I32, 'category', None, None, ),  # 4
        (5, TType.STRING, 'mid', 'UTF8', None, ),  # 5
        (6, TType.STRING, 'countryAreaCode', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.phone = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.countryAreaCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.phone is not None:
            oprot.writeFieldBegin('phone', TType.STRING, 3)
            oprot.writeString(self.phone.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.countryAreaCode is not None:
            oprot.writeFieldBegin('countryAreaCode', TType.STRING, 6)
            oprot.writeString(self.countryAreaCode.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - spotNearbyItems
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - spotItems
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'calledNumber', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'toMid', 'UTF8', None, ),  # 5
        (6, TType.STRING, 'toName', 'UTF8', 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', 'UTF8', None, ),  # 14
        (15, TType.STRING, 'result', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.calledNumber = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.toMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.toName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.STRING:
                    self.result = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.dialedNumber)
            oprot.writeFieldEnd()
        if self.calledNumber is not None:
            oprot.writeFieldBegin('calledNumber', TType.STRING, 4)
            oprot.writeString(self.calledNumber.encode('utf-8') if sys.version_info[0] == 2 else self.calledNumber)
            oprot.writeFieldEnd()
        if self.toMid is not None:
            oprot.writeFieldBegin('toMid', TType.STRING, 5)
            oprot.writeString(self.toMid.encode('utf-8') if sys.version_info[0] == 2 else self.toMid)
            oprot.writeFieldEnd()
        if self.toName is not None:
            oprot.writeFieldBegin('toName', TType.STRING, 6)
            oprot.writeString(self.toName.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.unit)
            oprot.writeFieldEnd()
        if self.result is not None:
            oprot.writeFieldBegin('result', TType.STRING, 15)
            oprot.writeString(self.result.encode('utf-8') if sys.version_info[0] == 2 else self.result)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - historys
     - hasNext
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'historys', (TType.STRUCT, (PaidCallHistory, PaidCallHistory.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - currencyExchangeRates
     - recommendedCountryCodes
     - adCountries
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'currencyExchangeRates', (TType.STRUCT, (PaidCallCurrencyExchangeRate, PaidCallCurrencyExchangeRate.thrift_spec), False), None, ),  # 1
        (2, TType.LIST, 'recommendedCountryCodes', (TType.STRING, 'UTF8', False), None, ),  # 2
        (3, TType.LIST, 'adCountries', (TType.STRUCT, (PaidCallAdCountry, PaidCallAdCountry.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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 range(_size41):
                        _elem46 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - eventName
     - eventAmount
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'eventName', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 3
        (4, TType.LIST, 'spotItems', (TType.STRUCT, (SpotItem, SpotItem.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.spotItems = []
                    (_etype59, _size56) = iprot.readListBegin()
                    for _i60 in range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - countryCode
     - rate
     - rateDivision
     - rateName
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'countryCode', 'UTF8', None, ),  # 1
        (2, TType.I32, 'rate', None, None, ),  # 2
        (3, TType.STRING, 'rateDivision', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'rateName', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.rateName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.rateDivision)
            oprot.writeFieldEnd()
        if self.rateName is not None:
            oprot.writeFieldBegin('rateName', TType.STRING, 4)
            oprot.writeString(self.rateName.encode('utf-8') if sys.version_info[0] == 2 else self.rateName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - channelId
     - name
     - entryPageUrl
     - descriptionText
     - provider
     - publicType
     - iconImage
     - permissions
     - iconThumbnailImage
     - channelConfigurations
     - lcsAllApiUsable
     - allowedPermissions
     - channelDomains
     - updatedTimestamp
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'channelId', 'UTF8', None, ),  # 1
        None,  # 2
        (3, TType.STRING, 'name', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'entryPageUrl', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'descriptionText', 'UTF8', None, ),  # 5
        (6, TType.STRUCT, 'provider', (ChannelProvider, ChannelProvider.thrift_spec), None, ),  # 6
        (7, TType.I32, 'publicType', None, None, ),  # 7
        (8, TType.STRING, 'iconImage', 'UTF8', None, ),  # 8
        (9, TType.LIST, 'permissions', (TType.STRING, 'UTF8', False), None, ),  # 9
        None,  # 10
        (11, TType.STRING, 'iconThumbnailImage', 'UTF8', None, ),  # 11
        (12, TType.LIST, 'channelConfigurations', (TType.I32, None, False), None, ),  # 12
        (13, TType.BOOL, 'lcsAllApiUsable', None, None, ),  # 13
        (14, TType.SET, 'allowedPermissions', (TType.I32, None, False), None, ),  # 14
        (15, TType.LIST, 'channelDomains', (TType.STRUCT, (ChannelDomain, ChannelDomain.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.entryPageUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.descriptionText = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.LIST:
                    self.permissions = []
                    (_etype66, _size63) = iprot.readListBegin()
                    for _i67 in range(_size63):
                        _elem68 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.permissions.append(_elem68)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.iconThumbnailImage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.LIST:
                    self.channelConfigurations = []
                    (_etype72, _size69) = iprot.readListBegin()
                    for _i73 in range(_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 range(_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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.channelId)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 3)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.entryPageUrl is not None:
            oprot.writeFieldBegin('entryPageUrl', TType.STRING, 4)
            oprot.writeString(self.entryPageUrl.encode('utf-8') if sys.version_info[0] == 2 else self.entryPageUrl)
            oprot.writeFieldEnd()
        if self.descriptionText is not None:
            oprot.writeFieldBegin('descriptionText', TType.STRING, 5)
            oprot.writeString(self.descriptionText.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else iter87)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.iconThumbnailImage is not None:
            oprot.writeFieldBegin('iconThumbnailImage', TType.STRING, 11)
            oprot.writeString(self.iconThumbnailImage.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - approvedChannelInfos
     - revision
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'approvedChannelInfos', (TType.STRUCT, (ApprovedChannelInfo, ApprovedChannelInfo.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - qrcode
     - verifier
     - callbackUrl
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'qrcode', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'verifier', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'callbackUrl', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.callbackUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.qrcode)
            oprot.writeFieldEnd()
        if self.verifier is not None:
            oprot.writeFieldBegin('verifier', TType.STRING, 2)
            oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier)
            oprot.writeFieldEnd()
        if self.callbackUrl is not None:
            oprot.writeFieldBegin('callbackUrl', TType.STRING, 3)
            oprot.writeString(self.callbackUrl.encode('utf-8') if sys.version_info[0] == 2 else self.callbackUrl)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - gaSamplingRate
     - tmid
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.tmid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - ownerMid
     - targetMid
     - previousStatus
     - resultStatus
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'ownerMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'targetMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.targetMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.ownerMid)
            oprot.writeFieldEnd()
        if self.targetMid is not None:
            oprot.writeFieldBegin('targetMid', TType.STRING, 2)
            oprot.writeString(self.targetMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - userTicket
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.userTicket = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.userTicket is not None:
            oprot.writeFieldBegin('userTicket', TType.STRING, 2)
            oprot.writeString(self.userTicket.encode('utf-8') if sys.version_info[0] == 2 else self.userTicket)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - buddyBannerLinkType
     - buddyBannerLink
     - buddyBannerImageUrl
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'buddyBannerLinkType', None, None, ),  # 1
        (2, TType.STRING, 'buddyBannerLink', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'buddyBannerImageUrl', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.buddyBannerImageUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.buddyBannerLink)
            oprot.writeFieldEnd()
        if self.buddyBannerImageUrl is not None:
            oprot.writeFieldBegin('buddyBannerImageUrl', TType.STRING, 3)
            oprot.writeString(self.buddyBannerImageUrl.encode('utf-8') if sys.version_info[0] == 2 else self.buddyBannerImageUrl)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - memberCount
     - onAir
     - businessAccount
     - addable
     - acceptableContentTypes
     - capableMyhome
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', 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, False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

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

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


class Contact(object):
    """
    Attributes:
     - mid
     - createdTime
     - type
     - status
     - relation
     - displayName
     - phoneticName
     - pictureStatus
     - thumbnailUrl
     - statusMessage
     - displayNameOverridden
     - favoriteTime
     - capableVoiceCall
     - capableVideoCall
     - capableMyhome
     - capableBuddy
     - attributes
     - settings
     - picturePath
     - recommendParams
     - friendRequestStatus
     - musicProfile
     - videoProfile
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', 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', 'UTF8', None, ),  # 22
        (23, TType.STRING, 'phoneticName', 'UTF8', None, ),  # 23
        (24, TType.STRING, 'pictureStatus', 'UTF8', None, ),  # 24
        (25, TType.STRING, 'thumbnailUrl', 'UTF8', None, ),  # 25
        (26, TType.STRING, 'statusMessage', 'UTF8', None, ),  # 26
        (27, TType.STRING, 'displayNameOverridden', 'UTF8', 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', 'UTF8', None, ),  # 37
        (38, TType.STRING, 'recommendParams', 'UTF8', None, ),  # 38
        (39, TType.I32, 'friendRequestStatus', None, None, ),  # 39
        (40, TType.STRING, 'musicProfile', 'UTF8', None, ),  # 40
        None,  # 41
        (42, TType.STRING, 'videoProfile', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.STRING:
                    self.phoneticName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.STRING:
                    self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 25:
                if ftype == TType.STRING:
                    self.thumbnailUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 26:
                if ftype == TType.STRING:
                    self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 27:
                if ftype == TType.STRING:
                    self.displayNameOverridden = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 38:
                if ftype == TType.STRING:
                    self.recommendParams = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 42:
                if ftype == TType.STRING:
                    self.videoProfile = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.displayName)
            oprot.writeFieldEnd()
        if self.phoneticName is not None:
            oprot.writeFieldBegin('phoneticName', TType.STRING, 23)
            oprot.writeString(self.phoneticName.encode('utf-8') if sys.version_info[0] == 2 else self.phoneticName)
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 24)
            oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus)
            oprot.writeFieldEnd()
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 25)
            oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl)
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 26)
            oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage)
            oprot.writeFieldEnd()
        if self.displayNameOverridden is not None:
            oprot.writeFieldBegin('displayNameOverridden', TType.STRING, 27)
            oprot.writeString(self.displayNameOverridden.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        if self.recommendParams is not None:
            oprot.writeFieldBegin('recommendParams', TType.STRING, 38)
            oprot.writeString(self.recommendParams.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.musicProfile)
            oprot.writeFieldEnd()
        if self.videoProfile is not None:
            oprot.writeFieldBegin('videoProfile', TType.STRING, 42)
            oprot.writeString(self.videoProfile.encode('utf-8') if sys.version_info[0] == 2 else self.videoProfile)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - classification
     - displayName
     - totalBuddyCount
     - popularContacts
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'classification', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'displayName', 'UTF8', None, ),  # 2
        (3, TType.I32, 'totalBuddyCount', None, None, ),  # 3
        (4, TType.LIST, 'popularContacts', (TType.STRUCT, (Contact, Contact.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.classification)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 2)
            oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - authToken
     - recommendEmailRegistration
     - certificate
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'authToken', 'UTF8', None, ),  # 1
        (2, TType.BOOL, 'recommendEmailRegistration', None, None, ),  # 2
        (3, TType.STRING, 'certificate', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.certificate)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - contentType
     - text
     - location
     - content
     - contentMetadata
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'contentType', None, None, ),  # 1
        (2, TType.STRING, 'text', 'UTF8', None, ),  # 2
        (3, TType.STRUCT, 'location', (Location, Location.thrift_spec), None, ),  # 3
        (4, TType.STRING, 'content', 'BINARY', None, ),  # 4
        (5, TType.MAP, 'contentMetadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.MAP:
                    self.contentMetadata = {}
                    (_ktype113, _vtype114, _size112) = iprot.readMapBegin()
                    for _i116 in range(_size112):
                        _key117 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val118 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.writeBinary(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.encode('utf-8') if sys.version_info[0] == 2 else kiter119)
                oprot.writeString(viter120.encode('utf-8') if sys.version_info[0] == 2 else viter120)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - hls
     - smoothStreaming
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_size121):
                        _key126 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val127 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_size128):
                        _key133 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val134 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else kiter135)
                oprot.writeString(viter136.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else kiter137)
                oprot.writeString(viter138.encode('utf-8') if sys.version_info[0] == 2 else viter138)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - freshnessLifetime
     - onAirId
     - onAir
     - text
     - viewerCount
     - targetCount
     - onAirType
     - onAirUrls
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', None, ),  # 1
        None,  # 2
        (3, TType.I64, 'freshnessLifetime', None, None, ),  # 3
        (4, TType.STRING, 'onAirId', 'UTF8', None, ),  # 4
        (5, TType.BOOL, 'onAir', None, None, ),  # 5
        None,  # 6
        None,  # 7
        None,  # 8
        None,  # 9
        None,  # 10
        (11, TType.STRING, 'text', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - buddyId
     - mid
     - searchId
     - displayName
     - statusMessage
     - contactCount
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'buddyId', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'mid', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'searchId', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'displayName', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'statusMessage', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.searchId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.buddyId)
            oprot.writeFieldEnd()
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 2)
            oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.searchId is not None:
            oprot.writeFieldBegin('searchId', TType.STRING, 3)
            oprot.writeString(self.searchId.encode('utf-8') if sys.version_info[0] == 2 else self.searchId)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 4)
            oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName)
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 5)
            oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - displayName
     - pictureStatus
     - picturePath
     - statusMessage
     - businessAccount
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'displayName', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'pictureStatus', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'picturePath', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'statusMessage', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.picturePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 2)
            oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName)
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 3)
            oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus)
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 4)
            oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 5)
            oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - diff
     - revision
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - phoneNumber
     - countryCode
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.countryCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.phoneNumber)
            oprot.writeFieldEnd()
        if self.countryCode is not None:
            oprot.writeFieldBegin('countryCode', TType.STRING, 2)
            oprot.writeString(self.countryCode.encode('utf-8') if sys.version_info[0] == 2 else self.countryCode)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - channelDomains
     - revision
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'channelDomains', (TType.STRUCT, (ChannelDomain, ChannelDomain.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - productCategoryId
     - title
     - productCount
     - newFlag
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'productCategoryId', None, None, ),  # 1
        (2, TType.STRING, 'title', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - channelInfos
     - revision
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'channelInfos', (TType.STRUCT, (ChannelInfo, ChannelInfo.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - channelId
     - name
     - notificationReceivable
     - messageReceivable
     - showDefault
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'channelId', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'name', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.channelId)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - channelInfos
     - channelDomains
     - revision
     - expires
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'channelInfos', (TType.STRUCT, (ChannelInfo, ChannelInfo.thrift_spec), False), None, ),  # 1
        (2, TType.LIST, 'channelDomains', (TType.STRUCT, (ChannelDomain, ChannelDomain.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - id
     - to
     - from_
     - toChannel
     - fromChannel
     - eventType
     - createdTime
     - operationRevision
     - content
     - push
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'id', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'to', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'from_', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'toChannel', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'fromChannel', 'UTF8', None, ),  # 5
        (6, TType.STRING, 'eventType', 'UTF8', None, ),  # 6
        (7, TType.I64, 'createdTime', None, None, ),  # 7
        (8, TType.I64, 'operationRevision', None, None, ),  # 8
        (9, TType.MAP, 'content', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 9
        (10, TType.MAP, 'push', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.to = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.from_ = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.toChannel = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.fromChannel = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.eventType = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_size167):
                        _key172 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val173 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_size174):
                        _key179 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val180 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.id)
            oprot.writeFieldEnd()
        if self.to is not None:
            oprot.writeFieldBegin('to', TType.STRING, 2)
            oprot.writeString(self.to.encode('utf-8') if sys.version_info[0] == 2 else self.to)
            oprot.writeFieldEnd()
        if self.from_ is not None:
            oprot.writeFieldBegin('from_', TType.STRING, 3)
            oprot.writeString(self.from_.encode('utf-8') if sys.version_info[0] == 2 else self.from_)
            oprot.writeFieldEnd()
        if self.toChannel is not None:
            oprot.writeFieldBegin('toChannel', TType.STRING, 4)
            oprot.writeString(self.toChannel.encode('utf-8') if sys.version_info[0] == 2 else self.toChannel)
            oprot.writeFieldEnd()
        if self.fromChannel is not None:
            oprot.writeFieldBegin('fromChannel', TType.STRING, 5)
            oprot.writeString(self.fromChannel.encode('utf-8') if sys.version_info[0] == 2 else self.fromChannel)
            oprot.writeFieldEnd()
        if self.eventType is not None:
            oprot.writeFieldBegin('eventType', TType.STRING, 6)
            oprot.writeString(self.eventType.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else kiter181)
                oprot.writeString(viter182.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else kiter183)
                oprot.writeString(viter184.encode('utf-8') if sys.version_info[0] == 2 else viter184)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - token
     - obsToken
     - expiration
     - refreshToken
     - channelAccessToken
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'token', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'obsToken', 'UTF8', None, ),  # 2
        (3, TType.I64, 'expiration', None, None, ),  # 3
        (4, TType.STRING, 'refreshToken', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'channelAccessToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.obsToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.channelAccessToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.token)
            oprot.writeFieldEnd()
        if self.obsToken is not None:
            oprot.writeFieldBegin('obsToken', TType.STRING, 2)
            oprot.writeString(self.obsToken.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.refreshToken)
            oprot.writeFieldEnd()
        if self.channelAccessToken is not None:
            oprot.writeFieldBegin('channelAccessToken', TType.STRING, 5)
            oprot.writeString(self.channelAccessToken.encode('utf-8') if sys.version_info[0] == 2 else self.channelAccessToken)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - channelId
     - lastUpdated
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'channelId', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'title', 'UTF8', None, ),  # 5
        (6, TType.BOOL, 'refund', None, None, ),  # 6
        (7, TType.STRING, 'paySeq', 'UTF8', None, ),  # 7
        (8, TType.STRING, 'currency', 'UTF8', None, ),  # 8
        (9, TType.STRING, 'currencySign', 'UTF8', None, ),  # 9
        (10, TType.STRING, 'displayPrice', 'UTF8', None, ),  # 10
        (11, TType.STRUCT, 'payload', (CoinPayLoad, CoinPayLoad.thrift_spec), None, ),  # 11
        (12, TType.STRING, 'channelId', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.title = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.currency = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.currencySign = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.displayPrice = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.price)
            oprot.writeFieldEnd()
        if self.title is not None:
            oprot.writeFieldBegin('title', TType.STRING, 5)
            oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.paySeq)
            oprot.writeFieldEnd()
        if self.currency is not None:
            oprot.writeFieldBegin('currency', TType.STRING, 8)
            oprot.writeString(self.currency.encode('utf-8') if sys.version_info[0] == 2 else self.currency)
            oprot.writeFieldEnd()
        if self.currencySign is not None:
            oprot.writeFieldBegin('currencySign', TType.STRING, 9)
            oprot.writeString(self.currencySign.encode('utf-8') if sys.version_info[0] == 2 else self.currencySign)
            oprot.writeFieldEnd()
        if self.displayPrice is not None:
            oprot.writeFieldBegin('displayPrice', TType.STRING, 10)
            oprot.writeString(self.displayPrice.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.channelId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'eddt', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.eddt = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.language)
            oprot.writeFieldEnd()
        if self.eddt is not None:
            oprot.writeFieldBegin('eddt', TType.STRING, 4)
            oprot.writeString(self.eddt.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - historys
     - balance
     - hasNext
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'historys', (TType.STRUCT, (CoinHistory, CoinHistory.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - itemId
     - coin
     - freeCoin
     - currency
     - price
     - displayPrice
     - name
     - desc
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'itemId', 'UTF8', None, ),  # 1
        (2, TType.I32, 'coin', None, None, ),  # 2
        (3, TType.I32, 'freeCoin', None, None, ),  # 3
        None,  # 4
        (5, TType.STRING, 'currency', 'UTF8', None, ),  # 5
        (6, TType.STRING, 'price', 'UTF8', None, ),  # 6
        (7, TType.STRING, 'displayPrice', 'UTF8', None, ),  # 7
        (8, TType.STRING, 'name', 'UTF8', None, ),  # 8
        (9, TType.STRING, 'desc', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.price = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.displayPrice = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.desc = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.currency)
            oprot.writeFieldEnd()
        if self.price is not None:
            oprot.writeFieldBegin('price', TType.STRING, 6)
            oprot.writeString(self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price)
            oprot.writeFieldEnd()
        if self.displayPrice is not None:
            oprot.writeFieldBegin('displayPrice', TType.STRING, 7)
            oprot.writeString(self.displayPrice.encode('utf-8') if sys.version_info[0] == 2 else self.displayPrice)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 8)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.desc is not None:
            oprot.writeFieldBegin('desc', TType.STRING, 9)
            oprot.writeString(self.desc.encode('utf-8') if sys.version_info[0] == 2 else self.desc)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - orderId
     - appStoreCode
     - receipt
     - signature
     - seller
     - requestType
     - ignoreReceipt
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'orderId', 'UTF8', None, ),  # 1
        (2, TType.I32, 'appStoreCode', None, None, ),  # 2
        (3, TType.STRING, 'receipt', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'signature', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'seller', 'UTF8', None, ),  # 5
        (6, TType.STRING, 'requestType', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.signature = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.seller = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.requestType = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.receipt)
            oprot.writeFieldEnd()
        if self.signature is not None:
            oprot.writeFieldBegin('signature', TType.STRING, 4)
            oprot.writeString(self.signature.encode('utf-8') if sys.version_info[0] == 2 else self.signature)
            oprot.writeFieldEnd()
        if self.seller is not None:
            oprot.writeFieldBegin('seller', TType.STRING, 5)
            oprot.writeString(self.seller.encode('utf-8') if sys.version_info[0] == 2 else self.seller)
            oprot.writeFieldEnd()
        if self.requestType is not None:
            oprot.writeFieldBegin('requestType', TType.STRING, 6)
            oprot.writeString(self.requestType.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - productId
     - country
     - currency
     - price
     - appStoreCode
     - language
     - pgCode
     - redirectUrl
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'productId', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'country', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'currency', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'price', 'UTF8', None, ),  # 4
        (5, TType.I32, 'appStoreCode', None, None, ),  # 5
        (6, TType.STRING, 'language', 'UTF8', None, ),  # 6
        (7, TType.I32, 'pgCode', None, None, ),  # 7
        (8, TType.STRING, 'redirectUrl', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.country = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.currency = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.price = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.productId)
            oprot.writeFieldEnd()
        if self.country is not None:
            oprot.writeFieldBegin('country', TType.STRING, 2)
            oprot.writeString(self.country.encode('utf-8') if sys.version_info[0] == 2 else self.country)
            oprot.writeFieldEnd()
        if self.currency is not None:
            oprot.writeFieldBegin('currency', TType.STRING, 3)
            oprot.writeString(self.currency.encode('utf-8') if sys.version_info[0] == 2 else self.currency)
            oprot.writeFieldEnd()
        if self.price is not None:
            oprot.writeFieldBegin('price', TType.STRING, 4)
            oprot.writeString(self.price.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.redirectUrl)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - itemId
     - itemName
     - amount
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'itemId', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'itemName', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.itemName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.itemId)
            oprot.writeFieldEnd()
        if self.itemName is not None:
            oprot.writeFieldBegin('itemName', TType.STRING, 2)
            oprot.writeString(self.itemName.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - channelId
     - shopOrderId
     - appStoreCode
     - items
     - country
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'channelId', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'shopOrderId', 'UTF8', None, ),  # 2
        (3, TType.I32, 'appStoreCode', None, None, ),  # 3
        (4, TType.LIST, 'items', (TType.STRUCT, (CoinUseReservationItem, CoinUseReservationItem.thrift_spec), False), None, ),  # 4
        (5, TType.STRING, 'country', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.shopOrderId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.channelId)
            oprot.writeFieldEnd()
        if self.shopOrderId is not None:
            oprot.writeFieldBegin('shopOrderId', TType.STRING, 2)
            oprot.writeString(self.shopOrderId.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.country)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - createdTime
     - modifiedTime
     - status
     - settings
     - displayNameOverridden
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', 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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.displayNameOverridden)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - type
     - luid
     - phones
     - emails
     - userids
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'type', None, None, ),  # 1
        (2, TType.STRING, 'luid', 'UTF8', None, ),  # 2
        None,  # 3
        None,  # 4
        None,  # 5
        None,  # 6
        None,  # 7
        None,  # 8
        None,  # 9
        None,  # 10
        (11, TType.LIST, 'phones', (TType.STRING, 'UTF8', False), None, ),  # 11
        (12, TType.LIST, 'emails', (TType.STRING, 'UTF8', False), None, ),  # 12
        (13, TType.LIST, 'userids', (TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.LIST:
                    self.phones = []
                    (_etype202, _size199) = iprot.readListBegin()
                    for _i203 in range(_size199):
                        _elem204 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_size205):
                        _elem210 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_size211):
                        _elem216 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else iter219)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 10
        (11, TType.I32, 'contactType', None, None, ),  # 11
        (12, TType.STRING, 'contactKey', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.contactKey)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - exists
     - contact
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - exists
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - deviceName
     - systemName
     - systemVersion
     - model
     - carrierCode
     - carrierName
     - applicationType
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'deviceName', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'systemName', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'systemVersion', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'model', 'UTF8', None, ),  # 4
        None,  # 5
        None,  # 6
        None,  # 7
        None,  # 8
        None,  # 9
        (10, TType.I32, 'carrierCode', None, None, ),  # 10
        (11, TType.STRING, 'carrierName', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.systemName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.systemVersion = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.model = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.deviceName)
            oprot.writeFieldEnd()
        if self.systemName is not None:
            oprot.writeFieldBegin('systemName', TType.STRING, 2)
            oprot.writeString(self.systemName.encode('utf-8') if sys.version_info[0] == 2 else self.systemName)
            oprot.writeFieldEnd()
        if self.systemVersion is not None:
            oprot.writeFieldBegin('systemVersion', TType.STRING, 3)
            oprot.writeString(self.systemVersion.encode('utf-8') if sys.version_info[0] == 2 else self.systemVersion)
            oprot.writeFieldEnd()
        if self.model is not None:
            oprot.writeFieldBegin('model', TType.STRING, 4)
            oprot.writeString(self.model.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - usePasswordSet
     - email
     - password
     - ignoreDuplication
    """

    thrift_spec = (
        None,  # 0
        (1, TType.BOOL, 'usePasswordSet', None, None, ),  # 1
        (2, TType.STRING, 'email', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'password', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.email)
            oprot.writeFieldEnd()
        if self.password is not None:
            oprot.writeFieldBegin('password', TType.STRING, 3)
            oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - emailConfirmationType
     - verifier
     - targetEmail
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'emailConfirmationType', None, None, ),  # 1
        (2, TType.STRING, 'verifier', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'targetEmail', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.targetEmail = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.verifier)
            oprot.writeFieldEnd()
        if self.targetEmail is not None:
            oprot.writeFieldBegin('targetEmail', TType.STRING, 3)
            oprot.writeString(self.targetEmail.encode('utf-8') if sys.version_info[0] == 2 else self.targetEmail)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - channelId
     - representMid
     - count
     - point
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'channelId', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'representMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.representMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.channelId)
            oprot.writeFieldEnd()
        if self.representMid is not None:
            oprot.writeFieldBegin('representMid', TType.STRING, 2)
            oprot.writeString(self.representMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - expires
     - matrices
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - eMid
     - mid
     - direction
     - method
     - param
     - timestamp
     - seqId
     - displayName
     - picturePath
     - pictureStatus
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'eMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'mid', 'UTF8', None, ),  # 2
        (3, TType.I32, 'direction', None, None, ),  # 3
        (4, TType.I32, 'method', None, None, ),  # 4
        (5, TType.STRING, 'param', 'UTF8', None, ),  # 5
        (6, TType.I64, 'timestamp', None, None, ),  # 6
        (7, TType.I64, 'seqId', None, None, ),  # 7
        None,  # 8
        None,  # 9
        (10, TType.STRING, 'displayName', 'UTF8', None, ),  # 10
        (11, TType.STRING, 'picturePath', 'UTF8', None, ),  # 11
        (12, TType.STRING, 'pictureStatus', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.picturePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.eMid)
            oprot.writeFieldEnd()
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 2)
            oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.displayName)
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 11)
            oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 12)
            oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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), False), None, ),  # 3
        (4, TType.LIST, 'recentOutgoings', (TType.STRUCT, (FriendRequest, FriendRequest.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - applicationType
     - applicationVersion
     - region
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'applicationType', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'applicationVersion', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'region', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.applicationVersion = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.region = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.applicationType)
            oprot.writeFieldEnd()
        if self.applicationVersion is not None:
            oprot.writeFieldBegin('applicationVersion', TType.STRING, 2)
            oprot.writeString(self.applicationVersion.encode('utf-8') if sys.version_info[0] == 2 else self.applicationVersion)
            oprot.writeFieldEnd()
        if self.region is not None:
            oprot.writeFieldBegin('region', TType.STRING, 3)
            oprot.writeString(self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - key
     - targets
     - createdTime
     - data
     - maxDelay
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'key', 'UTF8', None, ),  # 1
        (2, TType.LIST, 'targets', (TType.STRUCT, (NotificationTarget, NotificationTarget.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.targets = []
                    (_etype244, _size241) = iprot.readListBegin()
                    for _i245 in range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - invitationTicket
     - favoriteTimestamp
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'invitationTicket', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

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

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


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

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'id', 'UTF8', 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', 'UTF8', None, ),  # 10
        (11, TType.STRING, 'pictureStatus', 'UTF8', 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), False), None, ),  # 20
        (21, TType.STRUCT, 'creator', (Contact, Contact.thrift_spec), None, ),  # 21
        (22, TType.LIST, 'invitee', (TType.STRUCT, (Contact, Contact.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 11)
            oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - provider
     - identifier
     - password
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'provider', None, None, ),  # 1
        (2, TType.STRING, 'identifier', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'password', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.identifier)
            oprot.writeFieldEnd()
        if self.password is not None:
            oprot.writeFieldBegin('password', TType.STRING, 3)
            oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - lastReadMessageId
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.lastReadMessageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.lastReadMessageId is not None:
            oprot.writeFieldBegin('lastReadMessageId', TType.STRING, 2)
            oprot.writeString(self.lastReadMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.lastReadMessageId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - chatId
     - lastReadMessageIds
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'chatId', 'UTF8', None, ),  # 1
        (2, TType.LIST, 'lastReadMessageIds', (TType.STRUCT, (LastReadMessageId, LastReadMessageId.thrift_spec), False), None, ),  # 2
    )

    def __init__(self, chatId=None, lastReadMessageIds=None,):
        self.chatId = chatId
        self.lastReadMessageIds = lastReadMessageIds

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.lastReadMessageIds = []
                    (_etype265, _size262) = iprot.readListBegin()
                    for _i266 in range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - sessionId
     - method
     - callback
     - normalizedPhone
     - countryCode
     - nationalSignificantNumber
     - availableVerificationMethods
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'sessionId', 'UTF8', None, ),  # 1
        (2, TType.I32, 'method', None, None, ),  # 2
        (3, TType.STRING, 'callback', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'normalizedPhone', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'countryCode', 'UTF8', None, ),  # 5
        (6, TType.STRING, 'nationalSignificantNumber', 'UTF8', None, ),  # 6
        (7, TType.LIST, 'availableVerificationMethods', (TType.I32, None, False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.normalizedPhone = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.countryCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.nationalSignificantNumber = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.LIST:
                    self.availableVerificationMethods = []
                    (_etype272, _size269) = iprot.readListBegin()
                    for _i273 in range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.callback)
            oprot.writeFieldEnd()
        if self.normalizedPhone is not None:
            oprot.writeFieldBegin('normalizedPhone', TType.STRING, 4)
            oprot.writeString(self.normalizedPhone.encode('utf-8') if sys.version_info[0] == 2 else self.normalizedPhone)
            oprot.writeFieldEnd()
        if self.countryCode is not None:
            oprot.writeFieldBegin('countryCode', TType.STRING, 5)
            oprot.writeString(self.countryCode.encode('utf-8') if sys.version_info[0] == 2 else self.countryCode)
            oprot.writeFieldEnd()
        if self.nationalSignificantNumber is not None:
            oprot.writeFieldBegin('nationalSignificantNumber', TType.STRING, 6)
            oprot.writeString(self.nationalSignificantNumber.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

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

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


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

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'authToken', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'certificate', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'verifier', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'pinCode', 'UTF8', None, ),  # 4
        (5, TType.I32, 'type', None, None, ),  # 5
        (6, TType.I64, 'lastPrimaryBindTime', None, None, ),  # 6
        (7, TType.STRING, 'displayMessage', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.certificate = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.pinCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.authToken)
            oprot.writeFieldEnd()
        if self.certificate is not None:
            oprot.writeFieldBegin('certificate', TType.STRING, 2)
            oprot.writeString(self.certificate.encode('utf-8') if sys.version_info[0] == 2 else self.certificate)
            oprot.writeFieldEnd()
        if self.verifier is not None:
            oprot.writeFieldBegin('verifier', TType.STRING, 3)
            oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier)
            oprot.writeFieldEnd()
        if self.pinCode is not None:
            oprot.writeFieldBegin('pinCode', TType.STRING, 4)
            oprot.writeString(self.pinCode.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'password', 'UTF8', None, ),  # 4
        (5, TType.BOOL, 'keepLoggedIn', None, None, ),  # 5
        (6, TType.STRING, 'accessLocation', 'UTF8', None, ),  # 6
        (7, TType.STRING, 'systemName', 'UTF8', None, ),  # 7
        (8, TType.STRING, 'certificate', 'UTF8', None, ),  # 8
        (9, TType.STRING, 'verifier', 'UTF8', None, ),  # 9
        (10, TType.STRING, 'secret', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.systemName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.certificate = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.secret = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.identifier)
            oprot.writeFieldEnd()
        if self.password is not None:
            oprot.writeFieldBegin('password', TType.STRING, 4)
            oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.accessLocation)
            oprot.writeFieldEnd()
        if self.systemName is not None:
            oprot.writeFieldBegin('systemName', TType.STRING, 7)
            oprot.writeString(self.systemName.encode('utf-8') if sys.version_info[0] == 2 else self.systemName)
            oprot.writeFieldEnd()
        if self.certificate is not None:
            oprot.writeFieldBegin('certificate', TType.STRING, 8)
            oprot.writeString(self.certificate.encode('utf-8') if sys.version_info[0] == 2 else self.certificate)
            oprot.writeFieldEnd()
        if self.verifier is not None:
            oprot.writeFieldBegin('verifier', TType.STRING, 9)
            oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier)
            oprot.writeFieldEnd()
        if self.secret is not None:
            oprot.writeFieldBegin('secret', TType.STRING, 10)
            oprot.writeString(self.secret.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - tokenKey
     - expirationTime
     - applicationType
     - systemName
     - accessLocation
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'tokenKey', 'UTF8', 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', 'UTF8', None, ),  # 12
        None,  # 13
        None,  # 14
        None,  # 15
        None,  # 16
        None,  # 17
        None,  # 18
        None,  # 19
        None,  # 20
        None,  # 21
        (22, TType.STRING, 'accessLocation', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.accessLocation = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.systemName)
            oprot.writeFieldEnd()
        if self.accessLocation is not None:
            oprot.writeFieldBegin('accessLocation', TType.STRING, 22)
            oprot.writeString(self.accessLocation.encode('utf-8') if sys.version_info[0] == 2 else self.accessLocation)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class Message(object):
    """
    Attributes:
     - _from
     - to
     - toType
     - id
     - createdTime
     - deliveredTime
     - text
     - location
     - hasContent
     - contentType
     - contentPreview
     - contentMetadata
     - sessionId
     - chunks
     - relatedMessageId
     - messageRelationType
     - readCount
     - relatedMessageServiceCode
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, '_from', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'to', 'UTF8', None, ),  # 2
        (3, TType.I32, 'toType', None, None, ),  # 3
        (4, TType.STRING, 'id', 'UTF8', 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', 'UTF8', 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', 'BINARY', None, ),  # 17
        (18, TType.MAP, 'contentMetadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 18
        (19, TType.BYTE, 'sessionId', None, None, ),  # 19
        (20, TType.LIST, 'chunks', (TType.STRING, 'BINARY', False), None, ),  # 20
        (21, TType.STRING, 'relatedMessageId', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.to = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 18:
                if ftype == TType.MAP:
                    self.contentMetadata = {}
                    (_ktype277, _vtype278, _size276) = iprot.readMapBegin()
                    for _i280 in range(_size276):
                        _key281 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val282 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_size283):
                        _elem288 = iprot.readBinary()
                        self.chunks.append(_elem288)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRING:
                    self.relatedMessageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self._from)
            oprot.writeFieldEnd()
        if self.to is not None:
            oprot.writeFieldBegin('to', TType.STRING, 2)
            oprot.writeString(self.to.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.writeBinary(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.encode('utf-8') if sys.version_info[0] == 2 else kiter289)
                oprot.writeString(viter290.encode('utf-8') if sys.version_info[0] == 2 else 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.writeBinary(iter291)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.relatedMessageId is not None:
            oprot.writeFieldBegin('relatedMessageId', TType.STRING, 21)
            oprot.writeString(self.relatedMessageId.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - message
     - fromType
     - squareMessageRevision
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRUCT, 'message', (Message, Message.thrift_spec), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMemberMid
     - squareChatMid
     - revision
     - membershipState
     - notificationForMessage
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMemberMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMemberMid)
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(self.squareChatMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 10
        (11, TType.STRING, 'param2', 'UTF8', None, ),  # 11
        (12, TType.STRING, 'param3', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.param2 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.param3 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.param1)
            oprot.writeFieldEnd()
        if self.param2 is not None:
            oprot.writeFieldBegin('param2', TType.STRING, 11)
            oprot.writeString(self.param2.encode('utf-8') if sys.version_info[0] == 2 else self.param2)
            oprot.writeFieldEnd()
        if self.param3 is not None:
            oprot.writeFieldBegin('param3', TType.STRING, 12)
            oprot.writeString(self.param3.encode('utf-8') if sys.version_info[0] == 2 else self.param3)
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRUCT, 20)
            self.message.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - operations
     - endFlag
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'operations', (TType.STRUCT, (MessageOperation, MessageOperation.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - requestId
     - messageIds
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'requestId', 'UTF8', None, ),  # 1
        (2, TType.LIST, 'messageIds', (TType.STRING, 'UTF8', False), None, ),  # 2
    )

    def __init__(self, requestId=None, messageIds=None,):
        self.requestId = requestId
        self.messageIds = messageIds

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.messageIds = []
                    (_etype302, _size299) = iprot.readListBegin()
                    for _i303 in range(_size299):
                        _elem304 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else iter305)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - createTime
     - regionCode
     - identities
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'createTime', None, None, ),  # 1
        (2, TType.STRING, 'regionCode', 'UTF8', None, ),  # 2
        (3, TType.MAP, 'identities', (TType.I32, None, TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.identities = {}
                    (_ktype307, _vtype308, _size306) = iprot.readMapBegin()
                    for _i310 in range(_size306):
                        _key311 = iprot.readI32()
                        _val312 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else viter314)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - id
     - _from
     - to
     - fromChannel
     - toChannel
     - revision
     - createdTime
     - content
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'id', 'UTF8', None, ),  # 1
        (2, TType.STRING, '_from', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'to', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'fromChannel', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'toChannel', 'UTF8', None, ),  # 5
        None,  # 6
        (7, TType.I64, 'revision', None, None, ),  # 7
        (8, TType.I64, 'createdTime', None, None, ),  # 8
        (9, TType.MAP, 'content', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self._from = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.to = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.fromChannel = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.toChannel = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_size315):
                        _key320 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val321 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.id)
            oprot.writeFieldEnd()
        if self._from is not None:
            oprot.writeFieldBegin('_from', TType.STRING, 2)
            oprot.writeString(self._from.encode('utf-8') if sys.version_info[0] == 2 else self._from)
            oprot.writeFieldEnd()
        if self.to is not None:
            oprot.writeFieldBegin('to', TType.STRING, 3)
            oprot.writeString(self.to.encode('utf-8') if sys.version_info[0] == 2 else self.to)
            oprot.writeFieldEnd()
        if self.fromChannel is not None:
            oprot.writeFieldBegin('fromChannel', TType.STRING, 4)
            oprot.writeString(self.fromChannel.encode('utf-8') if sys.version_info[0] == 2 else self.fromChannel)
            oprot.writeFieldEnd()
        if self.toChannel is not None:
            oprot.writeFieldBegin('toChannel', TType.STRING, 5)
            oprot.writeString(self.toChannel.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else kiter322)
                oprot.writeString(viter323.encode('utf-8') if sys.version_info[0] == 2 else viter323)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - fetchMode
     - itemList
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'fetchMode', None, None, ),  # 1
        (2, TType.LIST, 'itemList', (TType.STRUCT, (NotificationItem, NotificationItem.thrift_spec), False), None, ),  # 2
    )

    def __init__(self, fetchMode=None, itemList=None,):
        self.fetchMode = fetchMode
        self.itemList = itemList

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

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

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


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

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'revision', None, None, ),  # 1
        (2, TType.I64, 'createdTime', None, None, ),  # 2
        (3, TType.I32, 'type', None, None, ),  # 3
        (4, TType.I32, 'reqSeq', None, None, ),  # 4
        (5, TType.STRING, 'checksum', 'UTF8', None, ),  # 5
        None,  # 6
        (7, TType.I32, 'status', None, None, ),  # 7
        None,  # 8
        None,  # 9
        (10, TType.STRING, 'param1', 'UTF8', None, ),  # 10
        (11, TType.STRING, 'param2', 'UTF8', None, ),  # 11
        (12, TType.STRING, 'param3', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.param2 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.param3 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.param1)
            oprot.writeFieldEnd()
        if self.param2 is not None:
            oprot.writeFieldBegin('param2', TType.STRING, 11)
            oprot.writeString(self.param2.encode('utf-8') if sys.version_info[0] == 2 else self.param2)
            oprot.writeFieldEnd()
        if self.param3 is not None:
            oprot.writeFieldBegin('param3', TType.STRING, 12)
            oprot.writeString(self.param3.encode('utf-8') if sys.version_info[0] == 2 else self.param3)
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRUCT, 20)
            self.message.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - receiverMid
     - productId
     - language
     - location
     - currency
     - price
     - appStoreCode
     - messageText
     - messageTemplate
     - packageId
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'receiverMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'productId', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'language', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'location', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'currency', 'UTF8', None, ),  # 5
        (6, TType.STRING, 'price', 'UTF8', None, ),  # 6
        (7, TType.I32, 'appStoreCode', None, None, ),  # 7
        (8, TType.STRING, 'messageText', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.productId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.language = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.location = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.currency = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.price = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.receiverMid)
            oprot.writeFieldEnd()
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 2)
            oprot.writeString(self.productId.encode('utf-8') if sys.version_info[0] == 2 else self.productId)
            oprot.writeFieldEnd()
        if self.language is not None:
            oprot.writeFieldBegin('language', TType.STRING, 3)
            oprot.writeString(self.language.encode('utf-8') if sys.version_info[0] == 2 else self.language)
            oprot.writeFieldEnd()
        if self.location is not None:
            oprot.writeFieldBegin('location', TType.STRING, 4)
            oprot.writeString(self.location.encode('utf-8') if sys.version_info[0] == 2 else self.location)
            oprot.writeFieldEnd()
        if self.currency is not None:
            oprot.writeFieldBegin('currency', TType.STRING, 5)
            oprot.writeString(self.currency.encode('utf-8') if sys.version_info[0] == 2 else self.currency)
            oprot.writeFieldEnd()
        if self.price is not None:
            oprot.writeFieldBegin('price', TType.STRING, 6)
            oprot.writeString(self.price.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - orderId
     - confirmUrl
     - extras
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'orderId', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'confirmUrl', 'UTF8', None, ),  # 2
        (3, TType.MAP, 'extras', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.confirmUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.extras = {}
                    (_ktype332, _vtype333, _size331) = iprot.readMapBegin()
                    for _i335 in range(_size331):
                        _key336 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val337 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.orderId)
            oprot.writeFieldEnd()
        if self.confirmUrl is not None:
            oprot.writeFieldBegin('confirmUrl', TType.STRING, 2)
            oprot.writeString(self.confirmUrl.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else kiter338)
                oprot.writeString(viter339.encode('utf-8') if sys.version_info[0] == 2 else viter339)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 1
        (2, TType.I64, 'packageId', None, None, ),  # 2
        (3, TType.I32, 'version', None, None, ),  # 3
        (4, TType.STRING, 'authorName', 'UTF8', 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', 'UTF8', None, ),  # 8
        (9, TType.STRING, 'title', 'UTF8', None, ),  # 9
        (10, TType.STRING, 'descriptionText', 'UTF8', None, ),  # 10
        (11, TType.I64, 'shopOrderId', None, None, ),  # 11
        (12, TType.STRING, 'fromMid', 'UTF8', None, ),  # 12
        (13, TType.STRING, 'toMid', 'UTF8', None, ),  # 13
        (14, TType.I64, 'validUntil', None, None, ),  # 14
        (15, TType.I32, 'priceTier', None, None, ),  # 15
        (16, TType.STRING, 'price', 'UTF8', None, ),  # 16
        (17, TType.STRING, 'currency', 'UTF8', None, ),  # 17
        (18, TType.STRING, 'currencySymbol', 'UTF8', 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', 'UTF8', None, ),  # 23
        (24, TType.STRING, 'downloadUrl', 'UTF8', None, ),  # 24
        (25, TType.STRING, 'buddyMid', 'UTF8', 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), False), None, ),  # 29
        (30, TType.STRING, 'missionButtonText', 'UTF8', None, ),  # 30
        (31, TType.STRING, 'missionShortDescription', 'UTF8', None, ),  # 31
        (32, TType.STRING, 'authorId', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.title = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.descriptionText = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRING:
                    self.toMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRING:
                    self.currency = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 18:
                if ftype == TType.STRING:
                    self.currencySymbol = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.STRING:
                    self.downloadUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 25:
                if ftype == TType.STRING:
                    self.buddyMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 31:
                if ftype == TType.STRING:
                    self.missionShortDescription = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 32:
                if ftype == TType.STRING:
                    self.authorId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.copyright)
            oprot.writeFieldEnd()
        if self.title is not None:
            oprot.writeFieldBegin('title', TType.STRING, 9)
            oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title)
            oprot.writeFieldEnd()
        if self.descriptionText is not None:
            oprot.writeFieldBegin('descriptionText', TType.STRING, 10)
            oprot.writeString(self.descriptionText.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.fromMid)
            oprot.writeFieldEnd()
        if self.toMid is not None:
            oprot.writeFieldBegin('toMid', TType.STRING, 13)
            oprot.writeString(self.toMid.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.price)
            oprot.writeFieldEnd()
        if self.currency is not None:
            oprot.writeFieldBegin('currency', TType.STRING, 17)
            oprot.writeString(self.currency.encode('utf-8') if sys.version_info[0] == 2 else self.currency)
            oprot.writeFieldEnd()
        if self.currencySymbol is not None:
            oprot.writeFieldBegin('currencySymbol', TType.STRING, 18)
            oprot.writeString(self.currencySymbol.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.urlSchema)
            oprot.writeFieldEnd()
        if self.downloadUrl is not None:
            oprot.writeFieldBegin('downloadUrl', TType.STRING, 24)
            oprot.writeString(self.downloadUrl.encode('utf-8') if sys.version_info[0] == 2 else self.downloadUrl)
            oprot.writeFieldEnd()
        if self.buddyMid is not None:
            oprot.writeFieldBegin('buddyMid', TType.STRING, 25)
            oprot.writeString(self.buddyMid.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.missionButtonText)
            oprot.writeFieldEnd()
        if self.missionShortDescription is not None:
            oprot.writeFieldBegin('missionShortDescription', TType.STRING, 31)
            oprot.writeString(self.missionShortDescription.encode('utf-8') if sys.version_info[0] == 2 else self.missionShortDescription)
            oprot.writeFieldEnd()
        if self.authorId is not None:
            oprot.writeFieldBegin('authorId', TType.STRING, 32)
            oprot.writeString(self.authorId.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 6
        (7, TType.LIST, 'productList', (TType.STRUCT, (Product, Product.thrift_spec), False), None, ),  # 7
        (8, TType.STRING, 'bannerLang', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.LIST:
                    self.productList = []
                    (_etype350, _size347) = iprot.readListBegin()
                    for _i351 in range(_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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.bannerLang)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - productId
     - packageId
     - version
     - onSale
     - validUntil
     - stickerIdRanges
     - grantedByDefault
     - displayOrder
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'productId', 'UTF8', 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), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

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

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


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

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', None, ),  # 1
        None,  # 2
        (3, TType.STRING, 'userid', 'UTF8', None, ),  # 3
        None,  # 4
        None,  # 5
        None,  # 6
        None,  # 7
        None,  # 8
        None,  # 9
        (10, TType.STRING, 'phone', 'UTF8', None, ),  # 10
        (11, TType.STRING, 'email', 'UTF8', None, ),  # 11
        (12, TType.STRING, 'regionCode', 'UTF8', None, ),  # 12
        None,  # 13
        None,  # 14
        None,  # 15
        None,  # 16
        None,  # 17
        None,  # 18
        None,  # 19
        (20, TType.STRING, 'displayName', 'UTF8', None, ),  # 20
        (21, TType.STRING, 'phoneticName', 'UTF8', None, ),  # 21
        (22, TType.STRING, 'pictureStatus', 'UTF8', None, ),  # 22
        (23, TType.STRING, 'thumbnailUrl', 'UTF8', None, ),  # 23
        (24, TType.STRING, 'statusMessage', 'UTF8', 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', 'UTF8', None, ),  # 33
        (34, TType.STRING, 'musicProfile', 'UTF8', None, ),  # 34
        (35, TType.STRING, 'videoProfile', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.userid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.phone = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.email = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.regionCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.STRING:
                    self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRING:
                    self.phoneticName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.STRING:
                    self.thumbnailUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.STRING:
                    self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 34:
                if ftype == TType.STRING:
                    self.musicProfile = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 35:
                if ftype == TType.STRING:
                    self.videoProfile = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.userid is not None:
            oprot.writeFieldBegin('userid', TType.STRING, 3)
            oprot.writeString(self.userid.encode('utf-8') if sys.version_info[0] == 2 else self.userid)
            oprot.writeFieldEnd()
        if self.phone is not None:
            oprot.writeFieldBegin('phone', TType.STRING, 10)
            oprot.writeString(self.phone.encode('utf-8') if sys.version_info[0] == 2 else self.phone)
            oprot.writeFieldEnd()
        if self.email is not None:
            oprot.writeFieldBegin('email', TType.STRING, 11)
            oprot.writeString(self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email)
            oprot.writeFieldEnd()
        if self.regionCode is not None:
            oprot.writeFieldBegin('regionCode', TType.STRING, 12)
            oprot.writeString(self.regionCode.encode('utf-8') if sys.version_info[0] == 2 else self.regionCode)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 20)
            oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName)
            oprot.writeFieldEnd()
        if self.phoneticName is not None:
            oprot.writeFieldBegin('phoneticName', TType.STRING, 21)
            oprot.writeString(self.phoneticName.encode('utf-8') if sys.version_info[0] == 2 else self.phoneticName)
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 22)
            oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus)
            oprot.writeFieldEnd()
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 23)
            oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl)
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 24)
            oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        if self.musicProfile is not None:
            oprot.writeFieldBegin('musicProfile', TType.STRING, 34)
            oprot.writeString(self.musicProfile.encode('utf-8') if sys.version_info[0] == 2 else self.musicProfile)
            oprot.writeFieldEnd()
        if self.videoProfile is not None:
            oprot.writeFieldBegin('videoProfile', TType.STRING, 35)
            oprot.writeString(self.videoProfile.encode('utf-8') if sys.version_info[0] == 2 else self.videoProfile)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - users
     - buddies
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'users', (TType.STRUCT, (Contact, Contact.thrift_spec), False), None, ),  # 1
        (2, TType.LIST, 'buddies', (TType.STRUCT, (Contact, Contact.thrift_spec), False), None, ),  # 2
    )

    def __init__(self, users=None, buddies=None,):
        self.users = users
        self.buddies = buddies

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - authToken
     - userCreated
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'authToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - requestToken
     - returnUrl
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'requestToken', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'returnUrl', 'UTF8', None, ),  # 2
    )

    def __init__(self, requestToken=None, returnUrl=None,):
        self.requestToken = requestToken
        self.returnUrl = returnUrl

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.returnUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.requestToken)
            oprot.writeFieldEnd()
        if self.returnUrl is not None:
            oprot.writeFieldBegin('returnUrl', TType.STRING, 2)
            oprot.writeString(self.returnUrl.encode('utf-8') if sys.version_info[0] == 2 else self.returnUrl)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', 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), False), 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, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_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 range(_size388):
                        _elem393 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else iter395)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - language
     - name
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.language)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'data', 'BINARY', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.data = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.scheme)
            oprot.writeFieldEnd()
        if self.data is not None:
            oprot.writeFieldBegin('data', TType.STRING, 4)
            oprot.writeBinary(self.data)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - status
     - language
     - revision
     - scheme
     - data
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'status', None, None, ),  # 1
        (2, TType.STRING, 'language', 'UTF8', None, ),  # 2
        (3, TType.I64, 'revision', None, None, ),  # 3
        (4, TType.STRING, 'scheme', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'data', 'BINARY', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.data = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.scheme)
            oprot.writeFieldEnd()
        if self.data is not None:
            oprot.writeFieldBegin('data', TType.STRING, 5)
            oprot.writeBinary(self.data)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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), False), None, ),  # 2
    )

    def __init__(self, itemIncrement=None, tagIncrements=None,):
        self.itemIncrement = itemIncrement
        self.tagIncrements = tagIncrements

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - revision
     - scheme
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'revision', None, None, ),  # 1
        (2, TType.STRING, 'scheme', 'UTF8', None, ),  # 2
    )

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.scheme)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - language
     - revision
     - scheme
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'language', 'UTF8', None, ),  # 1
        (2, TType.I64, 'revision', None, None, ),  # 2
        (3, TType.STRING, 'scheme', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.scheme)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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), False), None, ),  # 2
    )

    def __init__(self, itemRevision=None, tagRevisions=None,):
        self.itemRevision = itemRevision
        self.tagRevisions = tagRevisions

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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), False), None, ),  # 3
        (4, TType.LIST, 'preloadedDictionaries', (TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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 range(_size416):
                        _elem421 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else iter423)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - normalizedPhoneNumber
     - allowedToSearchByPhoneNumber
     - allowedToReceiveMessageFromNonFriend
     - region
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'normalizedPhoneNumber', 'UTF8', None, ),  # 2
        (3, TType.BOOL, 'allowedToSearchByPhoneNumber', None, None, ),  # 3
        (4, TType.BOOL, 'allowedToReceiveMessageFromNonFriend', None, None, ),  # 4
        (5, TType.STRING, 'region', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.normalizedPhoneNumber = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.normalizedPhoneNumber is not None:
            oprot.writeFieldBegin('normalizedPhoneNumber', TType.STRING, 2)
            oprot.writeString(self.normalizedPhoneNumber.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.region)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - name
     - address
     - latitude
     - longitude
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'address', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.address = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.address is not None:
            oprot.writeFieldBegin('address', TType.STRING, 2)
            oprot.writeString(self.address.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - keynm
     - nvalue
     - evalue
     - sessionKey
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'keynm', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'nvalue', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'evalue', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'sessionKey', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.nvalue = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.evalue = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.sessionKey = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.keynm)
            oprot.writeFieldEnd()
        if self.nvalue is not None:
            oprot.writeFieldBegin('nvalue', TType.STRING, 2)
            oprot.writeString(self.nvalue.encode('utf-8') if sys.version_info[0] == 2 else self.nvalue)
            oprot.writeFieldEnd()
        if self.evalue is not None:
            oprot.writeFieldBegin('evalue', TType.STRING, 3)
            oprot.writeString(self.evalue.encode('utf-8') if sys.version_info[0] == 2 else self.evalue)
            oprot.writeFieldEnd()
        if self.sessionKey is not None:
            oprot.writeFieldBegin('sessionKey', TType.STRING, 4)
            oprot.writeString(self.sessionKey.encode('utf-8') if sys.version_info[0] == 2 else self.sessionKey)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - uri
     - token
     - cookiePath
     - skip
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'uri', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'token', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'cookiePath', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.token = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.cookiePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.uri)
            oprot.writeFieldEnd()
        if self.token is not None:
            oprot.writeFieldBegin('token', TType.STRING, 2)
            oprot.writeString(self.token.encode('utf-8') if sys.version_info[0] == 2 else self.token)
            oprot.writeFieldEnd()
        if self.cookiePath is not None:
            oprot.writeFieldBegin('cookiePath', TType.STRING, 3)
            oprot.writeString(self.cookiePath.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - requestId
     - state
     - messageId
     - eventNo
     - receiverCount
     - successCount
     - failCount
     - cancelCount
     - blockCount
     - unregisterCount
     - timestamp
     - message
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'requestId', 'UTF8', None, ),  # 1
        (2, TType.I32, 'state', None, None, ),  # 2
        (3, TType.STRING, 'messageId', 'UTF8', 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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - requestId
     - state
     - eventNo
     - receiverCount
     - successCount
     - failCount
     - cancelCount
     - unregisterCount
     - timestamp
     - message
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'requestId', 'UTF8', 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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 16
        (17, TType.STRING, 'notificationSoundGroup', 'UTF8', 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', 'UTF8', 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', 'UTF8', None, ),  # 41
        (42, TType.MAP, 'snsAccounts', (TType.I32, None, TType.STRING, 'UTF8', False), 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', 'UTF8', 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, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRING:
                    self.notificationSoundGroup = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 42:
                if ftype == TType.MAP:
                    self.snsAccounts = {}
                    (_ktype425, _vtype426, _size424) = iprot.readMapBegin()
                    for _i428 in range(_size424):
                        _key429 = iprot.readI32()
                        _val430 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 60:
                if ftype == TType.MAP:
                    self.customModes = {}
                    (_ktype432, _vtype433, _size431) = iprot.readMapBegin()
                    for _i435 in range(_size431):
                        _key436 = iprot.readI32()
                        _val437 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.notificationSoundMessage)
            oprot.writeFieldEnd()
        if self.notificationSoundGroup is not None:
            oprot.writeFieldBegin('notificationSoundGroup', TType.STRING, 17)
            oprot.writeString(self.notificationSoundGroup.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - applicationType
     - applicationVersion
     - locale
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'applicationType', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'applicationVersion', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'locale', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.applicationVersion = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.locale = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.applicationType)
            oprot.writeFieldEnd()
        if self.applicationVersion is not None:
            oprot.writeFieldBegin('applicationVersion', TType.STRING, 2)
            oprot.writeString(self.applicationVersion.encode('utf-8') if sys.version_info[0] == 2 else self.applicationVersion)
            oprot.writeFieldEnd()
        if self.locale is not None:
            oprot.writeFieldBegin('locale', TType.STRING, 3)
            oprot.writeString(self.locale.encode('utf-8') if sys.version_info[0] == 2 else self.locale)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - displayName
     - pictureStatus
     - picturePath
     - statusMessage
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'mid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'displayName', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'pictureStatus', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'picturePath', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'statusMessage', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.picturePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 2)
            oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName)
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 3)
            oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus)
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 4)
            oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 5)
            oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - snsUserId
     - snsUserName
     - snsIdType
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'snsUserId', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'snsUserName', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.snsUserName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.snsUserId)
            oprot.writeFieldEnd()
        if self.snsUserName is not None:
            oprot.writeFieldBegin('snsUserName', TType.STRING, 2)
            oprot.writeString(self.snsUserName.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.snsUserId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - snsFriends
     - hasMore
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'snsFriends', (TType.STRUCT, (SnsFriend, SnsFriend.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - snsUserId
     - snsUserName
     - email
     - thumbnailUrl
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'snsUserId', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'snsUserName', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'email', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'thumbnailUrl', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.snsUserName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.email = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.thumbnailUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.snsUserId)
            oprot.writeFieldEnd()
        if self.snsUserName is not None:
            oprot.writeFieldBegin('snsUserName', TType.STRING, 2)
            oprot.writeString(self.snsUserName.encode('utf-8') if sys.version_info[0] == 2 else self.snsUserName)
            oprot.writeFieldEnd()
        if self.email is not None:
            oprot.writeFieldBegin('email', TType.STRING, 3)
            oprot.writeString(self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email)
            oprot.writeFieldEnd()
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 4)
            oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - endpoint
     - endpointSsl
     - updateUrl
     - c2dmAccount
     - nniServer
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'endpoint', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'endpointSsl', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'updateUrl', 'UTF8', None, ),  # 3
        None,  # 4
        None,  # 5
        None,  # 6
        None,  # 7
        None,  # 8
        None,  # 9
        None,  # 10
        (11, TType.STRING, 'c2dmAccount', 'UTF8', None, ),  # 11
        (12, TType.STRING, 'nniServer', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.endpointSsl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.updateUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.c2dmAccount = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.nniServer = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.endpoint)
            oprot.writeFieldEnd()
        if self.endpointSsl is not None:
            oprot.writeFieldBegin('endpointSsl', TType.STRING, 2)
            oprot.writeString(self.endpointSsl.encode('utf-8') if sys.version_info[0] == 2 else self.endpointSsl)
            oprot.writeFieldEnd()
        if self.updateUrl is not None:
            oprot.writeFieldBegin('updateUrl', TType.STRING, 3)
            oprot.writeString(self.updateUrl.encode('utf-8') if sys.version_info[0] == 2 else self.updateUrl)
            oprot.writeFieldEnd()
        if self.c2dmAccount is not None:
            oprot.writeFieldBegin('c2dmAccount', TType.STRING, 11)
            oprot.writeString(self.c2dmAccount.encode('utf-8') if sys.version_info[0] == 2 else self.c2dmAccount)
            oprot.writeFieldEnd()
        if self.nniServer is not None:
            oprot.writeFieldBegin('nniServer', TType.STRING, 12)
            oprot.writeString(self.nniServer.encode('utf-8') if sys.version_info[0] == 2 else self.nniServer)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - id
     - expirationTime
     - maxUseCount
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'id', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - id
     - channelId
     - lastSeq
     - unreadCount
     - lastModifiedTime
     - status
     - midType
     - lastMessages
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'id', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'channelId', 'UTF8', 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), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.id)
            oprot.writeFieldEnd()
        if self.channelId is not None:
            oprot.writeFieldBegin('channelId', TType.STRING, 2)
            oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - messageBox
     - name
     - contacts
     - pictureRevision
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRUCT, 'messageBox', (TMessageBox, TMessageBox.thrift_spec), None, ),  # 1
        (2, TType.STRING, 'name', 'UTF8', None, ),  # 2
        (3, TType.LIST, 'contacts', (TType.STRUCT, (Contact, Contact.thrift_spec), False), None, ),  # 3
        (4, TType.STRING, 'pictureRevision', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.contacts = []
                    (_etype459, _size456) = iprot.readListBegin()
                    for _i460 in range(_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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.pictureRevision)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - messageBoxWrapUpList
     - totalSize
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'messageBoxWrapUpList', (TType.STRUCT, (TMessageBoxWrapUp, TMessageBoxWrapUp.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - chatId
     - ranges
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'chatId', 'UTF8', None, ),  # 1
        (2, TType.MAP, 'ranges', (TType.STRING, 'UTF8', TType.LIST, (TType.STRUCT, (TMessageReadRangeEntry, TMessageReadRangeEntry.thrift_spec), False), False), None, ),  # 2
    )

    def __init__(self, chatId=None, ranges=None,):
        self.chatId = chatId
        self.ranges = ranges

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.ranges = {}
                    (_ktype471, _vtype472, _size470) = iprot.readMapBegin()
                    for _i474 in range(_size470):
                        _key475 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val476 = []
                        (_etype480, _size477) = iprot.readListBegin()
                        for _i481 in range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - displayFields
     - text
     - link
     - thumbnail
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'displayFields', None, None, ),  # 1
        (2, TType.STRING, 'text', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'link', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'thumbnail', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.link = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.thumbnail = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.text)
            oprot.writeFieldEnd()
        if self.link is not None:
            oprot.writeFieldBegin('link', TType.STRING, 3)
            oprot.writeString(self.link.encode('utf-8') if sys.version_info[0] == 2 else self.link)
            oprot.writeFieldEnd()
        if self.thumbnail is not None:
            oprot.writeFieldBegin('thumbnail', TType.STRING, 4)
            oprot.writeString(self.thumbnail.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnail)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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), False), None, ),  # 2
        (3, TType.LIST, 'syncParamMid', (TType.STRUCT, (SyncParamMid, SyncParamMid.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - member
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'squareMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - reqSeq
     - squareChatMid
     - squareMessage
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'reqSeq', None, None, ),  # 1
        (2, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - messageId
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 2
        None,  # 3
        (4, TType.STRING, 'messageId', 'UTF8', None, ),  # 4
    )

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.messageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.STRING, 4)
            oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):

    thrift_spec = (
    )

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('MarkAsReadResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - approvedMembers
     - status
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'approvedMembers', (TType.STRUCT, (SquareMember, SquareMember.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - requestedMemberMids
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'squareMid', 'UTF8', None, ),  # 2
        (3, TType.LIST, 'requestedMemberMids', (TType.STRING, 'UTF8', False), None, ),  # 3
    )

    def __init__(self, squareMid=None, requestedMemberMids=None,):
        self.squareMid = squareMid
        self.requestedMemberMids = requestedMemberMids

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.requestedMemberMids = []
                    (_etype510, _size507) = iprot.readListBegin()
                    for _i511 in range(_size507):
                        _elem512 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else iter513)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_size514):
                        _elem519 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else iter520)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):

    thrift_spec = (
    )

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('DeleteSquareChatResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - revision
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.I64, 'revision', None, None, ),  # 2
    )

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('DeleteSquareChatRequest')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(self.squareChatMid.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):

    thrift_spec = (
    )

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('DeleteSquareResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
     - revision
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'mid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):

    thrift_spec = (
    )

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('DestroyMessageResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - messageId
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 2
        None,  # 3
        (4, TType.STRING, 'messageId', 'UTF8', None, ),  # 4
    )

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.messageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.STRING, 4)
            oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - continuationToken
     - limit
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'continuationToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
            oprot.writeString(self.continuationToken.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMembers
     - continuationToken
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRUCT, 'squareChatMembers', (SquareMember, SquareMember.thrift_spec), None, ),  # 1
        (2, TType.STRING, 'continuationToken', 'UTF8', None, ),  # 2
    )

    def __init__(self, squareChatMembers=None, continuationToken=None,):
        self.squareChatMembers = squareChatMembers
        self.continuationToken = continuationToken

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.continuationToken)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 2
    )

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - continuationToken
     - limit
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'continuationToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squares
     - members
     - authorities
     - statuses
     - continuationToken
     - noteStatuses
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'squares', (TType.STRUCT, (Square, Square.thrift_spec), False), None, ),  # 1
        (2, TType.MAP, 'members', (TType.STRING, 'UTF8', TType.STRUCT, (SquareMember, SquareMember.thrift_spec), False), None, ),  # 2
        (3, TType.MAP, 'authorities', (TType.STRING, 'UTF8', TType.STRUCT, (SquareAuthority, SquareAuthority.thrift_spec), False), None, ),  # 3
        (4, TType.MAP, 'statuses', (TType.STRING, 'UTF8', TType.STRUCT, (SquareStatus, SquareStatus.thrift_spec), False), None, ),  # 4
        (5, TType.STRING, 'continuationToken', 'UTF8', None, ),  # 5
        (6, TType.MAP, 'noteStatuses', (TType.STRING, 'UTF8', TType.STRUCT, (NoteStatus, NoteStatus.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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 range(_size527):
                        _key532 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_size534):
                        _key539 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_size541):
                        _key546 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.MAP:
                    self.noteStatuses = {}
                    (_ktype549, _vtype550, _size548) = iprot.readMapBegin()
                    for _i552 in range(_size548):
                        _key553 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else kiter560)
                viter561.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 5)
            oprot.writeString(self.continuationToken.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else kiter562)
                viter563.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - continuationToken
     - limit
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'continuationToken', 'UTF8', None, ),  # 2
        (3, TType.I32, 'limit', None, None, ),  # 3
    )

    def __init__(self, squareMid=None, continuationToken=None, limit=None,):
        self.squareMid = squareMid
        self.continuationToken = continuationToken
        self.limit = limit

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
            oprot.writeString(self.continuationToken.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChats
     - continuationToken
     - totalSquareChatCount
     - squareChatStatuses
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'squareChats', (TType.STRUCT, (SquareChat, SquareChat.thrift_spec), False), None, ),  # 1
        (2, TType.STRING, 'continuationToken', 'UTF8', None, ),  # 2
        (3, TType.I32, 'totalSquareChatCount', None, None, ),  # 3
        (4, TType.MAP, 'squareChatStatuses', (TType.STRING, 'UTF8', TType.STRUCT, (SquareChatStatus, SquareChatStatus.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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().decode('utf-8') if sys.version_info[0] == 2 else 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 range(_size570):
                        _key575 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else kiter578)
                viter579.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mid
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - invitationURL
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.invitationURL)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'squareMid', 'UTF8', None, ),  # 2
    )

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):

    thrift_spec = (
    )

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('LeaveSquareResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - sayGoodbye
     - squareChatMemberRevision
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):

    thrift_spec = (
    )

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('LeaveSquareChatResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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, False), None, ),  # 2
        (3, TType.STRING, 'displayName', 'UTF8', None, ),  # 3
        (4, TType.I32, 'ableToReceiveMessage', None, None, ),  # 4
        (5, TType.I32, 'ableToReceiveFriendRequest', None, None, ),  # 5
        (6, TType.STRING, 'chatMidToExcludeMembers', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - searchOption
     - continuationToken
     - limit
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'squareMid', 'UTF8', None, ),  # 2
        (3, TType.STRUCT, 'searchOption', (SquareMemberSearchOption, SquareMemberSearchOption.thrift_spec), None, ),  # 3
        (4, TType.STRING, 'continuationToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - members
     - revision
     - continuationToken
     - totalCount
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'members', (TType.STRUCT, (SquareMember, SquareMember.thrift_spec), False), None, ),  # 1
        (2, TType.I64, 'revision', None, None, ),  # 2
        (3, TType.STRING, 'continuationToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - invitationTicket
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.invitationTicket)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - squareMessage
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - squareMessage
     - reqSeq
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - joinedMember
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - invitees
     - invitor
     - invitorRelation
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.LIST, 'invitees', (TType.STRUCT, (SquareMember, SquareMember.thrift_spec), False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.invitees = []
                    (_etype597, _size594) = iprot.readListBegin()
                    for _i598 in range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - squareMemberMid
     - sayGoodbye
     - squareMember
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareMemberMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMemberMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
            oprot.writeString(self.squareMemberMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - messageId
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        None,  # 2
        (3, TType.STRING, 'messageId', 'UTF8', None, ),  # 3
    )

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.messageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.STRING, 3)
            oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - sMemberMid
     - messageId
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'sMemberMid', 'UTF8', None, ),  # 2
        None,  # 3
        (4, TType.STRING, 'messageId', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.sMemberMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.messageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.sMemberMid is not None:
            oprot.writeFieldBegin('sMemberMid', TType.STRING, 2)
            oprot.writeString(self.sMemberMid.encode('utf-8') if sys.version_info[0] == 2 else self.sMemberMid)
            oprot.writeFieldEnd()
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.STRING, 4)
            oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - squareMember
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - kickees
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.LIST, 'kickees', (TType.STRUCT, (SquareMember, SquareMember.thrift_spec), False), None, ),  # 2
    )

    def __init__(self, squareChatMid=None, kickees=None,):
        self.squareChatMid = squareChatMid
        self.kickees = kickees

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.kickees = []
                    (_etype604, _size601) = iprot.readListBegin()
                    for _i605 in range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - square
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - editor
     - updatedChatName
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.STRUCT, 'editor', (SquareMember, SquareMember.thrift_spec), None, ),  # 2
        (3, TType.STRING, 'updatedChatName', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.updatedChatName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - editor
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - statusWithoutMessage
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - squareStatus
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - squareMemberMid
     - squareChatMember
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareMemberMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMemberMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
            oprot.writeString(self.squareMemberMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - myMemberMid
     - targetSquareMemberMid
     - squareMemberRelation
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'myMemberMid', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'targetSquareMemberMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.myMemberMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.targetSquareMemberMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        if self.myMemberMid is not None:
            oprot.writeFieldBegin('myMemberMid', TType.STRING, 2)
            oprot.writeString(self.myMemberMid.encode('utf-8') if sys.version_info[0] == 2 else self.myMemberMid)
            oprot.writeFieldEnd()
        if self.targetSquareMemberMid is not None:
            oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 3)
            oprot.writeString(self.targetSquareMemberMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - square
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - squareMemberMid
     - squareMember
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareMemberMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMemberMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
            oprot.writeString(self.squareMemberMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - squareChatMid
     - squareChat
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(self.squareChatMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - squareName
     - requestMemberName
     - profileImageObsHash
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareName', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'requestMemberName', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'profileImageObsHash', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.requestMemberName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.profileImageObsHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        if self.squareName is not None:
            oprot.writeFieldBegin('squareName', TType.STRING, 2)
            oprot.writeString(self.squareName.encode('utf-8') if sys.version_info[0] == 2 else self.squareName)
            oprot.writeFieldEnd()
        if self.requestMemberName is not None:
            oprot.writeFieldBegin('requestMemberName', TType.STRING, 3)
            oprot.writeString(self.requestMemberName.encode('utf-8') if sys.version_info[0] == 2 else self.requestMemberName)
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 4)
            oprot.writeString(self.profileImageObsHash.encode('utf-8') if sys.version_info[0] == 2 else self.profileImageObsHash)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - squareName
     - profileImageObsHash
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareName', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'profileImageObsHash', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.profileImageObsHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        if self.squareName is not None:
            oprot.writeFieldBegin('squareName', TType.STRING, 2)
            oprot.writeString(self.squareName.encode('utf-8') if sys.version_info[0] == 2 else self.squareName)
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 3)
            oprot.writeString(self.profileImageObsHash.encode('utf-8') if sys.version_info[0] == 2 else self.profileImageObsHash)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - squareName
     - profileImageObsHash
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareName', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'profileImageObsHash', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.profileImageObsHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        if self.squareName is not None:
            oprot.writeFieldBegin('squareName', TType.STRING, 2)
            oprot.writeString(self.squareName.encode('utf-8') if sys.version_info[0] == 2 else self.squareName)
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 3)
            oprot.writeString(self.profileImageObsHash.encode('utf-8') if sys.version_info[0] == 2 else self.profileImageObsHash)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - squareChatName
     - profileImageObsHash
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareChatName', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'profileImageObsHash', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.profileImageObsHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.squareChatName is not None:
            oprot.writeFieldBegin('squareChatName', TType.STRING, 2)
            oprot.writeString(self.squareChatName.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatName)
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 3)
            oprot.writeString(self.profileImageObsHash.encode('utf-8') if sys.version_info[0] == 2 else self.profileImageObsHash)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - squareMessage
     - senderDisplayName
     - unreadCount
     - requiredToFetchChatEvents
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.STRUCT, 'squareMessage', (SquareMessage, SquareMessage.thrift_spec), None, ),  # 2
        (3, TType.STRING, 'senderDisplayName', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareChatMid
     - squareMemberMid
     - squareChatMember
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'squareMemberMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMemberMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
            oprot.writeString(self.squareMemberMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - squareAuthority
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - subscriptionId
     - syncToken
     - limit
     - continuationToken
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'subscriptionId', None, None, ),  # 1
        (2, TType.STRING, 'syncToken', 'UTF8', None, ),  # 2
        (3, TType.I32, 'limit', None, None, ),  # 3
        (4, TType.STRING, 'continuationToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.continuationToken)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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), False), None, ),  # 2
        (3, TType.STRING, 'syncToken', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'continuationToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.syncToken)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
            oprot.writeString(self.continuationToken.encode('utf-8') if sys.version_info[0] == 2 else self.continuationToken)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - subscriptionId
     - squareChatMid
     - syncToken
     - limit
     - direction
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'subscriptionId', None, None, ),  # 1
        (2, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'syncToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.syncToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        if self.syncToken is not None:
            oprot.writeFieldBegin('syncToken', TType.STRING, 3)
            oprot.writeString(self.syncToken.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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), False), None, ),  # 2
        (3, TType.STRING, 'syncToken', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'continuationToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.syncToken)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
            oprot.writeString(self.continuationToken.encode('utf-8') if sys.version_info[0] == 2 else self.continuationToken)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - invitees
     - squareChatMid
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'squareMid', 'UTF8', None, ),  # 2
        (3, TType.LIST, 'invitees', (TType.STRING, 'UTF8', False), None, ),  # 3
        (4, TType.STRING, 'squareChatMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.invitees = []
                    (_etype625, _size622) = iprot.readListBegin()
                    for _i626 in range(_size622):
                        _elem627 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.invitees.append(_elem627)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.squareChatMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else iter628)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 4)
            oprot.writeString(self.squareChatMid.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):

    thrift_spec = (
    )

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('InviteToSquareResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - inviteeMids
     - squareChatMid
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'inviteeMids', (TType.STRING, 'UTF8', False), None, ),  # 1
        (2, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 2
    )

    def __init__(self, inviteeMids=None, squareChatMid=None,):
        self.inviteeMids = inviteeMids
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_size629):
                        _elem634 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.inviteeMids.append(_elem634)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else iter635)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(self.squareChatMid.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - inviteeMids
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'inviteeMids', (TType.STRING, 'UTF8', False), None, ),  # 1
    )

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_size636):
                        _elem641 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else iter642)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMemberMid
    """

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

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMemberMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.oneOnOneChatMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - mids
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.SET, 'mids', (TType.STRING, 'UTF8', False), None, ),  # 2
    )

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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 range(_size643):
                        _elem648 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else iter649)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - state
     - continuationToken
     - limit
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.I32, 'state', None, None, ),  # 2
        (3, TType.STRING, 'continuationToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMembers
     - relations
     - continuationToken
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'squareMembers', (TType.STRUCT, (SquareMember, SquareMember.thrift_spec), False), None, ),  # 1
        (2, TType.MAP, 'relations', (TType.STRING, 'UTF8', TType.STRUCT, (SquareMemberRelation, SquareMemberRelation.thrift_spec), False), None, ),  # 2
        (3, TType.STRING, 'continuationToken', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 range(_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 range(_size656):
                        _key661 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else kiter664)
                viter665.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 3)
            oprot.writeString(self.continuationToken.encode('utf-8') if sys.version_info[0] == 2 else self.continuationToken)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - targetSquareMemberMid
    """

    thrift_spec = (
        None,  # 0
        None,  # 1
        (2, TType.STRING, 'squareMid', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'targetSquareMemberMid', 'UTF8', None, ),  # 3
    )

    def __init__(self, squareMid=None, targetSquareMemberMid=None,):
        self.squareMid = squareMid
        self.targetSquareMemberMid = targetSquareMemberMid

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.targetSquareMemberMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        if self.targetSquareMemberMid is not None:
            oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 3)
            oprot.writeString(self.targetSquareMemberMid.encode('utf-8') if sys.version_info[0] == 2 else self.targetSquareMemberMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - squareMid
     - targetSquareMemberMid
     - relation
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'targetSquareMemberMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.targetSquareMemberMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.squareMid)
            oprot.writeFieldEnd()
        if self.targetSquareMemberMid is not None:
            oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 2)
            oprot.writeString(self.targetSquareMemberMid.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - id
     - name
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'id', None, None, ),  # 1
        (2, TType.STRING, 'name', 'UTF8', None, ),  # 2
    )

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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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', 'UTF8', None, ),  # 2
        (3, TType.MAP, 'parameterMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype667, _vtype668, _size666) = iprot.readMapBegin()
                    for _i670 in range(_size666):
                        _key671 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val672 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameterMap[_key671] = _val672
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 kiter673, viter674 in self.parameterMap.items():
                oprot.writeString(kiter673.encode('utf-8') if sys.version_info[0] == 2 else kiter673)
                oprot.writeString(viter674.encode('utf-8') if sys.version_info[0] == 2 else viter674)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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', 'UTF8', None, ),  # 2
        (3, TType.MAP, 'extra', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.extra = {}
                    (_ktype676, _vtype677, _size675) = iprot.readMapBegin()
                    for _i679 in range(_size675):
                        _key680 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val681 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.extra[_key680] = _val681
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 kiter682, viter683 in self.extra.items():
                oprot.writeString(kiter682.encode('utf-8') if sys.version_info[0] == 2 else kiter682)
                oprot.writeString(viter683.encode('utf-8') if sys.version_info[0] == 2 else viter683)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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', 'UTF8', None, ),  # 2
        (3, TType.MAP, 'parameterMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype685, _vtype686, _size684) = iprot.readMapBegin()
                    for _i688 in range(_size684):
                        _key689 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val690 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameterMap[_key689] = _val690
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 kiter691, viter692 in self.parameterMap.items():
                oprot.writeString(kiter691.encode('utf-8') if sys.version_info[0] == 2 else kiter691)
                oprot.writeString(viter692.encode('utf-8') if sys.version_info[0] == 2 else viter692)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.reason)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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', 'UTF8', None, ),  # 2
        (3, TType.MAP, 'parameterMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype694, _vtype695, _size693) = iprot.readMapBegin()
                    for _i697 in range(_size693):
                        _key698 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val699 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameterMap[_key698] = _val699
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 kiter700, viter701 in self.parameterMap.items():
                oprot.writeString(kiter700.encode('utf-8') if sys.version_info[0] == 2 else kiter700)
                oprot.writeString(viter701.encode('utf-8') if sys.version_info[0] == 2 else viter701)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - requestId
     - state
     - eventNo
     - receiverCount
     - successCount
     - failCount
     - cancelCount
     - unregisterCount
     - timestamp
     - message
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'requestId', 'UTF8', 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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - phoneNumberRegistered
     - registeredSnsIdTypes
    """

    thrift_spec = (
        None,  # 0
        (1, TType.BOOL, 'phoneNumberRegistered', None, None, ),  # 1
        (2, TType.LIST, 'registeredSnsIdTypes', (TType.I32, None, False), None, ),  # 2
    )

    def __init__(self, phoneNumberRegistered=None, registeredSnsIdTypes=None,):
        self.phoneNumberRegistered = phoneNumberRegistered
        self.registeredSnsIdTypes = registeredSnsIdTypes

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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 = []
                    (_etype705, _size702) = iprot.readListBegin()
                    for _i706 in range(_size702):
                        _elem707 = iprot.readI32()
                        self.registeredSnsIdTypes.append(_elem707)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 iter708 in self.registeredSnsIdTypes:
                oprot.writeI32(iter708)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    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', 'UTF8', None, ),  # 10
        (11, TType.STRING, 'inviterMid', 'UTF8', None, ),  # 11
        (12, TType.STRING, 'roomMid', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.inviterMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.roomMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.inviteeEmail)
            oprot.writeFieldEnd()
        if self.inviterMid is not None:
            oprot.writeFieldBegin('inviterMid', TType.STRING, 11)
            oprot.writeString(self.inviterMid.encode('utf-8') if sys.version_info[0] == 2 else self.inviterMid)
            oprot.writeFieldEnd()
        if self.roomMid is not None:
            oprot.writeFieldBegin('roomMid', TType.STRING, 12)
            oprot.writeString(self.roomMid.encode('utf-8') if sys.version_info[0] == 2 else self.roomMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - online
     - chatMid
     - hostMids
     - memberMids
     - started
     - mediaType
    """

    thrift_spec = (
        None,  # 0
        (1, TType.BOOL, 'online', None, None, ),  # 1
        (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'hostMids', 'UTF8', None, ),  # 3
        (4, TType.LIST, 'memberMids', (TType.STRING, 'UTF8', False), 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.hostMids = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.memberMids = []
                    (_etype712, _size709) = iprot.readListBegin()
                    for _i713 in range(_size709):
                        _elem714 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.memberMids.append(_elem714)
                    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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.chatMid)
            oprot.writeFieldEnd()
        if self.hostMids is not None:
            oprot.writeFieldBegin('hostMids', TType.STRING, 3)
            oprot.writeString(self.hostMids.encode('utf-8') if sys.version_info[0] == 2 else self.hostMids)
            oprot.writeFieldEnd()
        if self.memberMids is not None:
            oprot.writeFieldBegin('memberMids', TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.memberMids))
            for iter715 in self.memberMids:
                oprot.writeString(iter715.encode('utf-8') if sys.version_info[0] == 2 else iter715)
            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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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(object):
    """
    Attributes:
     - token
     - cscf
     - mix
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'token', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, 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().decode('utf-8') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

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

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