#
# Autogenerated by Thrift Compiler (0.18.1)
#
# 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
from thrift.TRecursive import fix_spec

import sys

from thrift.transport import TTransport
all_structs = []


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
    WATCHOS = 496
    WATCHOS_RC = 497
    WATCHOS_BETA = 498
    WATCHOS_ALPHA = 499
    OPENCHAT_PLUG = 512
    OPENCHAT_PLUG_RC = 513
    OPENCHAT_PLUG_BETA = 514
    OPENCHAT_PLUG_ALPHA = 515
    ANDROIDSECONDARY = 528
    ANDROIDSECONDARY_RC = 529
    ANDROIDSECONDARY_BETA = 530
    ANDROIDSECONDARY_ALPHA = 531
    WEAROS = 544
    WEAROS_RC = 545
    WEAROS_BETA = 546
    WEAROS_ALPHA = 547

    _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",
        496: "WATCHOS",
        497: "WATCHOS_RC",
        498: "WATCHOS_BETA",
        499: "WATCHOS_ALPHA",
        512: "OPENCHAT_PLUG",
        513: "OPENCHAT_PLUG_RC",
        514: "OPENCHAT_PLUG_BETA",
        515: "OPENCHAT_PLUG_ALPHA",
        528: "ANDROIDSECONDARY",
        529: "ANDROIDSECONDARY_RC",
        530: "ANDROIDSECONDARY_BETA",
        531: "ANDROIDSECONDARY_ALPHA",
        544: "WEAROS",
        545: "WEAROS_RC",
        546: "WEAROS_BETA",
        547: "WEAROS_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,
        "WATCHOS": 496,
        "WATCHOS_RC": 497,
        "WATCHOS_BETA": 498,
        "WATCHOS_ALPHA": 499,
        "OPENCHAT_PLUG": 512,
        "OPENCHAT_PLUG_RC": 513,
        "OPENCHAT_PLUG_BETA": 514,
        "OPENCHAT_PLUG_ALPHA": 515,
        "ANDROIDSECONDARY": 528,
        "ANDROIDSECONDARY_RC": 529,
        "ANDROIDSECONDARY_BETA": 530,
        "ANDROIDSECONDARY_ALPHA": 531,
        "WEAROS": 544,
        "WEAROS_RC": 545,
        "WEAROS_BETA": 546,
        "WEAROS_ALPHA": 547,
    }


class ErrorCode(object):
    ILLEGAL_ARGUMENT = 0
    AUTHENTICATION_FAILED = 1
    DB_FAILED = 2
    INVALID_STATE = 3
    EXCESSIVE_ACCESS = 4
    NOT_FOUND = 5
    INVALID_LENGTH = 6
    NOT_AVAILABLE_USER = 7
    NOT_AUTHORIZED_DEVICE = 8
    INVALID_MID = 9
    NOT_A_MEMBER = 10
    INCOMPATIBLE_APP_VERSION = 11
    NOT_READY = 12
    NOT_AVAILABLE_SESSION = 13
    NOT_AUTHORIZED_SESSION = 14
    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
    NOT_AN_INVITEE = 108
    NOT_AN_OUTSIDER = 109
    EMPTY_GROUP = 111
    EXCEED_FOLLOW_LIMIT = 112
    UNSUPPORTED_ACCOUNT_TYPE = 113
    AGREEMENT_REQUIRED = 114
    SHOULD_RETRY = 115
    OVER_MAX_CHATS_PER_USER = 116
    NOT_AVAILABLE_API = 117
    INVALID_OTP = 118
    MUST_REFRESH_V3_TOKEN = 119
    ALREADY_EXPIRED = 120
    USER_NOT_STICON_OWNER = 121

    _VALUES_TO_NAMES = {
        0: "ILLEGAL_ARGUMENT",
        1: "AUTHENTICATION_FAILED",
        2: "DB_FAILED",
        3: "INVALID_STATE",
        4: "EXCESSIVE_ACCESS",
        5: "NOT_FOUND",
        6: "INVALID_LENGTH",
        7: "NOT_AVAILABLE_USER",
        8: "NOT_AUTHORIZED_DEVICE",
        9: "INVALID_MID",
        10: "NOT_A_MEMBER",
        11: "INCOMPATIBLE_APP_VERSION",
        12: "NOT_READY",
        13: "NOT_AVAILABLE_SESSION",
        14: "NOT_AUTHORIZED_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",
        108: "NOT_AN_INVITEE",
        109: "NOT_AN_OUTSIDER",
        111: "EMPTY_GROUP",
        112: "EXCEED_FOLLOW_LIMIT",
        113: "UNSUPPORTED_ACCOUNT_TYPE",
        114: "AGREEMENT_REQUIRED",
        115: "SHOULD_RETRY",
        116: "OVER_MAX_CHATS_PER_USER",
        117: "NOT_AVAILABLE_API",
        118: "INVALID_OTP",
        119: "MUST_REFRESH_V3_TOKEN",
        120: "ALREADY_EXPIRED",
        121: "USER_NOT_STICON_OWNER",
    }

    _NAMES_TO_VALUES = {
        "ILLEGAL_ARGUMENT": 0,
        "AUTHENTICATION_FAILED": 1,
        "DB_FAILED": 2,
        "INVALID_STATE": 3,
        "EXCESSIVE_ACCESS": 4,
        "NOT_FOUND": 5,
        "INVALID_LENGTH": 6,
        "NOT_AVAILABLE_USER": 7,
        "NOT_AUTHORIZED_DEVICE": 8,
        "INVALID_MID": 9,
        "NOT_A_MEMBER": 10,
        "INCOMPATIBLE_APP_VERSION": 11,
        "NOT_READY": 12,
        "NOT_AVAILABLE_SESSION": 13,
        "NOT_AUTHORIZED_SESSION": 14,
        "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,
        "NOT_AN_INVITEE": 108,
        "NOT_AN_OUTSIDER": 109,
        "EMPTY_GROUP": 111,
        "EXCEED_FOLLOW_LIMIT": 112,
        "UNSUPPORTED_ACCOUNT_TYPE": 113,
        "AGREEMENT_REQUIRED": 114,
        "SHOULD_RETRY": 115,
        "OVER_MAX_CHATS_PER_USER": 116,
        "NOT_AVAILABLE_API": 117,
        "INVALID_OTP": 118,
        "MUST_REFRESH_V3_TOKEN": 119,
        "ALREADY_EXPIRED": 120,
        "USER_NOT_STICON_OWNER": 121,
    }


class LiffErrorCode(object):
    INVALID_REQUEST = 1
    UNAUTHORIZED = 2
    CONSENT_REQUIRED = 3
    VERSION_UPDATE_REQUIRED = 4
    COMPREHENSIVE_AGREEMENT_REQUIRED = 5
    SPLASH_SCREEN_REQUIRED = 6
    SERVER_ERROR = 100

    _VALUES_TO_NAMES = {
        1: "INVALID_REQUEST",
        2: "UNAUTHORIZED",
        3: "CONSENT_REQUIRED",
        4: "VERSION_UPDATE_REQUIRED",
        5: "COMPREHENSIVE_AGREEMENT_REQUIRED",
        6: "SPLASH_SCREEN_REQUIRED",
        100: "SERVER_ERROR",
    }

    _NAMES_TO_VALUES = {
        "INVALID_REQUEST": 1,
        "UNAUTHORIZED": 2,
        "CONSENT_REQUIRED": 3,
        "VERSION_UPDATE_REQUIRED": 4,
        "COMPREHENSIVE_AGREEMENT_REQUIRED": 5,
        "SPLASH_SCREEN_REQUIRED": 6,
        "SERVER_ERROR": 100,
    }


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 PreconditionFailedExtraInfo(object):
    DUPLICATED_DISPLAY_NAME = 0

    _VALUES_TO_NAMES = {
        0: "DUPLICATED_DISPLAY_NAME",
    }

    _NAMES_TO_VALUES = {
        "DUPLICATED_DISPLAY_NAME": 0,
    }


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

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

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


class HomeExceptionCode(object):
    INTERNAL_ERROR = 0
    ILLEGAL_ARGUMENT = 1
    VERIFICATION_FAILED = 2
    NOT_FOUND = 3
    RETRY_LATER = 4
    HUMAN_VERIFICATION_REQUIRED = 5
    INVALID_CONTEXT = 100
    APP_UPGRADE_REQUIRED = 101
    NO_CONTENT = 102

    _VALUES_TO_NAMES = {
        0: "INTERNAL_ERROR",
        1: "ILLEGAL_ARGUMENT",
        2: "VERIFICATION_FAILED",
        3: "NOT_FOUND",
        4: "RETRY_LATER",
        5: "HUMAN_VERIFICATION_REQUIRED",
        100: "INVALID_CONTEXT",
        101: "APP_UPGRADE_REQUIRED",
        102: "NO_CONTENT",
    }

    _NAMES_TO_VALUES = {
        "INTERNAL_ERROR": 0,
        "ILLEGAL_ARGUMENT": 1,
        "VERIFICATION_FAILED": 2,
        "NOT_FOUND": 3,
        "RETRY_LATER": 4,
        "HUMAN_VERIFICATION_REQUIRED": 5,
        "INVALID_CONTEXT": 100,
        "APP_UPGRADE_REQUIRED": 101,
        "NO_CONTENT": 102,
    }


class ChatappErrorCode(object):
    INVALID_REQUEST = 1
    UNAUTHORIZED = 2
    SERVER_ERROR = 100

    _VALUES_TO_NAMES = {
        1: "INVALID_REQUEST",
        2: "UNAUTHORIZED",
        100: "SERVER_ERROR",
    }

    _NAMES_TO_VALUES = {
        "INVALID_REQUEST": 1,
        "UNAUTHORIZED": 2,
        "SERVER_ERROR": 100,
    }


class MembershipErrorCode(object):
    ILLEGAL_ARGUMENT = 0
    AUTHENTICATION_FAILED = 1
    NOT_FOUND = 5
    INTERNAL_ERROR = 20
    MAINTENANCE_ERROR = 33

    _VALUES_TO_NAMES = {
        0: "ILLEGAL_ARGUMENT",
        1: "AUTHENTICATION_FAILED",
        5: "NOT_FOUND",
        20: "INTERNAL_ERROR",
        33: "MAINTENANCE_ERROR",
    }

    _NAMES_TO_VALUES = {
        "ILLEGAL_ARGUMENT": 0,
        "AUTHENTICATION_FAILED": 1,
        "NOT_FOUND": 5,
        "INTERNAL_ERROR": 20,
        "MAINTENANCE_ERROR": 33,
    }


class BotErrorCode(object):
    UNKNOWN = 0
    BOT_NOT_FOUND = 1
    BOT_NOT_AVAILABLE = 2
    NOT_A_MEMBER = 3
    AUTHENTICATION_FAILED = 401
    ILLEGAL_ARGUMENT = 400
    INTERNAL_ERROR = 500

    _VALUES_TO_NAMES = {
        0: "UNKNOWN",
        1: "BOT_NOT_FOUND",
        2: "BOT_NOT_AVAILABLE",
        3: "NOT_A_MEMBER",
        401: "AUTHENTICATION_FAILED",
        400: "ILLEGAL_ARGUMENT",
        500: "INTERNAL_ERROR",
    }

    _NAMES_TO_VALUES = {
        "UNKNOWN": 0,
        "BOT_NOT_FOUND": 1,
        "BOT_NOT_AVAILABLE": 2,
        "NOT_A_MEMBER": 3,
        "AUTHENTICATION_FAILED": 401,
        "ILLEGAL_ARGUMENT": 400,
        "INTERNAL_ERROR": 500,
    }


class BotExternalErrorCode(object):
    ILLEGAL_ARGUMENT = 0
    INTERNAL_ERROR = 1

    _VALUES_TO_NAMES = {
        0: "ILLEGAL_ARGUMENT",
        1: "INTERNAL_ERROR",
    }

    _NAMES_TO_VALUES = {
        "ILLEGAL_ARGUMENT": 0,
        "INTERNAL_ERROR": 1,
    }


class AccessTokenRefreshErrorCode(object):
    INVALID_REQUEST = 1000
    RETRY_REQUIRED = 1001

    _VALUES_TO_NAMES = {
        1000: "INVALID_REQUEST",
        1001: "RETRY_REQUIRED",
    }

    _NAMES_TO_VALUES = {
        "INVALID_REQUEST": 1000,
        "RETRY_REQUIRED": 1001,
    }


class AccountEapConnectErrorCode(object):
    INTERNAL_ERROR = 0
    ILLEGAL_ARGUMENT = 1
    VERIFICATION_FAILED = 2
    RETRY_LATER = 4
    HUMAN_VERIFICATION_REQUIRED = 5
    APP_UPGRADE_REQUIRED = 101

    _VALUES_TO_NAMES = {
        0: "INTERNAL_ERROR",
        1: "ILLEGAL_ARGUMENT",
        2: "VERIFICATION_FAILED",
        4: "RETRY_LATER",
        5: "HUMAN_VERIFICATION_REQUIRED",
        101: "APP_UPGRADE_REQUIRED",
    }

    _NAMES_TO_VALUES = {
        "INTERNAL_ERROR": 0,
        "ILLEGAL_ARGUMENT": 1,
        "VERIFICATION_FAILED": 2,
        "RETRY_LATER": 4,
        "HUMAN_VERIFICATION_REQUIRED": 5,
        "APP_UPGRADE_REQUIRED": 101,
    }


class PwlessCredentialErrorCode(object):
    INTERNAL_ERROR = 0
    ILLEGAL_ARGUMENT = 1
    VERIFICATION_FAILED = 2
    EXTERNAL_SERVICE_UNAVAILABLE = 3
    RETRY_LATER = 4
    INVALID_CONTEXT = 100
    NOT_SUPPORTED = 101
    FORBIDDEN = 102
    FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR = 201

    _VALUES_TO_NAMES = {
        0: "INTERNAL_ERROR",
        1: "ILLEGAL_ARGUMENT",
        2: "VERIFICATION_FAILED",
        3: "EXTERNAL_SERVICE_UNAVAILABLE",
        4: "RETRY_LATER",
        100: "INVALID_CONTEXT",
        101: "NOT_SUPPORTED",
        102: "FORBIDDEN",
        201: "FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR",
    }

    _NAMES_TO_VALUES = {
        "INTERNAL_ERROR": 0,
        "ILLEGAL_ARGUMENT": 1,
        "VERIFICATION_FAILED": 2,
        "EXTERNAL_SERVICE_UNAVAILABLE": 3,
        "RETRY_LATER": 4,
        "INVALID_CONTEXT": 100,
        "NOT_SUPPORTED": 101,
        "FORBIDDEN": 102,
        "FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR": 201,
    }


class SecondAuthFactorPinCodeErrorCode(object):
    INTERNAL_ERROR = 0
    ILLEGAL_ARGUMENT = 1
    VERIFICATION_FAILED = 2
    RETRY_LATER = 3
    INVALID_CONTEXT = 100
    APP_UPGRADE_REQUIRED = 101

    _VALUES_TO_NAMES = {
        0: "INTERNAL_ERROR",
        1: "ILLEGAL_ARGUMENT",
        2: "VERIFICATION_FAILED",
        3: "RETRY_LATER",
        100: "INVALID_CONTEXT",
        101: "APP_UPGRADE_REQUIRED",
    }

    _NAMES_TO_VALUES = {
        "INTERNAL_ERROR": 0,
        "ILLEGAL_ARGUMENT": 1,
        "VERIFICATION_FAILED": 2,
        "RETRY_LATER": 3,
        "INVALID_CONTEXT": 100,
        "APP_UPGRADE_REQUIRED": 101,
    }


class AuthErrorCode(object):
    INTERNAL_ERROR = 0
    ILLEGAL_ARGUMENT = 1
    VERIFICATION_FAILED = 2
    NOT_FOUND = 3
    RETRY_LATER = 4
    HUMAN_VERIFICATION_REQUIRED = 5
    INVALID_CONTEXT = 100
    APP_UPGRADE_REQUIRED = 101

    _VALUES_TO_NAMES = {
        0: "INTERNAL_ERROR",
        1: "ILLEGAL_ARGUMENT",
        2: "VERIFICATION_FAILED",
        3: "NOT_FOUND",
        4: "RETRY_LATER",
        5: "HUMAN_VERIFICATION_REQUIRED",
        100: "INVALID_CONTEXT",
        101: "APP_UPGRADE_REQUIRED",
    }

    _NAMES_TO_VALUES = {
        "INTERNAL_ERROR": 0,
        "ILLEGAL_ARGUMENT": 1,
        "VERIFICATION_FAILED": 2,
        "NOT_FOUND": 3,
        "RETRY_LATER": 4,
        "HUMAN_VERIFICATION_REQUIRED": 5,
        "INVALID_CONTEXT": 100,
        "APP_UPGRADE_REQUIRED": 101,
    }


class SecondaryPwlessLoginErrorCode(object):
    INTERNAL_ERROR = 0
    VERIFICATION_FAILED = 1
    LOGIN_NOT_ALLOWED = 2
    EXTERNAL_SERVICE_UNAVAILABLE = 3
    RETRY_LATER = 4
    NOT_SUPPORTED = 100
    ILLEGAL_ARGUMENT = 101
    INVALID_CONTEXT = 102
    FORBIDDEN = 103
    FIDO_UNKNOWN_CREDENTIAL_ID = 200
    FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR = 201
    FIDO_UNACCEPTABLE_CONTENT = 202

    _VALUES_TO_NAMES = {
        0: "INTERNAL_ERROR",
        1: "VERIFICATION_FAILED",
        2: "LOGIN_NOT_ALLOWED",
        3: "EXTERNAL_SERVICE_UNAVAILABLE",
        4: "RETRY_LATER",
        100: "NOT_SUPPORTED",
        101: "ILLEGAL_ARGUMENT",
        102: "INVALID_CONTEXT",
        103: "FORBIDDEN",
        200: "FIDO_UNKNOWN_CREDENTIAL_ID",
        201: "FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR",
        202: "FIDO_UNACCEPTABLE_CONTENT",
    }

    _NAMES_TO_VALUES = {
        "INTERNAL_ERROR": 0,
        "VERIFICATION_FAILED": 1,
        "LOGIN_NOT_ALLOWED": 2,
        "EXTERNAL_SERVICE_UNAVAILABLE": 3,
        "RETRY_LATER": 4,
        "NOT_SUPPORTED": 100,
        "ILLEGAL_ARGUMENT": 101,
        "INVALID_CONTEXT": 102,
        "FORBIDDEN": 103,
        "FIDO_UNKNOWN_CREDENTIAL_ID": 200,
        "FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR": 201,
        "FIDO_UNACCEPTABLE_CONTENT": 202,
    }


class SecondaryQrCodeErrorCode(object):
    INTERNAL_ERROR = 0
    ILLEGAL_ARGUMENT = 1
    VERIFICATION_FAILED = 2
    NOT_ALLOWED_QR_CODE_LOGIN = 3
    VERIFICATION_NOTICE_FAILED = 4
    RETRY_LATER = 5
    INVALID_CONTEXT = 100
    APP_UPGRADE_REQUIRED = 101

    _VALUES_TO_NAMES = {
        0: "INTERNAL_ERROR",
        1: "ILLEGAL_ARGUMENT",
        2: "VERIFICATION_FAILED",
        3: "NOT_ALLOWED_QR_CODE_LOGIN",
        4: "VERIFICATION_NOTICE_FAILED",
        5: "RETRY_LATER",
        100: "INVALID_CONTEXT",
        101: "APP_UPGRADE_REQUIRED",
    }

    _NAMES_TO_VALUES = {
        "INTERNAL_ERROR": 0,
        "ILLEGAL_ARGUMENT": 1,
        "VERIFICATION_FAILED": 2,
        "NOT_ALLOWED_QR_CODE_LOGIN": 3,
        "VERIFICATION_NOTICE_FAILED": 4,
        "RETRY_LATER": 5,
        "INVALID_CONTEXT": 100,
        "APP_UPGRADE_REQUIRED": 101,
    }


class PaymentErrorCode(object):
    SUCCESS = 0
    GENERAL_USER_ERROR = 1000
    ACCOUNT_NOT_EXISTS = 1101
    ACCOUNT_INVALID_STATUS = 1102
    ACCOUNT_ALREADY_EXISTS = 1103
    MERCHANT_NOT_EXISTS = 1104
    MERCHANT_INVALID_STATUS = 1105
    AGREEMENT_REQUIRED = 1107
    BLACKLISTED = 1108
    WRONG_PASSWORD = 1109
    INVALID_CREDIT_CARD = 1110
    LIMIT_EXCEEDED = 1111
    CANNOT_PROCEED = 1115
    TOO_WEAK_PASSWORD = 1120
    CANNOT_CREATE_ACCOUNT = 1125
    TEMPORARY_PASSWORD_ERROR = 1130
    MISSING_PARAMETERS = 1140
    NO_VALID_MYCODE_ACCOUNT = 1141
    INSUFFICIENT_BALANCE = 1142
    TRANSACTION_NOT_FOUND = 1150
    TRANSACTION_FINISHED = 1152
    PAYMENT_AMOUNT_WRONG = 1153
    BALANCE_ACCOUNT_NOT_EXISTS = 1157
    DUPLICATED_CITIZEN_ID = 1158
    PAYMENT_REQUEST_NOT_FOUND = 1159
    AUTH_FAILED = 1169
    PASSWORD_SETTING_REQUIRED = 1171
    TRANSACTION_ALREADY_PROCESSED = 1172
    CURRENCY_NOT_SUPPORTED = 1178
    PAYMENT_NOT_AVAILABLE = 1180
    TRANSFER_REQUEST_NOT_FOUND = 1181
    INVALID_PAYMENT_AMOUNT = 1183
    INSUFFICIENT_PAYMENT_AMOUNT = 1184
    EXTERNAL_SYSTEM_MAINTENANCE = 1185
    EXTERNAL_SYSTEM_INOPERATIONAL = 1186
    SESSION_EXPIRED = 1192
    UPGRADE_REQUIRED = 1195
    REQUEST_TOKEN_EXPIRED = 1196
    OPERATION_FINISHED = 1198
    EXTERNAL_SYSTEM_ERROR = 1199
    PARTIAL_AMOUNT_APPROVED = 1299
    PINCODE_AUTH_REQUIRED = 1600
    ADDITIONAL_AUTH_REQUIRED = 1601
    NOT_BOUND = 1603
    OTP_USER_REGISTRATION_ERROR = 1610
    OTP_CARD_REGISTRATION_ERROR = 1611
    NO_AUTH_METHOD = 1612
    GENERAL_USER_ERROR_RESTART = 1696
    GENERAL_USER_ERROR_REFRESH = 1697
    GENERAL_USER_ERROR_CLOSE = 1698
    INTERNAL_SERVER_ERROR = 9000
    INTERNAL_SYSTEM_MAINTENANCE = 9999
    UNKNOWN_ERROR = 10000

    _VALUES_TO_NAMES = {
        0: "SUCCESS",
        1000: "GENERAL_USER_ERROR",
        1101: "ACCOUNT_NOT_EXISTS",
        1102: "ACCOUNT_INVALID_STATUS",
        1103: "ACCOUNT_ALREADY_EXISTS",
        1104: "MERCHANT_NOT_EXISTS",
        1105: "MERCHANT_INVALID_STATUS",
        1107: "AGREEMENT_REQUIRED",
        1108: "BLACKLISTED",
        1109: "WRONG_PASSWORD",
        1110: "INVALID_CREDIT_CARD",
        1111: "LIMIT_EXCEEDED",
        1115: "CANNOT_PROCEED",
        1120: "TOO_WEAK_PASSWORD",
        1125: "CANNOT_CREATE_ACCOUNT",
        1130: "TEMPORARY_PASSWORD_ERROR",
        1140: "MISSING_PARAMETERS",
        1141: "NO_VALID_MYCODE_ACCOUNT",
        1142: "INSUFFICIENT_BALANCE",
        1150: "TRANSACTION_NOT_FOUND",
        1152: "TRANSACTION_FINISHED",
        1153: "PAYMENT_AMOUNT_WRONG",
        1157: "BALANCE_ACCOUNT_NOT_EXISTS",
        1158: "DUPLICATED_CITIZEN_ID",
        1159: "PAYMENT_REQUEST_NOT_FOUND",
        1169: "AUTH_FAILED",
        1171: "PASSWORD_SETTING_REQUIRED",
        1172: "TRANSACTION_ALREADY_PROCESSED",
        1178: "CURRENCY_NOT_SUPPORTED",
        1180: "PAYMENT_NOT_AVAILABLE",
        1181: "TRANSFER_REQUEST_NOT_FOUND",
        1183: "INVALID_PAYMENT_AMOUNT",
        1184: "INSUFFICIENT_PAYMENT_AMOUNT",
        1185: "EXTERNAL_SYSTEM_MAINTENANCE",
        1186: "EXTERNAL_SYSTEM_INOPERATIONAL",
        1192: "SESSION_EXPIRED",
        1195: "UPGRADE_REQUIRED",
        1196: "REQUEST_TOKEN_EXPIRED",
        1198: "OPERATION_FINISHED",
        1199: "EXTERNAL_SYSTEM_ERROR",
        1299: "PARTIAL_AMOUNT_APPROVED",
        1600: "PINCODE_AUTH_REQUIRED",
        1601: "ADDITIONAL_AUTH_REQUIRED",
        1603: "NOT_BOUND",
        1610: "OTP_USER_REGISTRATION_ERROR",
        1611: "OTP_CARD_REGISTRATION_ERROR",
        1612: "NO_AUTH_METHOD",
        1696: "GENERAL_USER_ERROR_RESTART",
        1697: "GENERAL_USER_ERROR_REFRESH",
        1698: "GENERAL_USER_ERROR_CLOSE",
        9000: "INTERNAL_SERVER_ERROR",
        9999: "INTERNAL_SYSTEM_MAINTENANCE",
        10000: "UNKNOWN_ERROR",
    }

    _NAMES_TO_VALUES = {
        "SUCCESS": 0,
        "GENERAL_USER_ERROR": 1000,
        "ACCOUNT_NOT_EXISTS": 1101,
        "ACCOUNT_INVALID_STATUS": 1102,
        "ACCOUNT_ALREADY_EXISTS": 1103,
        "MERCHANT_NOT_EXISTS": 1104,
        "MERCHANT_INVALID_STATUS": 1105,
        "AGREEMENT_REQUIRED": 1107,
        "BLACKLISTED": 1108,
        "WRONG_PASSWORD": 1109,
        "INVALID_CREDIT_CARD": 1110,
        "LIMIT_EXCEEDED": 1111,
        "CANNOT_PROCEED": 1115,
        "TOO_WEAK_PASSWORD": 1120,
        "CANNOT_CREATE_ACCOUNT": 1125,
        "TEMPORARY_PASSWORD_ERROR": 1130,
        "MISSING_PARAMETERS": 1140,
        "NO_VALID_MYCODE_ACCOUNT": 1141,
        "INSUFFICIENT_BALANCE": 1142,
        "TRANSACTION_NOT_FOUND": 1150,
        "TRANSACTION_FINISHED": 1152,
        "PAYMENT_AMOUNT_WRONG": 1153,
        "BALANCE_ACCOUNT_NOT_EXISTS": 1157,
        "DUPLICATED_CITIZEN_ID": 1158,
        "PAYMENT_REQUEST_NOT_FOUND": 1159,
        "AUTH_FAILED": 1169,
        "PASSWORD_SETTING_REQUIRED": 1171,
        "TRANSACTION_ALREADY_PROCESSED": 1172,
        "CURRENCY_NOT_SUPPORTED": 1178,
        "PAYMENT_NOT_AVAILABLE": 1180,
        "TRANSFER_REQUEST_NOT_FOUND": 1181,
        "INVALID_PAYMENT_AMOUNT": 1183,
        "INSUFFICIENT_PAYMENT_AMOUNT": 1184,
        "EXTERNAL_SYSTEM_MAINTENANCE": 1185,
        "EXTERNAL_SYSTEM_INOPERATIONAL": 1186,
        "SESSION_EXPIRED": 1192,
        "UPGRADE_REQUIRED": 1195,
        "REQUEST_TOKEN_EXPIRED": 1196,
        "OPERATION_FINISHED": 1198,
        "EXTERNAL_SYSTEM_ERROR": 1199,
        "PARTIAL_AMOUNT_APPROVED": 1299,
        "PINCODE_AUTH_REQUIRED": 1600,
        "ADDITIONAL_AUTH_REQUIRED": 1601,
        "NOT_BOUND": 1603,
        "OTP_USER_REGISTRATION_ERROR": 1610,
        "OTP_CARD_REGISTRATION_ERROR": 1611,
        "NO_AUTH_METHOD": 1612,
        "GENERAL_USER_ERROR_RESTART": 1696,
        "GENERAL_USER_ERROR_REFRESH": 1697,
        "GENERAL_USER_ERROR_CLOSE": 1698,
        "INTERNAL_SERVER_ERROR": 9000,
        "INTERNAL_SYSTEM_MAINTENANCE": 9999,
        "UNKNOWN_ERROR": 10000,
    }


class SettingsErrorCode(object):
    UNKNOWN = 0
    NONE = 1
    ILLEGAL_ARGUMENT = 16641
    NOT_FOUND = 16642
    NOT_AVAILABLE = 16643
    TOO_LARGE_VALUE = 16644
    CLOCK_DRIFT_DETECTED = 16645
    UNSUPPORTED_APPLICATION_TYPE = 16646
    DUPLICATED_ENTRY = 16647
    AUTHENTICATION_FAILED = 16897
    INTERNAL_SERVER_ERROR = 20737
    SERVICE_IN_MAINTENANCE_MODE = 20738
    SERVICE_UNAVAILABLE = 20739

    _VALUES_TO_NAMES = {
        0: "UNKNOWN",
        1: "NONE",
        16641: "ILLEGAL_ARGUMENT",
        16642: "NOT_FOUND",
        16643: "NOT_AVAILABLE",
        16644: "TOO_LARGE_VALUE",
        16645: "CLOCK_DRIFT_DETECTED",
        16646: "UNSUPPORTED_APPLICATION_TYPE",
        16647: "DUPLICATED_ENTRY",
        16897: "AUTHENTICATION_FAILED",
        20737: "INTERNAL_SERVER_ERROR",
        20738: "SERVICE_IN_MAINTENANCE_MODE",
        20739: "SERVICE_UNAVAILABLE",
    }

    _NAMES_TO_VALUES = {
        "UNKNOWN": 0,
        "NONE": 1,
        "ILLEGAL_ARGUMENT": 16641,
        "NOT_FOUND": 16642,
        "NOT_AVAILABLE": 16643,
        "TOO_LARGE_VALUE": 16644,
        "CLOCK_DRIFT_DETECTED": 16645,
        "UNSUPPORTED_APPLICATION_TYPE": 16646,
        "DUPLICATED_ENTRY": 16647,
        "AUTHENTICATION_FAILED": 16897,
        "INTERNAL_SERVER_ERROR": 20737,
        "SERVICE_IN_MAINTENANCE_MODE": 20738,
        "SERVICE_UNAVAILABLE": 20739,
    }


class ThingsErrorCode(object):
    INTERNAL_SERVER_ERROR = 0
    UNAUTHORIZED = 1
    INVALID_REQUEST = 2
    INVALID_STATE = 3
    DEVICE_LIMIT_EXCEEDED = 4096
    UNSUPPORTED_REGION = 4097

    _VALUES_TO_NAMES = {
        0: "INTERNAL_SERVER_ERROR",
        1: "UNAUTHORIZED",
        2: "INVALID_REQUEST",
        3: "INVALID_STATE",
        4096: "DEVICE_LIMIT_EXCEEDED",
        4097: "UNSUPPORTED_REGION",
    }

    _NAMES_TO_VALUES = {
        "INTERNAL_SERVER_ERROR": 0,
        "UNAUTHORIZED": 1,
        "INVALID_REQUEST": 2,
        "INVALID_STATE": 3,
        "DEVICE_LIMIT_EXCEEDED": 4096,
        "UNSUPPORTED_REGION": 4097,
    }


class SuggestTrialErrorCode(object):
    UNKNOWN = 0
    NONE = 1
    ILLEGAL_ARGUMENT = 16641
    NOT_FOUND = 16642
    NOT_AVAILABLE = 16643
    AUTHENTICATION_FAILED = 16897
    INTERNAL_SERVER_ERROR = 20737
    SERVICE_UNAVAILABLE = 20739

    _VALUES_TO_NAMES = {
        0: "UNKNOWN",
        1: "NONE",
        16641: "ILLEGAL_ARGUMENT",
        16642: "NOT_FOUND",
        16643: "NOT_AVAILABLE",
        16897: "AUTHENTICATION_FAILED",
        20737: "INTERNAL_SERVER_ERROR",
        20739: "SERVICE_UNAVAILABLE",
    }

    _NAMES_TO_VALUES = {
        "UNKNOWN": 0,
        "NONE": 1,
        "ILLEGAL_ARGUMENT": 16641,
        "NOT_FOUND": 16642,
        "NOT_AVAILABLE": 16643,
        "AUTHENTICATION_FAILED": 16897,
        "INTERNAL_SERVER_ERROR": 20737,
        "SERVICE_UNAVAILABLE": 20739,
    }


class LFLPremiumErrorCode(object):
    ILLEGAL_ARGUMENT = 16641
    MAJOR_VERSION_NOT_SUPPORTED = 16642
    AUTHENTICATION_FAILED = 16897
    INTERNAL_SERVER_ERROR = 20737

    _VALUES_TO_NAMES = {
        16641: "ILLEGAL_ARGUMENT",
        16642: "MAJOR_VERSION_NOT_SUPPORTED",
        16897: "AUTHENTICATION_FAILED",
        20737: "INTERNAL_SERVER_ERROR",
    }

    _NAMES_TO_VALUES = {
        "ILLEGAL_ARGUMENT": 16641,
        "MAJOR_VERSION_NOT_SUPPORTED": 16642,
        "AUTHENTICATION_FAILED": 16897,
        "INTERNAL_SERVER_ERROR": 20737,
    }


class WalletErrorCode(object):
    INVALID_PARAMETER = 400
    AUTHENTICATION_FAILED = 401
    INTERNAL_SERVER_ERROR = 500
    SERVICE_IN_MAINTENANCE_MODE = 503

    _VALUES_TO_NAMES = {
        400: "INVALID_PARAMETER",
        401: "AUTHENTICATION_FAILED",
        500: "INTERNAL_SERVER_ERROR",
        503: "SERVICE_IN_MAINTENANCE_MODE",
    }

    _NAMES_TO_VALUES = {
        "INVALID_PARAMETER": 400,
        "AUTHENTICATION_FAILED": 401,
        "INTERNAL_SERVER_ERROR": 500,
        "SERVICE_IN_MAINTENANCE_MODE": 503,
    }


class ShopErrorCode(object):
    UNKNOWN = 0
    NONE = 1
    ILLEGAL_ARGUMENT = 16641
    NOT_FOUND = 16642
    NOT_AVAILABLE = 16643
    NOT_PAID_PRODUCT = 16644
    NOT_FREE_PRODUCT = 16645
    ALREADY_OWNED = 16646
    ERROR_WITH_CUSTOM_MESSAGE = 16647
    NOT_AVAILABLE_TO_RECIPIENT = 16648
    NOT_AVAILABLE_FOR_CHANNEL_ID = 16649
    NOT_SALE_FOR_COUNTRY = 16650
    NOT_SALES_PERIOD = 16651
    NOT_SALE_FOR_DEVICE = 16652
    NOT_SALE_FOR_VERSION = 16653
    ALREADY_EXPIRED = 16654
    AUTHENTICATION_FAILED = 16897
    BALANCE_SHORTAGE = 17153
    INTERNAL_SERVER_ERROR = 20737
    SERVICE_IN_MAINTENANCE_MODE = 20738
    SERVICE_UNAVAILABLE = 20739

    _VALUES_TO_NAMES = {
        0: "UNKNOWN",
        1: "NONE",
        16641: "ILLEGAL_ARGUMENT",
        16642: "NOT_FOUND",
        16643: "NOT_AVAILABLE",
        16644: "NOT_PAID_PRODUCT",
        16645: "NOT_FREE_PRODUCT",
        16646: "ALREADY_OWNED",
        16647: "ERROR_WITH_CUSTOM_MESSAGE",
        16648: "NOT_AVAILABLE_TO_RECIPIENT",
        16649: "NOT_AVAILABLE_FOR_CHANNEL_ID",
        16650: "NOT_SALE_FOR_COUNTRY",
        16651: "NOT_SALES_PERIOD",
        16652: "NOT_SALE_FOR_DEVICE",
        16653: "NOT_SALE_FOR_VERSION",
        16654: "ALREADY_EXPIRED",
        16897: "AUTHENTICATION_FAILED",
        17153: "BALANCE_SHORTAGE",
        20737: "INTERNAL_SERVER_ERROR",
        20738: "SERVICE_IN_MAINTENANCE_MODE",
        20739: "SERVICE_UNAVAILABLE",
    }

    _NAMES_TO_VALUES = {
        "UNKNOWN": 0,
        "NONE": 1,
        "ILLEGAL_ARGUMENT": 16641,
        "NOT_FOUND": 16642,
        "NOT_AVAILABLE": 16643,
        "NOT_PAID_PRODUCT": 16644,
        "NOT_FREE_PRODUCT": 16645,
        "ALREADY_OWNED": 16646,
        "ERROR_WITH_CUSTOM_MESSAGE": 16647,
        "NOT_AVAILABLE_TO_RECIPIENT": 16648,
        "NOT_AVAILABLE_FOR_CHANNEL_ID": 16649,
        "NOT_SALE_FOR_COUNTRY": 16650,
        "NOT_SALES_PERIOD": 16651,
        "NOT_SALE_FOR_DEVICE": 16652,
        "NOT_SALE_FOR_VERSION": 16653,
        "ALREADY_EXPIRED": 16654,
        "AUTHENTICATION_FAILED": 16897,
        "BALANCE_SHORTAGE": 17153,
        "INTERNAL_SERVER_ERROR": 20737,
        "SERVICE_IN_MAINTENANCE_MODE": 20738,
        "SERVICE_UNAVAILABLE": 20739,
    }


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_MAINTENANCE = 5888
    SYSTEM_ERROR = 5999

    _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",
        5888: "SYSTEM_MAINTENANCE",
        5999: "SYSTEM_ERROR",
    }

    _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_MAINTENANCE": 5888,
        "SYSTEM_ERROR": 5999,
    }


class E2EEKeyBackupErrorCode(object):
    ILLEGAL_ARGUMENT = 0
    AUTHENTICATION_FAILED = 1
    INTERNAL_ERROR = 2
    RESTORE_KEY_FIRST = 3
    NO_BACKUP = 4
    LOCKOUT = 5
    INVALID_PIN = 6

    _VALUES_TO_NAMES = {
        0: "ILLEGAL_ARGUMENT",
        1: "AUTHENTICATION_FAILED",
        2: "INTERNAL_ERROR",
        3: "RESTORE_KEY_FIRST",
        4: "NO_BACKUP",
        5: "LOCKOUT",
        6: "INVALID_PIN",
    }

    _NAMES_TO_VALUES = {
        "ILLEGAL_ARGUMENT": 0,
        "AUTHENTICATION_FAILED": 1,
        "INTERNAL_ERROR": 2,
        "RESTORE_KEY_FIRST": 3,
        "NO_BACKUP": 4,
        "LOCKOUT": 5,
        "INVALID_PIN": 6,
    }


class TalkSyncReason(object):
    UNSPECIFIED = 0
    UNKNOWN = 1
    INITIALIZATION = 2
    OPERATION = 3
    FULL_SYNC = 4
    AUTO_REPAIR = 5
    MANUAL_REPAIR = 6
    INTERNAL = 7
    USER_INITIATED = 8

    _VALUES_TO_NAMES = {
        0: "UNSPECIFIED",
        1: "UNKNOWN",
        2: "INITIALIZATION",
        3: "OPERATION",
        4: "FULL_SYNC",
        5: "AUTO_REPAIR",
        6: "MANUAL_REPAIR",
        7: "INTERNAL",
        8: "USER_INITIATED",
    }

    _NAMES_TO_VALUES = {
        "UNSPECIFIED": 0,
        "UNKNOWN": 1,
        "INITIALIZATION": 2,
        "OPERATION": 3,
        "FULL_SYNC": 4,
        "AUTO_REPAIR": 5,
        "MANUAL_REPAIR": 6,
        "INTERNAL": 7,
        "USER_INITIATED": 8,
    }


class OpType(object):
    END_OF_OPERATION = 0
    UPDATE_PROFILE = 1
    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
    LEAVE_GROUP = 14
    NOTIFIED_LEAVE_GROUP = 15
    ACCEPT_GROUP_INVITATION = 16
    NOTIFIED_ACCEPT_GROUP_INVITATION = 17
    KICKOUT_FROM_GROUP = 18
    NOTIFIED_KICKOUT_FROM_GROUP = 19
    CREATE_ROOM = 20
    INVITE_INTO_ROOM = 21
    NOTIFIED_INVITE_INTO_ROOM = 22
    LEAVE_ROOM = 23
    NOTIFIED_LEAVE_ROOM = 24
    SEND_MESSAGE = 25
    RECEIVE_MESSAGE = 26
    SEND_MESSAGE_RECEIPT = 27
    RECEIVE_MESSAGE_RECEIPT = 28
    SEND_CONTENT_RECEIPT = 29
    RECEIVE_ANNOUNCEMENT = 30
    CANCEL_INVITATION_GROUP = 31
    NOTIFIED_CANCEL_INVITATION_GROUP = 32
    NOTIFIED_UNREGISTER_USER = 33
    REJECT_GROUP_INVITATION = 34
    NOTIFIED_REJECT_GROUP_INVITATION = 35
    UPDATE_SETTINGS = 36
    NOTIFIED_REGISTER_USER = 37
    INVITE_VIA_EMAIL = 38
    NOTIFIED_REQUEST_RECOVERY = 39
    SEND_CHAT_CHECKED = 40
    SEND_CHAT_REMOVED = 41
    NOTIFIED_FORCE_SYNC = 42
    SEND_CONTENT = 43
    SEND_MESSAGE_MYHOME = 44
    NOTIFIED_UPDATE_CONTENT_PREVIEW = 45
    REMOVE_ALL_MESSAGES = 46
    NOTIFIED_UPDATE_PURCHASES = 47
    DUMMY = 48
    UPDATE_CONTACT = 49
    NOTIFIED_RECEIVED_CALL = 50
    CANCEL_CALL = 51
    NOTIFIED_REDIRECT = 52
    NOTIFIED_CHANNEL_SYNC = 53
    FAILED_SEND_MESSAGE = 54
    NOTIFIED_READ_MESSAGE = 55
    FAILED_EMAIL_CONFIRMATION = 56
    NOTIFIED_CHAT_CONTENT = 58
    NOTIFIED_PUSH_NOTICENTER_ITEM = 59
    NOTIFIED_JOIN_CHAT = 60
    NOTIFIED_LEAVE_CHAT = 61
    NOTIFIED_TYPING = 62
    FRIEND_REQUEST_ACCEPTED = 63
    DESTROY_MESSAGE = 64
    NOTIFIED_DESTROY_MESSAGE = 65
    UPDATE_PUBLICKEYCHAIN = 66
    NOTIFIED_UPDATE_PUBLICKEYCHAIN = 67
    NOTIFIED_BLOCK_CONTACT = 68
    NOTIFIED_UNBLOCK_CONTACT = 69
    UPDATE_GROUPPREFERENCE = 70
    NOTIFIED_PAYMENT_EVENT = 71
    REGISTER_E2EE_PUBLICKEY = 72
    NOTIFIED_E2EE_KEY_EXCHANGE_REQ = 73
    NOTIFIED_E2EE_KEY_EXCHANGE_RESP = 74
    NOTIFIED_E2EE_MESSAGE_RESEND_REQ = 75
    NOTIFIED_E2EE_MESSAGE_RESEND_RESP = 76
    NOTIFIED_E2EE_KEY_UPDATE = 77
    NOTIFIED_BUDDY_UPDATE_PROFILE = 78
    NOTIFIED_UPDATE_LINEAT_TABS = 79
    UPDATE_ROOM = 80
    NOTIFIED_BEACON_DETECTED = 81
    UPDATE_EXTENDED_PROFILE = 82
    ADD_FOLLOW = 83
    NOTIFIED_ADD_FOLLOW = 84
    DELETE_FOLLOW = 85
    NOTIFIED_DELETE_FOLLOW = 86
    UPDATE_TIMELINE_SETTINGS = 87
    NOTIFIED_FRIEND_REQUEST = 88
    UPDATE_RINGBACK_TONE = 89
    NOTIFIED_POSTBACK = 90
    RECEIVE_READ_WATERMARK = 91
    NOTIFIED_MESSAGE_DELIVERED = 92
    NOTIFIED_UPDATE_CHAT_BAR = 93
    NOTIFIED_CHATAPP_INSTALLED = 94
    NOTIFIED_CHATAPP_UPDATED = 95
    NOTIFIED_CHATAPP_NEW_MARK = 96
    NOTIFIED_CHATAPP_DELETED = 97
    NOTIFIED_CHATAPP_SYNC = 98
    NOTIFIED_UPDATE_MESSAGE = 99
    UPDATE_CHATROOMBGM = 100
    NOTIFIED_UPDATE_CHATROOMBGM = 101
    UPDATE_RINGTONE = 102
    UPDATE_USER_SETTINGS = 118
    NOTIFIED_UPDATE_STATUS_BAR = 119
    CREATE_CHAT = 120
    UPDATE_CHAT = 121
    NOTIFIED_UPDATE_CHAT = 122
    INVITE_INTO_CHAT = 123
    NOTIFIED_INVITE_INTO_CHAT = 124
    CANCEL_CHAT_INVITATION = 125
    NOTIFIED_CANCEL_CHAT_INVITATION = 126
    DELETE_SELF_FROM_CHAT = 127
    NOTIFIED_DELETE_SELF_FROM_CHAT = 128
    ACCEPT_CHAT_INVITATION = 129
    NOTIFIED_ACCEPT_CHAT_INVITATION = 130
    REJECT_CHAT_INVITATION = 131
    DELETE_OTHER_FROM_CHAT = 132
    NOTIFIED_DELETE_OTHER_FROM_CHAT = 133
    NOTIFIED_CONTACT_CALENDAR_EVENT = 134
    NOTIFIED_CONTACT_CALENDAR_EVENT_ALL = 135
    UPDATE_THINGS_OPERATIONS = 136
    SEND_CHAT_HIDDEN = 137
    CHAT_META_SYNC_ALL = 138
    SEND_REACTION = 139
    NOTIFIED_SEND_REACTION = 140
    NOTIFIED_UPDATE_PROFILE_CONTENT = 141
    FAILED_DELIVERY_MESSAGE = 142

    _VALUES_TO_NAMES = {
        0: "END_OF_OPERATION",
        1: "UPDATE_PROFILE",
        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",
        14: "LEAVE_GROUP",
        15: "NOTIFIED_LEAVE_GROUP",
        16: "ACCEPT_GROUP_INVITATION",
        17: "NOTIFIED_ACCEPT_GROUP_INVITATION",
        18: "KICKOUT_FROM_GROUP",
        19: "NOTIFIED_KICKOUT_FROM_GROUP",
        20: "CREATE_ROOM",
        21: "INVITE_INTO_ROOM",
        22: "NOTIFIED_INVITE_INTO_ROOM",
        23: "LEAVE_ROOM",
        24: "NOTIFIED_LEAVE_ROOM",
        25: "SEND_MESSAGE",
        26: "RECEIVE_MESSAGE",
        27: "SEND_MESSAGE_RECEIPT",
        28: "RECEIVE_MESSAGE_RECEIPT",
        29: "SEND_CONTENT_RECEIPT",
        30: "RECEIVE_ANNOUNCEMENT",
        31: "CANCEL_INVITATION_GROUP",
        32: "NOTIFIED_CANCEL_INVITATION_GROUP",
        33: "NOTIFIED_UNREGISTER_USER",
        34: "REJECT_GROUP_INVITATION",
        35: "NOTIFIED_REJECT_GROUP_INVITATION",
        36: "UPDATE_SETTINGS",
        37: "NOTIFIED_REGISTER_USER",
        38: "INVITE_VIA_EMAIL",
        39: "NOTIFIED_REQUEST_RECOVERY",
        40: "SEND_CHAT_CHECKED",
        41: "SEND_CHAT_REMOVED",
        42: "NOTIFIED_FORCE_SYNC",
        43: "SEND_CONTENT",
        44: "SEND_MESSAGE_MYHOME",
        45: "NOTIFIED_UPDATE_CONTENT_PREVIEW",
        46: "REMOVE_ALL_MESSAGES",
        47: "NOTIFIED_UPDATE_PURCHASES",
        48: "DUMMY",
        49: "UPDATE_CONTACT",
        50: "NOTIFIED_RECEIVED_CALL",
        51: "CANCEL_CALL",
        52: "NOTIFIED_REDIRECT",
        53: "NOTIFIED_CHANNEL_SYNC",
        54: "FAILED_SEND_MESSAGE",
        55: "NOTIFIED_READ_MESSAGE",
        56: "FAILED_EMAIL_CONFIRMATION",
        58: "NOTIFIED_CHAT_CONTENT",
        59: "NOTIFIED_PUSH_NOTICENTER_ITEM",
        60: "NOTIFIED_JOIN_CHAT",
        61: "NOTIFIED_LEAVE_CHAT",
        62: "NOTIFIED_TYPING",
        63: "FRIEND_REQUEST_ACCEPTED",
        64: "DESTROY_MESSAGE",
        65: "NOTIFIED_DESTROY_MESSAGE",
        66: "UPDATE_PUBLICKEYCHAIN",
        67: "NOTIFIED_UPDATE_PUBLICKEYCHAIN",
        68: "NOTIFIED_BLOCK_CONTACT",
        69: "NOTIFIED_UNBLOCK_CONTACT",
        70: "UPDATE_GROUPPREFERENCE",
        71: "NOTIFIED_PAYMENT_EVENT",
        72: "REGISTER_E2EE_PUBLICKEY",
        73: "NOTIFIED_E2EE_KEY_EXCHANGE_REQ",
        74: "NOTIFIED_E2EE_KEY_EXCHANGE_RESP",
        75: "NOTIFIED_E2EE_MESSAGE_RESEND_REQ",
        76: "NOTIFIED_E2EE_MESSAGE_RESEND_RESP",
        77: "NOTIFIED_E2EE_KEY_UPDATE",
        78: "NOTIFIED_BUDDY_UPDATE_PROFILE",
        79: "NOTIFIED_UPDATE_LINEAT_TABS",
        80: "UPDATE_ROOM",
        81: "NOTIFIED_BEACON_DETECTED",
        82: "UPDATE_EXTENDED_PROFILE",
        83: "ADD_FOLLOW",
        84: "NOTIFIED_ADD_FOLLOW",
        85: "DELETE_FOLLOW",
        86: "NOTIFIED_DELETE_FOLLOW",
        87: "UPDATE_TIMELINE_SETTINGS",
        88: "NOTIFIED_FRIEND_REQUEST",
        89: "UPDATE_RINGBACK_TONE",
        90: "NOTIFIED_POSTBACK",
        91: "RECEIVE_READ_WATERMARK",
        92: "NOTIFIED_MESSAGE_DELIVERED",
        93: "NOTIFIED_UPDATE_CHAT_BAR",
        94: "NOTIFIED_CHATAPP_INSTALLED",
        95: "NOTIFIED_CHATAPP_UPDATED",
        96: "NOTIFIED_CHATAPP_NEW_MARK",
        97: "NOTIFIED_CHATAPP_DELETED",
        98: "NOTIFIED_CHATAPP_SYNC",
        99: "NOTIFIED_UPDATE_MESSAGE",
        100: "UPDATE_CHATROOMBGM",
        101: "NOTIFIED_UPDATE_CHATROOMBGM",
        102: "UPDATE_RINGTONE",
        118: "UPDATE_USER_SETTINGS",
        119: "NOTIFIED_UPDATE_STATUS_BAR",
        120: "CREATE_CHAT",
        121: "UPDATE_CHAT",
        122: "NOTIFIED_UPDATE_CHAT",
        123: "INVITE_INTO_CHAT",
        124: "NOTIFIED_INVITE_INTO_CHAT",
        125: "CANCEL_CHAT_INVITATION",
        126: "NOTIFIED_CANCEL_CHAT_INVITATION",
        127: "DELETE_SELF_FROM_CHAT",
        128: "NOTIFIED_DELETE_SELF_FROM_CHAT",
        129: "ACCEPT_CHAT_INVITATION",
        130: "NOTIFIED_ACCEPT_CHAT_INVITATION",
        131: "REJECT_CHAT_INVITATION",
        132: "DELETE_OTHER_FROM_CHAT",
        133: "NOTIFIED_DELETE_OTHER_FROM_CHAT",
        134: "NOTIFIED_CONTACT_CALENDAR_EVENT",
        135: "NOTIFIED_CONTACT_CALENDAR_EVENT_ALL",
        136: "UPDATE_THINGS_OPERATIONS",
        137: "SEND_CHAT_HIDDEN",
        138: "CHAT_META_SYNC_ALL",
        139: "SEND_REACTION",
        140: "NOTIFIED_SEND_REACTION",
        141: "NOTIFIED_UPDATE_PROFILE_CONTENT",
        142: "FAILED_DELIVERY_MESSAGE",
    }

    _NAMES_TO_VALUES = {
        "END_OF_OPERATION": 0,
        "UPDATE_PROFILE": 1,
        "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,
        "LEAVE_GROUP": 14,
        "NOTIFIED_LEAVE_GROUP": 15,
        "ACCEPT_GROUP_INVITATION": 16,
        "NOTIFIED_ACCEPT_GROUP_INVITATION": 17,
        "KICKOUT_FROM_GROUP": 18,
        "NOTIFIED_KICKOUT_FROM_GROUP": 19,
        "CREATE_ROOM": 20,
        "INVITE_INTO_ROOM": 21,
        "NOTIFIED_INVITE_INTO_ROOM": 22,
        "LEAVE_ROOM": 23,
        "NOTIFIED_LEAVE_ROOM": 24,
        "SEND_MESSAGE": 25,
        "RECEIVE_MESSAGE": 26,
        "SEND_MESSAGE_RECEIPT": 27,
        "RECEIVE_MESSAGE_RECEIPT": 28,
        "SEND_CONTENT_RECEIPT": 29,
        "RECEIVE_ANNOUNCEMENT": 30,
        "CANCEL_INVITATION_GROUP": 31,
        "NOTIFIED_CANCEL_INVITATION_GROUP": 32,
        "NOTIFIED_UNREGISTER_USER": 33,
        "REJECT_GROUP_INVITATION": 34,
        "NOTIFIED_REJECT_GROUP_INVITATION": 35,
        "UPDATE_SETTINGS": 36,
        "NOTIFIED_REGISTER_USER": 37,
        "INVITE_VIA_EMAIL": 38,
        "NOTIFIED_REQUEST_RECOVERY": 39,
        "SEND_CHAT_CHECKED": 40,
        "SEND_CHAT_REMOVED": 41,
        "NOTIFIED_FORCE_SYNC": 42,
        "SEND_CONTENT": 43,
        "SEND_MESSAGE_MYHOME": 44,
        "NOTIFIED_UPDATE_CONTENT_PREVIEW": 45,
        "REMOVE_ALL_MESSAGES": 46,
        "NOTIFIED_UPDATE_PURCHASES": 47,
        "DUMMY": 48,
        "UPDATE_CONTACT": 49,
        "NOTIFIED_RECEIVED_CALL": 50,
        "CANCEL_CALL": 51,
        "NOTIFIED_REDIRECT": 52,
        "NOTIFIED_CHANNEL_SYNC": 53,
        "FAILED_SEND_MESSAGE": 54,
        "NOTIFIED_READ_MESSAGE": 55,
        "FAILED_EMAIL_CONFIRMATION": 56,
        "NOTIFIED_CHAT_CONTENT": 58,
        "NOTIFIED_PUSH_NOTICENTER_ITEM": 59,
        "NOTIFIED_JOIN_CHAT": 60,
        "NOTIFIED_LEAVE_CHAT": 61,
        "NOTIFIED_TYPING": 62,
        "FRIEND_REQUEST_ACCEPTED": 63,
        "DESTROY_MESSAGE": 64,
        "NOTIFIED_DESTROY_MESSAGE": 65,
        "UPDATE_PUBLICKEYCHAIN": 66,
        "NOTIFIED_UPDATE_PUBLICKEYCHAIN": 67,
        "NOTIFIED_BLOCK_CONTACT": 68,
        "NOTIFIED_UNBLOCK_CONTACT": 69,
        "UPDATE_GROUPPREFERENCE": 70,
        "NOTIFIED_PAYMENT_EVENT": 71,
        "REGISTER_E2EE_PUBLICKEY": 72,
        "NOTIFIED_E2EE_KEY_EXCHANGE_REQ": 73,
        "NOTIFIED_E2EE_KEY_EXCHANGE_RESP": 74,
        "NOTIFIED_E2EE_MESSAGE_RESEND_REQ": 75,
        "NOTIFIED_E2EE_MESSAGE_RESEND_RESP": 76,
        "NOTIFIED_E2EE_KEY_UPDATE": 77,
        "NOTIFIED_BUDDY_UPDATE_PROFILE": 78,
        "NOTIFIED_UPDATE_LINEAT_TABS": 79,
        "UPDATE_ROOM": 80,
        "NOTIFIED_BEACON_DETECTED": 81,
        "UPDATE_EXTENDED_PROFILE": 82,
        "ADD_FOLLOW": 83,
        "NOTIFIED_ADD_FOLLOW": 84,
        "DELETE_FOLLOW": 85,
        "NOTIFIED_DELETE_FOLLOW": 86,
        "UPDATE_TIMELINE_SETTINGS": 87,
        "NOTIFIED_FRIEND_REQUEST": 88,
        "UPDATE_RINGBACK_TONE": 89,
        "NOTIFIED_POSTBACK": 90,
        "RECEIVE_READ_WATERMARK": 91,
        "NOTIFIED_MESSAGE_DELIVERED": 92,
        "NOTIFIED_UPDATE_CHAT_BAR": 93,
        "NOTIFIED_CHATAPP_INSTALLED": 94,
        "NOTIFIED_CHATAPP_UPDATED": 95,
        "NOTIFIED_CHATAPP_NEW_MARK": 96,
        "NOTIFIED_CHATAPP_DELETED": 97,
        "NOTIFIED_CHATAPP_SYNC": 98,
        "NOTIFIED_UPDATE_MESSAGE": 99,
        "UPDATE_CHATROOMBGM": 100,
        "NOTIFIED_UPDATE_CHATROOMBGM": 101,
        "UPDATE_RINGTONE": 102,
        "UPDATE_USER_SETTINGS": 118,
        "NOTIFIED_UPDATE_STATUS_BAR": 119,
        "CREATE_CHAT": 120,
        "UPDATE_CHAT": 121,
        "NOTIFIED_UPDATE_CHAT": 122,
        "INVITE_INTO_CHAT": 123,
        "NOTIFIED_INVITE_INTO_CHAT": 124,
        "CANCEL_CHAT_INVITATION": 125,
        "NOTIFIED_CANCEL_CHAT_INVITATION": 126,
        "DELETE_SELF_FROM_CHAT": 127,
        "NOTIFIED_DELETE_SELF_FROM_CHAT": 128,
        "ACCEPT_CHAT_INVITATION": 129,
        "NOTIFIED_ACCEPT_CHAT_INVITATION": 130,
        "REJECT_CHAT_INVITATION": 131,
        "DELETE_OTHER_FROM_CHAT": 132,
        "NOTIFIED_DELETE_OTHER_FROM_CHAT": 133,
        "NOTIFIED_CONTACT_CALENDAR_EVENT": 134,
        "NOTIFIED_CONTACT_CALENDAR_EVENT_ALL": 135,
        "UPDATE_THINGS_OPERATIONS": 136,
        "SEND_CHAT_HIDDEN": 137,
        "CHAT_META_SYNC_ALL": 138,
        "SEND_REACTION": 139,
        "NOTIFIED_SEND_REACTION": 140,
        "NOTIFIED_UPDATE_PROFILE_CONTENT": 141,
        "FAILED_DELIVERY_MESSAGE": 142,
    }


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 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 MessageRelationType(object):
    FORWARD = 0
    AUTO_REPLY = 1
    SUBORDINATE = 2
    REPLY = 3

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

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


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 AppExtensionType(object):
    SIRI = 1
    GOOGLE_ASSISTANT = 2
    OS_SHARE = 3

    _VALUES_TO_NAMES = {
        1: "SIRI",
        2: "GOOGLE_ASSISTANT",
        3: "OS_SHARE",
    }

    _NAMES_TO_VALUES = {
        "SIRI": 1,
        "GOOGLE_ASSISTANT": 2,
        "OS_SHARE": 3,
    }


class PredefinedReactionType(object):
    NICE = 2
    LOVE = 3
    FUN = 4
    AMAZING = 5
    SAD = 6
    OMG = 7

    _VALUES_TO_NAMES = {
        2: "NICE",
        3: "LOVE",
        4: "FUN",
        5: "AMAZING",
        6: "SAD",
        7: "OMG",
    }

    _NAMES_TO_VALUES = {
        "NICE": 2,
        "LOVE": 3,
        "FUN": 4,
        "AMAZING": 5,
        "SAD": 6,
        "OMG": 7,
    }


class PlaceSearchProvider(object):
    GOOGLE = 0
    BAIDU = 1
    FOURSQUARE = 2

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

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


class GeolocationAccuracyMode(object):
    UNKNOWN = 0
    IOS_REDUCED_ACCURACY = 1
    IOS_FULL_ACCURACY = 2
    AOS_PRECISE_LOCATION = 3
    AOS_APPROXIMATE_LOCATION = 4

    _VALUES_TO_NAMES = {
        0: "UNKNOWN",
        1: "IOS_REDUCED_ACCURACY",
        2: "IOS_FULL_ACCURACY",
        3: "AOS_PRECISE_LOCATION",
        4: "AOS_APPROXIMATE_LOCATION",
    }

    _NAMES_TO_VALUES = {
        "UNKNOWN": 0,
        "IOS_REDUCED_ACCURACY": 1,
        "IOS_FULL_ACCURACY": 2,
        "AOS_PRECISE_LOCATION": 3,
        "AOS_APPROXIMATE_LOCATION": 4,
    }


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
    FLEX = 22

    _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",
        22: "FLEX",
    }

    _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,
        "FLEX": 22,
    }


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
    BEACON = 11
    REPAIR = 128
    FACEBOOK = 2305
    SINA = 2306
    RENREN = 2307
    FEIXIN = 2308
    BBM = 2309

    _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",
        11: "BEACON",
        128: "REPAIR",
        2305: "FACEBOOK",
        2306: "SINA",
        2307: "RENREN",
        2308: "FEIXIN",
        2309: "BBM",
    }

    _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,
        "BEACON": 11,
        "REPAIR": 128,
        "FACEBOOK": 2305,
        "SINA": 2306,
        "RENREN": 2307,
        "FEIXIN": 2308,
        "BBM": 2309,
    }


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

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

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


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

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

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


class 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 ContactCalendarEventType(object):
    BIRTHDAY = 0

    _VALUES_TO_NAMES = {
        0: "BIRTHDAY",
    }

    _NAMES_TO_VALUES = {
        "BIRTHDAY": 0,
    }


class UserStatus(object):
    NORMAL = 0
    UNBOUND = 1
    UNREGISTERED = 2
    UNKNOWN = 3

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

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


class ContactCalendarEventState(object):
    SHOW = 0
    HIDE = 1

    _VALUES_TO_NAMES = {
        0: "SHOW",
        1: "HIDE",
    }

    _NAMES_TO_VALUES = {
        "SHOW": 0,
        "HIDE": 1,
    }


class SnsIdType(object):
    FACEBOOK = 1
    SINA = 2
    RENREN = 3
    FEIXIN = 4
    BBM = 5
    APPLE = 6
    YAHOOJAPAN = 7

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

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


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 UserAllowProfileHistoryType(object):
    OWNER = 0
    FRIEND = 1

    _VALUES_TO_NAMES = {
        0: "OWNER",
        1: "FRIEND",
    }

    _NAMES_TO_VALUES = {
        "OWNER": 0,
        "FRIEND": 1,
    }


class UserStatusMessageHistoryType(object):
    NONE = 1
    ALL = 2

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

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


class UserSharePersonalInfoToFriendsType(object):
    NEVER_SHOW = 0
    ONE_WAY = 1
    MUTUAL = 2

    _VALUES_TO_NAMES = {
        0: "NEVER_SHOW",
        1: "ONE_WAY",
        2: "MUTUAL",
    }

    _NAMES_TO_VALUES = {
        "NEVER_SHOW": 0,
        "ONE_WAY": 1,
        "MUTUAL": 2,
    }


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 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 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 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 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 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 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 CharType(object):
    GROUP = 0
    ROOM = 1
    PEER = 2

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

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


class FeatureType(object):
    OBS_VIDEO = 1
    OBS_GENERAL = 2
    OBS_RINGBACK_TONE = 3

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

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


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
    MOZILLA_SIMPLE = 10
    LINE_BOT = 17
    LINE_WAP = 18
    APPLE_APNS_VOIP = 19
    MS_WNS = 20
    GOOGLE_FCM = 21
    CLOVA = 22
    CLOVA_VOIP = 23
    HUAWEI_HCM = 24

    _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",
        10: "MOZILLA_SIMPLE",
        17: "LINE_BOT",
        18: "LINE_WAP",
        19: "APPLE_APNS_VOIP",
        20: "MS_WNS",
        21: "GOOGLE_FCM",
        22: "CLOVA",
        23: "CLOVA_VOIP",
        24: "HUAWEI_HCM",
    }

    _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,
        "MOZILLA_SIMPLE": 10,
        "LINE_BOT": 17,
        "LINE_WAP": 18,
        "APPLE_APNS_VOIP": 19,
        "MS_WNS": 20,
        "GOOGLE_FCM": 21,
        "CLOVA": 22,
        "CLOVA_VOIP": 23,
        "HUAWEI_HCM": 24,
    }


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 ChatAttribute(object):
    NAME = 1
    PICTURE_STATUS = 2
    PREVENTED_JOIN_BY_TICKET = 4
    NOTIFICATION_SETTING = 8
    INVITATION_TICKET = 16
    FAVORITE_TIMESTAMP = 32
    CHAT_TYPE = 64

    _VALUES_TO_NAMES = {
        1: "NAME",
        2: "PICTURE_STATUS",
        4: "PREVENTED_JOIN_BY_TICKET",
        8: "NOTIFICATION_SETTING",
        16: "INVITATION_TICKET",
        32: "FAVORITE_TIMESTAMP",
        64: "CHAT_TYPE",
    }

    _NAMES_TO_VALUES = {
        "NAME": 1,
        "PICTURE_STATUS": 2,
        "PREVENTED_JOIN_BY_TICKET": 4,
        "NOTIFICATION_SETTING": 8,
        "INVITATION_TICKET": 16,
        "FAVORITE_TIMESTAMP": 32,
        "CHAT_TYPE": 64,
    }


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
    GLP = 2

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

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


class BuddyBotActiveStatus(object):
    UNSPECIFIED = 0
    INACTIVE = 1
    ACTIVE = 2
    DELETED = 3

    _VALUES_TO_NAMES = {
        0: "UNSPECIFIED",
        1: "INACTIVE",
        2: "ACTIVE",
        3: "DELETED",
    }

    _NAMES_TO_VALUES = {
        "UNSPECIFIED": 0,
        "INACTIVE": 1,
        "ACTIVE": 2,
        "DELETED": 3,
    }


class GroupCallMediaType(object):
    AUDIO = 1
    VIDEO = 2
    LIVE = 3

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

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


class GroupCallProtocol(object):
    STANDARD = 1
    CONSTELLA = 2

    _VALUES_TO_NAMES = {
        1: "STANDARD",
        2: "CONSTELLA",
    }

    _NAMES_TO_VALUES = {
        "STANDARD": 1,
        "CONSTELLA": 2,
    }


class SyncTriggerReason(object):
    UNKNOWN = 0
    REVISION_GAP_TOO_LARGE_CLIENT = 1
    REVISION_GAP_TOO_LARGE_SERVER = 2
    OPERATION_EXPIRED = 3
    REVISION_HOLE = 4
    FORCE_TRIGGERED = 5

    _VALUES_TO_NAMES = {
        0: "UNKNOWN",
        1: "REVISION_GAP_TOO_LARGE_CLIENT",
        2: "REVISION_GAP_TOO_LARGE_SERVER",
        3: "OPERATION_EXPIRED",
        4: "REVISION_HOLE",
        5: "FORCE_TRIGGERED",
    }

    _NAMES_TO_VALUES = {
        "UNKNOWN": 0,
        "REVISION_GAP_TOO_LARGE_CLIENT": 1,
        "REVISION_GAP_TOO_LARGE_SERVER": 2,
        "OPERATION_EXPIRED": 3,
        "REVISION_HOLE": 4,
        "FORCE_TRIGGERED": 5,
    }


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
    LINE_TICKET_UPDATED = 8192
    TIMELINE_STORY_UPDATED = 16384
    SMARTCH_UPDATED = 32768
    AVATAR_UPDATED = 65536
    HOME_NOTIFICATION_ITEM_EXIST = 131072
    TIMELINE_REBOOT_COMPLETED = 262144
    TIMELINE_GUIDE_STORY_UPDATED = 524288

    _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",
        8192: "LINE_TICKET_UPDATED",
        16384: "TIMELINE_STORY_UPDATED",
        32768: "SMARTCH_UPDATED",
        65536: "AVATAR_UPDATED",
        131072: "HOME_NOTIFICATION_ITEM_EXIST",
        262144: "TIMELINE_REBOOT_COMPLETED",
        524288: "TIMELINE_GUIDE_STORY_UPDATED",
    }

    _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,
        "LINE_TICKET_UPDATED": 8192,
        "TIMELINE_STORY_UPDATED": 16384,
        "SMARTCH_UPDATED": 32768,
        "AVATAR_UPDATED": 65536,
        "HOME_NOTIFICATION_ITEM_EXIST": 131072,
        "TIMELINE_REBOOT_COMPLETED": 262144,
        "TIMELINE_GUIDE_STORY_UPDATED": 524288,
    }


class GlobalEventType(object):
    DUMMY = 0
    NOTICE = 1
    MORETAB = 2
    STICKERSHOP = 3
    CHANNEL = 4
    DENY_KEYWORD = 5
    CONNECTIONINFO = 6
    BUDDY = 7
    TIMELINEINFO = 8
    THEMESHOP = 9
    CALLRATE = 10
    CONFIGURATION = 11
    STICONSHOP = 12
    SUGGESTDICTIONARY = 13
    SUGGESTSETTINGS = 14
    USERSETTINGS = 15
    ANALYTICSINFO = 16
    SEARCHPOPULARKEYWORD = 17
    SEARCHNOTICE = 18
    TIMELINE = 19
    SEARCHPOPULARCATEGORY = 20
    EXTENDEDPROFILE = 21
    SEASONALMARKETING = 22
    NEWSTAB = 23
    SUGGESTDICTIONARYV2 = 24
    CHATAPPSYNC = 25
    AGREEMENTS = 26
    INSTANTNEWS = 27
    EMOJI_MAPPING = 28
    SEARCHBARKEYWORDS = 29
    SHOPPING = 30
    CHAT_EFFECT_BACKGROUND = 31
    CHAT_EFFECT_KEYWORD = 32
    SEARCHINDEX = 33
    HUBTAB = 34
    PAY_RULE_UPDATED = 35
    SMARTCH = 36
    HOME_SERVICE_LIST = 37
    TIMELINESTORY = 38
    WALLET_TAB = 39
    POD_TAB = 40
    HOME_SAFETY_CHECK = 41

    _VALUES_TO_NAMES = {
        0: "DUMMY",
        1: "NOTICE",
        2: "MORETAB",
        3: "STICKERSHOP",
        4: "CHANNEL",
        5: "DENY_KEYWORD",
        6: "CONNECTIONINFO",
        7: "BUDDY",
        8: "TIMELINEINFO",
        9: "THEMESHOP",
        10: "CALLRATE",
        11: "CONFIGURATION",
        12: "STICONSHOP",
        13: "SUGGESTDICTIONARY",
        14: "SUGGESTSETTINGS",
        15: "USERSETTINGS",
        16: "ANALYTICSINFO",
        17: "SEARCHPOPULARKEYWORD",
        18: "SEARCHNOTICE",
        19: "TIMELINE",
        20: "SEARCHPOPULARCATEGORY",
        21: "EXTENDEDPROFILE",
        22: "SEASONALMARKETING",
        23: "NEWSTAB",
        24: "SUGGESTDICTIONARYV2",
        25: "CHATAPPSYNC",
        26: "AGREEMENTS",
        27: "INSTANTNEWS",
        28: "EMOJI_MAPPING",
        29: "SEARCHBARKEYWORDS",
        30: "SHOPPING",
        31: "CHAT_EFFECT_BACKGROUND",
        32: "CHAT_EFFECT_KEYWORD",
        33: "SEARCHINDEX",
        34: "HUBTAB",
        35: "PAY_RULE_UPDATED",
        36: "SMARTCH",
        37: "HOME_SERVICE_LIST",
        38: "TIMELINESTORY",
        39: "WALLET_TAB",
        40: "POD_TAB",
        41: "HOME_SAFETY_CHECK",
    }

    _NAMES_TO_VALUES = {
        "DUMMY": 0,
        "NOTICE": 1,
        "MORETAB": 2,
        "STICKERSHOP": 3,
        "CHANNEL": 4,
        "DENY_KEYWORD": 5,
        "CONNECTIONINFO": 6,
        "BUDDY": 7,
        "TIMELINEINFO": 8,
        "THEMESHOP": 9,
        "CALLRATE": 10,
        "CONFIGURATION": 11,
        "STICONSHOP": 12,
        "SUGGESTDICTIONARY": 13,
        "SUGGESTSETTINGS": 14,
        "USERSETTINGS": 15,
        "ANALYTICSINFO": 16,
        "SEARCHPOPULARKEYWORD": 17,
        "SEARCHNOTICE": 18,
        "TIMELINE": 19,
        "SEARCHPOPULARCATEGORY": 20,
        "EXTENDEDPROFILE": 21,
        "SEASONALMARKETING": 22,
        "NEWSTAB": 23,
        "SUGGESTDICTIONARYV2": 24,
        "CHATAPPSYNC": 25,
        "AGREEMENTS": 26,
        "INSTANTNEWS": 27,
        "EMOJI_MAPPING": 28,
        "SEARCHBARKEYWORDS": 29,
        "SHOPPING": 30,
        "CHAT_EFFECT_BACKGROUND": 31,
        "CHAT_EFFECT_KEYWORD": 32,
        "SEARCHINDEX": 33,
        "HUBTAB": 34,
        "PAY_RULE_UPDATED": 35,
        "SMARTCH": 36,
        "HOME_SERVICE_LIST": 37,
        "TIMELINESTORY": 38,
        "WALLET_TAB": 39,
        "POD_TAB": 40,
        "HOME_SAFETY_CHECK": 41,
    }


class SyncCategories(object):
    ALL = 0
    PROFILE = 1
    SETTINGS = 2
    CONFIGURATIONS = 3
    CONTACT = 4
    GROUP = 5
    E2EE = 6
    MESSAGE = 7

    _VALUES_TO_NAMES = {
        0: "ALL",
        1: "PROFILE",
        2: "SETTINGS",
        3: "CONFIGURATIONS",
        4: "CONTACT",
        5: "GROUP",
        6: "E2EE",
        7: "MESSAGE",
    }

    _NAMES_TO_VALUES = {
        "ALL": 0,
        "PROFILE": 1,
        "SETTINGS": 2,
        "CONFIGURATIONS": 3,
        "CONTACT": 4,
        "GROUP": 5,
        "E2EE": 6,
        "MESSAGE": 7,
    }


class MediaMessageFlow(object):
    V1 = 1
    V2 = 2

    _VALUES_TO_NAMES = {
        1: "V1",
        2: "V2",
    }

    _NAMES_TO_VALUES = {
        "V1": 1,
        "V2": 2,
    }


class MessageReactionType(object):
    ALL = 0
    UNDO = 1
    NICE = 2
    LOVE = 3
    FUN = 4
    AMAZING = 5
    SAD = 6
    OMG = 7

    _VALUES_TO_NAMES = {
        0: "ALL",
        1: "UNDO",
        2: "NICE",
        3: "LOVE",
        4: "FUN",
        5: "AMAZING",
        6: "SAD",
        7: "OMG",
    }

    _NAMES_TO_VALUES = {
        "ALL": 0,
        "UNDO": 1,
        "NICE": 2,
        "LOVE": 3,
        "FUN": 4,
        "AMAZING": 5,
        "SAD": 6,
        "OMG": 7,
    }


class SquareChatAnnouncementType(object):

    _VALUES_TO_NAMES = {
    }

    _NAMES_TO_VALUES = {
    }


class PictureSource(object):
    NFT = 1
    AVATAR = 2
    SNOW = 3
    ARCZ = 4

    _VALUES_TO_NAMES = {
        1: "NFT",
        2: "AVATAR",
        3: "SNOW",
        4: "ARCZ",
    }

    _NAMES_TO_VALUES = {
        "NFT": 1,
        "AVATAR": 2,
        "SNOW": 3,
        "ARCZ": 4,
    }


class SquareMessageState(object):
    SENT = 1
    DELETED = 2
    FORBIDDEN = 3
    UNSENT = 4

    _VALUES_TO_NAMES = {
        1: "SENT",
        2: "DELETED",
        3: "FORBIDDEN",
        4: "UNSENT",
    }

    _NAMES_TO_VALUES = {
        "SENT": 1,
        "DELETED": 2,
        "FORBIDDEN": 3,
        "UNSENT": 4,
    }


class SquareEventType(object):
    RECEIVE_MESSAGE = 0
    SEND_MESSAGE = 1
    MUTATE_MESSAGE = 41
    NOTIFIED_JOIN_SQUARE_CHAT = 2
    NOTIFIED_INVITE_INTO_SQUARE_CHAT = 3
    NOTIFIED_LEAVE_SQUARE_CHAT = 4
    NOTIFIED_DESTROY_MESSAGE = 5
    NOTIFIED_MARK_AS_READ = 6
    NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE = 7
    NOTIFIED_KICKOUT_FROM_SQUARE = 19
    NOTIFIED_SHUTDOWN_SQUARE = 18
    NOTIFIED_DELETE_SQUARE_CHAT = 20
    NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME = 30
    NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE = 31
    NOTIFIED_UPDATE_SQUARE_CHAT_MAX_MEMBER_COUNT = 38
    NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT = 37
    NOTIFIED_ADD_BOT = 33
    NOTIFIED_REMOVE_BOT = 34
    NOTIFIED_UPDATE_READONLY_CHAT = 43
    NOTIFIED_UPDATE_MESSAGE_STATUS = 46
    NOTIFIED_CHAT_POPUP = 48
    NOTIFIED_SYSTEM_MESSAGE = 49
    NOTIFIED_UPDATE_SQUARE = 8
    NOTIFIED_UPDATE_SQUARE_STATUS = 9
    NOTIFIED_UPDATE_SQUARE_AUTHORITY = 10
    NOTIFIED_UPDATE_SQUARE_MEMBER = 11
    NOTIFIED_UPDATE_SQUARE_CHAT = 12
    NOTIFIED_UPDATE_SQUARE_CHAT_STATUS = 13
    NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER = 14
    NOTIFIED_CREATE_SQUARE_MEMBER = 15
    NOTIFIED_CREATE_SQUARE_CHAT_MEMBER = 16
    NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION = 17
    NOTIFIED_UPDATE_SQUARE_FEATURE_SET = 32
    NOTIFIED_UPDATE_SQUARE_CHAT_FEATURE_SET = 50
    NOTIFIED_UPDATE_SQUARE_NOTE_STATUS = 36
    NOTIFICATION_JOIN_REQUEST = 21
    NOTIFICATION_JOINED = 22
    NOTIFICATION_PROMOTED_COADMIN = 23
    NOTIFICATION_PROMOTED_ADMIN = 24
    NOTIFICATION_DEMOTED_MEMBER = 25
    NOTIFICATION_KICKED_OUT = 26
    NOTIFICATION_SQUARE_DELETE = 27
    NOTIFICATION_SQUARE_CHAT_DELETE = 28
    NOTIFICATION_MESSAGE = 29
    NOTIFICATION_POST_ANNOUNCEMENT = 39
    NOTIFICATION_POST = 40
    NOTIFICATION_NEW_CHAT_MEMBER = 42
    NOTIFICATION_MESSAGE_REACTION = 47

    _VALUES_TO_NAMES = {
        0: "RECEIVE_MESSAGE",
        1: "SEND_MESSAGE",
        41: "MUTATE_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",
        38: "NOTIFIED_UPDATE_SQUARE_CHAT_MAX_MEMBER_COUNT",
        37: "NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT",
        33: "NOTIFIED_ADD_BOT",
        34: "NOTIFIED_REMOVE_BOT",
        43: "NOTIFIED_UPDATE_READONLY_CHAT",
        46: "NOTIFIED_UPDATE_MESSAGE_STATUS",
        48: "NOTIFIED_CHAT_POPUP",
        49: "NOTIFIED_SYSTEM_MESSAGE",
        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",
        50: "NOTIFIED_UPDATE_SQUARE_CHAT_FEATURE_SET",
        36: "NOTIFIED_UPDATE_SQUARE_NOTE_STATUS",
        21: "NOTIFICATION_JOIN_REQUEST",
        22: "NOTIFICATION_JOINED",
        23: "NOTIFICATION_PROMOTED_COADMIN",
        24: "NOTIFICATION_PROMOTED_ADMIN",
        25: "NOTIFICATION_DEMOTED_MEMBER",
        26: "NOTIFICATION_KICKED_OUT",
        27: "NOTIFICATION_SQUARE_DELETE",
        28: "NOTIFICATION_SQUARE_CHAT_DELETE",
        29: "NOTIFICATION_MESSAGE",
        39: "NOTIFICATION_POST_ANNOUNCEMENT",
        40: "NOTIFICATION_POST",
        42: "NOTIFICATION_NEW_CHAT_MEMBER",
        47: "NOTIFICATION_MESSAGE_REACTION",
    }

    _NAMES_TO_VALUES = {
        "RECEIVE_MESSAGE": 0,
        "SEND_MESSAGE": 1,
        "MUTATE_MESSAGE": 41,
        "NOTIFIED_JOIN_SQUARE_CHAT": 2,
        "NOTIFIED_INVITE_INTO_SQUARE_CHAT": 3,
        "NOTIFIED_LEAVE_SQUARE_CHAT": 4,
        "NOTIFIED_DESTROY_MESSAGE": 5,
        "NOTIFIED_MARK_AS_READ": 6,
        "NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE": 7,
        "NOTIFIED_KICKOUT_FROM_SQUARE": 19,
        "NOTIFIED_SHUTDOWN_SQUARE": 18,
        "NOTIFIED_DELETE_SQUARE_CHAT": 20,
        "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME": 30,
        "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE": 31,
        "NOTIFIED_UPDATE_SQUARE_CHAT_MAX_MEMBER_COUNT": 38,
        "NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT": 37,
        "NOTIFIED_ADD_BOT": 33,
        "NOTIFIED_REMOVE_BOT": 34,
        "NOTIFIED_UPDATE_READONLY_CHAT": 43,
        "NOTIFIED_UPDATE_MESSAGE_STATUS": 46,
        "NOTIFIED_CHAT_POPUP": 48,
        "NOTIFIED_SYSTEM_MESSAGE": 49,
        "NOTIFIED_UPDATE_SQUARE": 8,
        "NOTIFIED_UPDATE_SQUARE_STATUS": 9,
        "NOTIFIED_UPDATE_SQUARE_AUTHORITY": 10,
        "NOTIFIED_UPDATE_SQUARE_MEMBER": 11,
        "NOTIFIED_UPDATE_SQUARE_CHAT": 12,
        "NOTIFIED_UPDATE_SQUARE_CHAT_STATUS": 13,
        "NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER": 14,
        "NOTIFIED_CREATE_SQUARE_MEMBER": 15,
        "NOTIFIED_CREATE_SQUARE_CHAT_MEMBER": 16,
        "NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION": 17,
        "NOTIFIED_UPDATE_SQUARE_FEATURE_SET": 32,
        "NOTIFIED_UPDATE_SQUARE_CHAT_FEATURE_SET": 50,
        "NOTIFIED_UPDATE_SQUARE_NOTE_STATUS": 36,
        "NOTIFICATION_JOIN_REQUEST": 21,
        "NOTIFICATION_JOINED": 22,
        "NOTIFICATION_PROMOTED_COADMIN": 23,
        "NOTIFICATION_PROMOTED_ADMIN": 24,
        "NOTIFICATION_DEMOTED_MEMBER": 25,
        "NOTIFICATION_KICKED_OUT": 26,
        "NOTIFICATION_SQUARE_DELETE": 27,
        "NOTIFICATION_SQUARE_CHAT_DELETE": 28,
        "NOTIFICATION_MESSAGE": 29,
        "NOTIFICATION_POST_ANNOUNCEMENT": 39,
        "NOTIFICATION_POST": 40,
        "NOTIFICATION_NEW_CHAT_MEMBER": 42,
        "NOTIFICATION_MESSAGE_REACTION": 47,
    }


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 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 SquareMemberRelationState(object):
    NONE = 1
    BLOCKED = 2

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

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


class SquareType(object):
    CLOSED = 0
    OPEN = 1

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

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


class SquareState(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 SquareEmblem(object):
    SUPER = 1
    OFFICIAL = 2

    _VALUES_TO_NAMES = {
        1: "SUPER",
        2: "OFFICIAL",
    }

    _NAMES_TO_VALUES = {
        "SUPER": 1,
        "OFFICIAL": 2,
    }


class SquareJoinMethodType(object):
    NONE = 0
    APPROVAL = 1
    CODE = 2

    _VALUES_TO_NAMES = {
        0: "NONE",
        1: "APPROVAL",
        2: "CODE",
    }

    _NAMES_TO_VALUES = {
        "NONE": 0,
        "APPROVAL": 1,
        "CODE": 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 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 MessageStatusType(object):

    _VALUES_TO_NAMES = {
    }

    _NAMES_TO_VALUES = {
    }


class NotifiedMessageType(object):
    MENTION = 1
    REPLY = 2

    _VALUES_TO_NAMES = {
        1: "MENTION",
        2: "REPLY",
    }

    _NAMES_TO_VALUES = {
        "MENTION": 1,
        "REPLY": 2,
    }


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

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

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


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

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

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


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

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

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


class NotificationPostType(object):
    POST_MENTION = 2
    POST_LIKE = 3
    POST_COMMENT = 4
    POST_COMMENT_MENTION = 5
    POST_COMMENT_LIKE = 6
    POST_RELAY_JOIN = 7

    _VALUES_TO_NAMES = {
        2: "POST_MENTION",
        3: "POST_LIKE",
        4: "POST_COMMENT",
        5: "POST_COMMENT_MENTION",
        6: "POST_COMMENT_LIKE",
        7: "POST_RELAY_JOIN",
    }

    _NAMES_TO_VALUES = {
        "POST_MENTION": 2,
        "POST_LIKE": 3,
        "POST_COMMENT": 4,
        "POST_COMMENT_MENTION": 5,
        "POST_COMMENT_LIKE": 6,
        "POST_RELAY_JOIN": 7,
    }


class LiveTalkEventType(object):
    NOTIFIED_UPDATE_LIVE_TALK_TITLE = 1
    NOTIFIED_UPDATE_LIVE_TALK_SPEAKER_SETTING = 2
    NOTIFIED_UPDATE_LIVE_TALK_ANNOUNCEMENT = 3
    NOTIFIED_UPDATE_SQUARE_MEMBER_ROLE = 4
    NOTIFIED_UPDATE_LIVE_TALK_ALLOW_REQUEST_TO_SPEAK = 5

    _VALUES_TO_NAMES = {
        1: "NOTIFIED_UPDATE_LIVE_TALK_TITLE",
        2: "NOTIFIED_UPDATE_LIVE_TALK_SPEAKER_SETTING",
        3: "NOTIFIED_UPDATE_LIVE_TALK_ANNOUNCEMENT",
        4: "NOTIFIED_UPDATE_SQUARE_MEMBER_ROLE",
        5: "NOTIFIED_UPDATE_LIVE_TALK_ALLOW_REQUEST_TO_SPEAK",
    }

    _NAMES_TO_VALUES = {
        "NOTIFIED_UPDATE_LIVE_TALK_TITLE": 1,
        "NOTIFIED_UPDATE_LIVE_TALK_SPEAKER_SETTING": 2,
        "NOTIFIED_UPDATE_LIVE_TALK_ANNOUNCEMENT": 3,
        "NOTIFIED_UPDATE_SQUARE_MEMBER_ROLE": 4,
        "NOTIFIED_UPDATE_LIVE_TALK_ALLOW_REQUEST_TO_SPEAK": 5,
    }


class LiveTalkSpeakerSetting(object):
    LIMITED_SPEAKERS = 1
    ALL_AS_SPEAKERS = 2

    _VALUES_TO_NAMES = {
        1: "LIMITED_SPEAKERS",
        2: "ALL_AS_SPEAKERS",
    }

    _NAMES_TO_VALUES = {
        "LIMITED_SPEAKERS": 1,
        "ALL_AS_SPEAKERS": 2,
    }


class LiveTalkType(object):
    PUBLIC = 1
    PRIVATE = 2

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

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


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

    """


    def __init__(self, code=None, reason=None, parameterMap=None,):
        super(TalkException, self).__setattr__('code', code)
        super(TalkException, self).__setattr__('reason', reason)
        super(TalkException, self).__setattr__('parameterMap', parameterMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.parameterMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        parameterMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    parameterMap = {}
                    (_ktype1, _vtype2, _size0) = iprot.readMapBegin()
                    for _i4 in range(_size0):
                        _key5 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val6 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        parameterMap[_key5] = _val6
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            parameterMap=parameterMap,
        )

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

    def validate(self):
        return

    def __str__(self):
        return repr(self)

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

    """


    def __init__(self, code=None, reason=None, parameterMap=None,):
        super(ChannelException, self).__setattr__('code', code)
        super(ChannelException, self).__setattr__('reason', reason)
        super(ChannelException, self).__setattr__('parameterMap', parameterMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.parameterMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        parameterMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    parameterMap = {}
                    (_ktype10, _vtype11, _size9) = iprot.readMapBegin()
                    for _i13 in range(_size9):
                        _key14 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val15 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        parameterMap[_key14] = _val15
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            parameterMap=parameterMap,
        )

    def write(self, oprot):
        if oprot._fast_encode is 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 kiter16, viter17 in self.parameterMap.items():
                oprot.writeString(kiter16.encode('utf-8') if sys.version_info[0] == 2 else kiter16)
                oprot.writeString(viter17.encode('utf-8') if sys.version_info[0] == 2 else viter17)
            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

    """


    def __init__(self, errorCode=None, errorExtraInfo=None, reason=None,):
        super(SquareException, self).__setattr__('errorCode', errorCode)
        super(SquareException, self).__setattr__('errorExtraInfo', errorExtraInfo)
        super(SquareException, self).__setattr__('reason', reason)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.errorCode, self.errorExtraInfo, self.reason, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        errorCode = None
        errorExtraInfo = None
        reason = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    errorCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    errorExtraInfo = ErrorExtraInfo()
                    errorExtraInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            errorCode=errorCode,
            errorExtraInfo=errorExtraInfo,
            reason=reason,
        )

    def write(self, oprot):
        if oprot._fast_encode is 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 LiffException(TException):
    """
    Attributes:
     - code
     - message
     - payload

    """


    def __init__(self, code=None, message=None, payload=None,):
        super(LiffException, self).__setattr__('code', code)
        super(LiffException, self).__setattr__('message', message)
        super(LiffException, self).__setattr__('payload', payload)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.message, self.payload, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        message = None
        payload = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    payload = LiffErrorPayload()
                    payload.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            message=message,
            payload=payload,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('LiffException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 2)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        if self.payload is not None:
            oprot.writeFieldBegin('payload', TType.STRUCT, 3)
            self.payload.write(oprot)
            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 HomeException(TException):
    """
    Attributes:
     - exceptionCode
     - message
     - retryTimeMillis

    """


    def __init__(self, exceptionCode=None, message=None, retryTimeMillis=None,):
        super(HomeException, self).__setattr__('exceptionCode', exceptionCode)
        super(HomeException, self).__setattr__('message', message)
        super(HomeException, self).__setattr__('retryTimeMillis', retryTimeMillis)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.exceptionCode, self.message, self.retryTimeMillis, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        exceptionCode = None
        message = None
        retryTimeMillis = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    exceptionCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    retryTimeMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            exceptionCode=exceptionCode,
            message=message,
            retryTimeMillis=retryTimeMillis,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('HomeException')
        if self.exceptionCode is not None:
            oprot.writeFieldBegin('exceptionCode', TType.I32, 1)
            oprot.writeI32(self.exceptionCode)
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 2)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        if self.retryTimeMillis is not None:
            oprot.writeFieldBegin('retryTimeMillis', TType.I64, 3)
            oprot.writeI64(self.retryTimeMillis)
            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 ChatappException(TException):
    """
    Attributes:
     - code
     - reason

    """


    def __init__(self, code=None, reason=None,):
        super(ChatappException, self).__setattr__('code', code)
        super(ChatappException, self).__setattr__('reason', reason)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ChatappException')
        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()
        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 MembershipException(TException):
    """
    Attributes:
     - code
     - reason
     - parameterMap

    """


    def __init__(self, code=None, reason=None, parameterMap=None,):
        super(MembershipException, self).__setattr__('code', code)
        super(MembershipException, self).__setattr__('reason', reason)
        super(MembershipException, self).__setattr__('parameterMap', parameterMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.parameterMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        parameterMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    parameterMap = {}
                    (_ktype19, _vtype20, _size18) = iprot.readMapBegin()
                    for _i22 in range(_size18):
                        _key23 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val24 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        parameterMap[_key23] = _val24
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            parameterMap=parameterMap,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('MembershipException')
        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 kiter25, viter26 in self.parameterMap.items():
                oprot.writeString(kiter25.encode('utf-8') if sys.version_info[0] == 2 else kiter25)
                oprot.writeString(viter26.encode('utf-8') if sys.version_info[0] == 2 else viter26)
            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 BotException(TException):
    """
    Attributes:
     - errorCode
     - reason
     - parameterMap

    """


    def __init__(self, errorCode=None, reason=None, parameterMap=None,):
        super(BotException, self).__setattr__('errorCode', errorCode)
        super(BotException, self).__setattr__('reason', reason)
        super(BotException, self).__setattr__('parameterMap', parameterMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.errorCode, self.reason, self.parameterMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        errorCode = None
        reason = None
        parameterMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    errorCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    parameterMap = {}
                    (_ktype28, _vtype29, _size27) = iprot.readMapBegin()
                    for _i31 in range(_size27):
                        _key32 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val33 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        parameterMap[_key32] = _val33
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            errorCode=errorCode,
            reason=reason,
            parameterMap=parameterMap,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('BotException')
        if self.errorCode is not None:
            oprot.writeFieldBegin('errorCode', TType.I32, 1)
            oprot.writeI32(self.errorCode)
            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 kiter34, viter35 in self.parameterMap.items():
                oprot.writeString(kiter34.encode('utf-8') if sys.version_info[0] == 2 else kiter34)
                oprot.writeString(viter35.encode('utf-8') if sys.version_info[0] == 2 else viter35)
            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 BotExternalException(TException):
    """
    Attributes:
     - errorCode
     - reason

    """


    def __init__(self, errorCode=None, reason=None,):
        super(BotExternalException, self).__setattr__('errorCode', errorCode)
        super(BotExternalException, self).__setattr__('reason', reason)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.errorCode, self.reason, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        errorCode = None
        reason = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    errorCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            errorCode=errorCode,
            reason=reason,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('BotExternalException')
        if self.errorCode is not None:
            oprot.writeFieldBegin('errorCode', TType.I32, 1)
            oprot.writeI32(self.errorCode)
            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()
        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 LiffChannelException(TException):
    """
    Attributes:
     - code
     - reason
     - parameterMap

    """


    def __init__(self, code=None, reason=None, parameterMap=None,):
        super(LiffChannelException, self).__setattr__('code', code)
        super(LiffChannelException, self).__setattr__('reason', reason)
        super(LiffChannelException, self).__setattr__('parameterMap', parameterMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.parameterMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        parameterMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    parameterMap = {}
                    (_ktype37, _vtype38, _size36) = iprot.readMapBegin()
                    for _i40 in range(_size36):
                        _key41 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val42 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        parameterMap[_key41] = _val42
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            parameterMap=parameterMap,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('LiffChannelException')
        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 kiter43, viter44 in self.parameterMap.items():
                oprot.writeString(kiter43.encode('utf-8') if sys.version_info[0] == 2 else kiter43)
                oprot.writeString(viter44.encode('utf-8') if sys.version_info[0] == 2 else viter44)
            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 AccessTokenRefreshException(TException):
    """
    Attributes:
     - errorCode
     - reasonCode

    """


    def __init__(self, errorCode=None, reasonCode=None,):
        super(AccessTokenRefreshException, self).__setattr__('errorCode', errorCode)
        super(AccessTokenRefreshException, self).__setattr__('reasonCode', reasonCode)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.errorCode, self.reasonCode, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        errorCode = None
        reasonCode = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    errorCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    reasonCode = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            errorCode=errorCode,
            reasonCode=reasonCode,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AccessTokenRefreshException')
        if self.errorCode is not None:
            oprot.writeFieldBegin('errorCode', TType.I32, 1)
            oprot.writeI32(self.errorCode)
            oprot.writeFieldEnd()
        if self.reasonCode is not None:
            oprot.writeFieldBegin('reasonCode', TType.I64, 2)
            oprot.writeI64(self.reasonCode)
            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 AccountEapConnectException(TException):
    """
    Attributes:
     - code
     - alertMessage
     - webAuthDetails

    """


    def __init__(self, code=None, alertMessage=None, webAuthDetails=None,):
        super(AccountEapConnectException, self).__setattr__('code', code)
        super(AccountEapConnectException, self).__setattr__('alertMessage', alertMessage)
        super(AccountEapConnectException, self).__setattr__('webAuthDetails', webAuthDetails)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.alertMessage, self.webAuthDetails, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        alertMessage = None
        webAuthDetails = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    alertMessage = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRUCT:
                    webAuthDetails = WebAuthDetails()
                    webAuthDetails.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            alertMessage=alertMessage,
            webAuthDetails=webAuthDetails,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AccountEapConnectException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.alertMessage is not None:
            oprot.writeFieldBegin('alertMessage', TType.STRING, 2)
            oprot.writeString(self.alertMessage.encode('utf-8') if sys.version_info[0] == 2 else self.alertMessage)
            oprot.writeFieldEnd()
        if self.webAuthDetails is not None:
            oprot.writeFieldBegin('webAuthDetails', TType.STRUCT, 11)
            self.webAuthDetails.write(oprot)
            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 PwlessCredentialException(TException):
    """
    Attributes:
     - code
     - alertMessage

    """


    def __init__(self, code=None, alertMessage=None,):
        super(PwlessCredentialException, self).__setattr__('code', code)
        super(PwlessCredentialException, self).__setattr__('alertMessage', alertMessage)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.alertMessage, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        alertMessage = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    alertMessage = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            alertMessage=alertMessage,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PwlessCredentialException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.alertMessage is not None:
            oprot.writeFieldBegin('alertMessage', TType.STRING, 2)
            oprot.writeString(self.alertMessage.encode('utf-8') if sys.version_info[0] == 2 else self.alertMessage)
            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 SecondAuthFactorPinCodeException(TException):
    """
    Attributes:
     - code
     - alertMessage

    """


    def __init__(self, code=None, alertMessage=None,):
        super(SecondAuthFactorPinCodeException, self).__setattr__('code', code)
        super(SecondAuthFactorPinCodeException, self).__setattr__('alertMessage', alertMessage)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.alertMessage, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        alertMessage = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    alertMessage = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            alertMessage=alertMessage,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SecondAuthFactorPinCodeException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.alertMessage is not None:
            oprot.writeFieldBegin('alertMessage', TType.STRING, 2)
            oprot.writeString(self.alertMessage.encode('utf-8') if sys.version_info[0] == 2 else self.alertMessage)
            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 AuthException(TException):
    """
    Attributes:
     - code
     - alertMessage
     - webAuthDetails

    """


    def __init__(self, code=None, alertMessage=None, webAuthDetails=None,):
        super(AuthException, self).__setattr__('code', code)
        super(AuthException, self).__setattr__('alertMessage', alertMessage)
        super(AuthException, self).__setattr__('webAuthDetails', webAuthDetails)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.alertMessage, self.webAuthDetails, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        alertMessage = None
        webAuthDetails = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    alertMessage = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRUCT:
                    webAuthDetails = WebAuthDetails()
                    webAuthDetails.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            alertMessage=alertMessage,
            webAuthDetails=webAuthDetails,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AuthException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.alertMessage is not None:
            oprot.writeFieldBegin('alertMessage', TType.STRING, 2)
            oprot.writeString(self.alertMessage.encode('utf-8') if sys.version_info[0] == 2 else self.alertMessage)
            oprot.writeFieldEnd()
        if self.webAuthDetails is not None:
            oprot.writeFieldBegin('webAuthDetails', TType.STRUCT, 11)
            self.webAuthDetails.write(oprot)
            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 SecondaryPwlessLoginException(TException):
    """
    Attributes:
     - code
     - alertMessage

    """


    def __init__(self, code=None, alertMessage=None,):
        super(SecondaryPwlessLoginException, self).__setattr__('code', code)
        super(SecondaryPwlessLoginException, self).__setattr__('alertMessage', alertMessage)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.alertMessage, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        alertMessage = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    alertMessage = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            alertMessage=alertMessage,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SecondaryPwlessLoginException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.alertMessage is not None:
            oprot.writeFieldBegin('alertMessage', TType.STRING, 2)
            oprot.writeString(self.alertMessage.encode('utf-8') if sys.version_info[0] == 2 else self.alertMessage)
            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 SecondaryQrCodeException(TException):
    """
    Attributes:
     - code
     - alertMessage

    """


    def __init__(self, code=None, alertMessage=None,):
        super(SecondaryQrCodeException, self).__setattr__('code', code)
        super(SecondaryQrCodeException, self).__setattr__('alertMessage', alertMessage)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.alertMessage, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        alertMessage = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    alertMessage = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            alertMessage=alertMessage,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SecondaryQrCodeException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.alertMessage is not None:
            oprot.writeFieldBegin('alertMessage', TType.STRING, 2)
            oprot.writeString(self.alertMessage.encode('utf-8') if sys.version_info[0] == 2 else self.alertMessage)
            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 PaymentException(TException):
    """
    Attributes:
     - errorCode
     - debugReason
     - serverDefinedMessage
     - errorDetailMap

    """


    def __init__(self, errorCode=None, debugReason=None, serverDefinedMessage=None, errorDetailMap=None,):
        super(PaymentException, self).__setattr__('errorCode', errorCode)
        super(PaymentException, self).__setattr__('debugReason', debugReason)
        super(PaymentException, self).__setattr__('serverDefinedMessage', serverDefinedMessage)
        super(PaymentException, self).__setattr__('errorDetailMap', errorDetailMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.errorCode, self.debugReason, self.serverDefinedMessage, self.errorDetailMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        errorCode = None
        debugReason = None
        serverDefinedMessage = None
        errorDetailMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    errorCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    debugReason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    serverDefinedMessage = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.MAP:
                    errorDetailMap = {}
                    (_ktype46, _vtype47, _size45) = iprot.readMapBegin()
                    for _i49 in range(_size45):
                        _key50 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val51 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        errorDetailMap[_key50] = _val51
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            errorCode=errorCode,
            debugReason=debugReason,
            serverDefinedMessage=serverDefinedMessage,
            errorDetailMap=errorDetailMap,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PaymentException')
        if self.errorCode is not None:
            oprot.writeFieldBegin('errorCode', TType.I32, 1)
            oprot.writeI32(self.errorCode)
            oprot.writeFieldEnd()
        if self.debugReason is not None:
            oprot.writeFieldBegin('debugReason', TType.STRING, 2)
            oprot.writeString(self.debugReason.encode('utf-8') if sys.version_info[0] == 2 else self.debugReason)
            oprot.writeFieldEnd()
        if self.serverDefinedMessage is not None:
            oprot.writeFieldBegin('serverDefinedMessage', TType.STRING, 3)
            oprot.writeString(self.serverDefinedMessage.encode('utf-8') if sys.version_info[0] == 2 else self.serverDefinedMessage)
            oprot.writeFieldEnd()
        if self.errorDetailMap is not None:
            oprot.writeFieldBegin('errorDetailMap', TType.MAP, 4)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.errorDetailMap))
            for kiter52, viter53 in self.errorDetailMap.items():
                oprot.writeString(kiter52.encode('utf-8') if sys.version_info[0] == 2 else kiter52)
                oprot.writeString(viter53.encode('utf-8') if sys.version_info[0] == 2 else viter53)
            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 SettingsException(TException):
    """
    Attributes:
     - code
     - reason
     - parameterMap

    """


    def __init__(self, code=None, reason=None, parameterMap=None,):
        super(SettingsException, self).__setattr__('code', code)
        super(SettingsException, self).__setattr__('reason', reason)
        super(SettingsException, self).__setattr__('parameterMap', parameterMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.parameterMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        parameterMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    parameterMap = {}
                    (_ktype55, _vtype56, _size54) = iprot.readMapBegin()
                    for _i58 in range(_size54):
                        _key59 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val60 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        parameterMap[_key59] = _val60
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            parameterMap=parameterMap,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SettingsException')
        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 kiter61, viter62 in self.parameterMap.items():
                oprot.writeString(kiter61.encode('utf-8') if sys.version_info[0] == 2 else kiter61)
                oprot.writeString(viter62.encode('utf-8') if sys.version_info[0] == 2 else viter62)
            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 TicketException(TException):
    """
    Attributes:
     - code
     - reason
     - parameterMap

    """


    def __init__(self, code=None, reason=None, parameterMap=None,):
        super(TicketException, self).__setattr__('code', code)
        super(TicketException, self).__setattr__('reason', reason)
        super(TicketException, self).__setattr__('parameterMap', parameterMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.parameterMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        parameterMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    parameterMap = {}
                    (_ktype64, _vtype65, _size63) = iprot.readMapBegin()
                    for _i67 in range(_size63):
                        _key68 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val69 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        parameterMap[_key68] = _val69
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            parameterMap=parameterMap,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('TicketException')
        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 kiter70, viter71 in self.parameterMap.items():
                oprot.writeString(kiter70.encode('utf-8') if sys.version_info[0] == 2 else kiter70)
                oprot.writeString(viter71.encode('utf-8') if sys.version_info[0] == 2 else viter71)
            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 ThingsException(TException):
    """
    Attributes:
     - code
     - reason

    """


    def __init__(self, code=None, reason=None,):
        super(ThingsException, self).__setattr__('code', code)
        super(ThingsException, self).__setattr__('reason', reason)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ThingsException')
        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()
        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 SuggestTrialException(TException):
    """
    Attributes:
     - code
     - reason
     - parameterMap

    """


    def __init__(self, code=None, reason=None, parameterMap=None,):
        super(SuggestTrialException, self).__setattr__('code', code)
        super(SuggestTrialException, self).__setattr__('reason', reason)
        super(SuggestTrialException, self).__setattr__('parameterMap', parameterMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.parameterMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        parameterMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    parameterMap = {}
                    (_ktype73, _vtype74, _size72) = iprot.readMapBegin()
                    for _i76 in range(_size72):
                        _key77 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val78 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        parameterMap[_key77] = _val78
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            parameterMap=parameterMap,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SuggestTrialException')
        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 kiter79, viter80 in self.parameterMap.items():
                oprot.writeString(kiter79.encode('utf-8') if sys.version_info[0] == 2 else kiter79)
                oprot.writeString(viter80.encode('utf-8') if sys.version_info[0] == 2 else viter80)
            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 LFLPremiumException(TException):
    """
    Attributes:
     - code

    """


    def __init__(self, code=None,):
        super(LFLPremiumException, self).__setattr__('code', code)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('LFLPremiumException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            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 WalletException(TException):
    """
    Attributes:
     - code
     - reason
     - attributes

    """


    def __init__(self, code=None, reason=None, attributes=None,):
        super(WalletException, self).__setattr__('code', code)
        super(WalletException, self).__setattr__('reason', reason)
        super(WalletException, self).__setattr__('attributes', attributes)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.attributes, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        attributes = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    attributes = {}
                    (_ktype82, _vtype83, _size81) = iprot.readMapBegin()
                    for _i85 in range(_size81):
                        _key86 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val87 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        attributes[_key86] = _val87
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            attributes=attributes,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WalletException')
        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.attributes is not None:
            oprot.writeFieldBegin('attributes', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes))
            for kiter88, viter89 in self.attributes.items():
                oprot.writeString(kiter88.encode('utf-8') if sys.version_info[0] == 2 else kiter88)
                oprot.writeString(viter89.encode('utf-8') if sys.version_info[0] == 2 else viter89)
            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 ShopException(TException):
    """
    Attributes:
     - code
     - reason
     - parameterMap

    """


    def __init__(self, code=None, reason=None, parameterMap=None,):
        super(ShopException, self).__setattr__('code', code)
        super(ShopException, self).__setattr__('reason', reason)
        super(ShopException, self).__setattr__('parameterMap', parameterMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.parameterMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        parameterMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    parameterMap = {}
                    (_ktype91, _vtype92, _size90) = iprot.readMapBegin()
                    for _i94 in range(_size90):
                        _key95 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val96 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        parameterMap[_key95] = _val96
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            parameterMap=parameterMap,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ShopException')
        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 kiter97, viter98 in self.parameterMap.items():
                oprot.writeString(kiter97.encode('utf-8') if sys.version_info[0] == 2 else kiter97)
                oprot.writeString(viter98.encode('utf-8') if sys.version_info[0] == 2 else viter98)
            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 PointException(TException):
    """
    Attributes:
     - code
     - reason
     - extra

    """


    def __init__(self, code=None, reason=None, extra=None,):
        super(PointException, self).__setattr__('code', code)
        super(PointException, self).__setattr__('reason', reason)
        super(PointException, self).__setattr__('extra', extra)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.extra, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        extra = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    extra = {}
                    (_ktype100, _vtype101, _size99) = iprot.readMapBegin()
                    for _i103 in range(_size99):
                        _key104 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val105 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        extra[_key104] = _val105
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            extra=extra,
        )

    def write(self, oprot):
        if oprot._fast_encode is 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 kiter106, viter107 in self.extra.items():
                oprot.writeString(kiter106.encode('utf-8') if sys.version_info[0] == 2 else kiter106)
                oprot.writeString(viter107.encode('utf-8') if sys.version_info[0] == 2 else viter107)
            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 E2EEKeyBackupException(TException):
    """
    Attributes:
     - code
     - reason
     - parameterMap

    """


    def __init__(self, code=None, reason=None, parameterMap=None,):
        super(E2EEKeyBackupException, self).__setattr__('code', code)
        super(E2EEKeyBackupException, self).__setattr__('reason', reason)
        super(E2EEKeyBackupException, self).__setattr__('parameterMap', parameterMap)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.code, self.reason, self.parameterMap, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        code = None
        reason = None
        parameterMap = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    reason = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    parameterMap = {}
                    (_ktype109, _vtype110, _size108) = iprot.readMapBegin()
                    for _i112 in range(_size108):
                        _key113 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val114 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        parameterMap[_key113] = _val114
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            code=code,
            reason=reason,
            parameterMap=parameterMap,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('E2EEKeyBackupException')
        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 kiter115, viter116 in self.parameterMap.items():
                oprot.writeString(kiter115.encode('utf-8') if sys.version_info[0] == 2 else kiter115)
                oprot.writeString(viter116.encode('utf-8') if sys.version_info[0] == 2 else viter116)
            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 BeaconCondition(object):
    """
    Attributes:
     - inFriends
     - notInFriends
     - termsAgreed

    """


    def __init__(self, inFriends=None, notInFriends=None, termsAgreed=None,):
        self.inFriends = inFriends
        self.notInFriends = notInFriends
        self.termsAgreed = termsAgreed

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.inFriends = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.notInFriends = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.termsAgreed = 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('BeaconCondition')
        if self.inFriends is not None:
            oprot.writeFieldBegin('inFriends', TType.STRING, 1)
            oprot.writeString(self.inFriends.encode('utf-8') if sys.version_info[0] == 2 else self.inFriends)
            oprot.writeFieldEnd()
        if self.notInFriends is not None:
            oprot.writeFieldBegin('notInFriends', TType.STRING, 2)
            oprot.writeString(self.notInFriends.encode('utf-8') if sys.version_info[0] == 2 else self.notInFriends)
            oprot.writeFieldEnd()
        if self.termsAgreed is not None:
            oprot.writeFieldBegin('termsAgreed', TType.BOOL, 3)
            oprot.writeBool(self.termsAgreed)
            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 BeaconBackgroundNotification(object):
    """
    Attributes:
     - actionInterval
     - actionAndConditions
     - actionDelay
     - actionConditions

    """


    def __init__(self, actionInterval=None, actionAndConditions=None, actionDelay=None, actionConditions=None,):
        self.actionInterval = actionInterval
        self.actionAndConditions = actionAndConditions
        self.actionDelay = actionDelay
        self.actionConditions = actionConditions

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.actionInterval = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.actionAndConditions = []
                    (_etype120, _size117) = iprot.readListBegin()
                    for _i121 in range(_size117):
                        _elem122 = BeaconCondition()
                        _elem122.read(iprot)
                        self.actionAndConditions.append(_elem122)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.actionDelay = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.actionConditions = []
                    (_etype126, _size123) = iprot.readListBegin()
                    for _i127 in range(_size123):
                        _elem128 = BeaconCondition()
                        _elem128.read(iprot)
                        self.actionConditions.append(_elem128)
                    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('BeaconBackgroundNotification')
        if self.actionInterval is not None:
            oprot.writeFieldBegin('actionInterval', TType.I64, 1)
            oprot.writeI64(self.actionInterval)
            oprot.writeFieldEnd()
        if self.actionAndConditions is not None:
            oprot.writeFieldBegin('actionAndConditions', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.actionAndConditions))
            for iter129 in self.actionAndConditions:
                iter129.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.actionDelay is not None:
            oprot.writeFieldBegin('actionDelay', TType.I64, 3)
            oprot.writeI64(self.actionDelay)
            oprot.writeFieldEnd()
        if self.actionConditions is not None:
            oprot.writeFieldBegin('actionConditions', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.actionConditions))
            for iter130 in self.actionConditions:
                iter130.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 LiffErrorPayload(object):
    """
    Attributes:
     - consentRequired

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.consentRequired = LiffErrorConsentRequired()
                    self.consentRequired.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('LiffErrorPayload')
        if self.consentRequired is not None:
            oprot.writeFieldBegin('consentRequired', TType.STRUCT, 3)
            self.consentRequired.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 LiffErrorConsentRequired(object):
    """
    Attributes:
     - channelId
     - consentUrl

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.consentUrl = iprot.readString().decode('utf-8', errors='replace') 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('LiffErrorConsentRequired')
        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.consentUrl is not None:
            oprot.writeFieldBegin('consentUrl', TType.STRING, 2)
            oprot.writeString(self.consentUrl.encode('utf-8') if sys.version_info[0] == 2 else self.consentUrl)
            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
     - userRestrictionInfo

    """


    def __init__(self, preconditionFailedExtraInfo=None, userRestrictionInfo=None,):
        self.preconditionFailedExtraInfo = preconditionFailedExtraInfo
        self.userRestrictionInfo = userRestrictionInfo

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.userRestrictionInfo = UserRestrictionExtraInfo()
                    self.userRestrictionInfo.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('ErrorExtraInfo')
        if self.preconditionFailedExtraInfo is not None:
            oprot.writeFieldBegin('preconditionFailedExtraInfo', TType.I32, 1)
            oprot.writeI32(self.preconditionFailedExtraInfo)
            oprot.writeFieldEnd()
        if self.userRestrictionInfo is not None:
            oprot.writeFieldBegin('userRestrictionInfo', TType.STRUCT, 2)
            self.userRestrictionInfo.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 UserRestrictionExtraInfo(object):
    """
    Attributes:
     - linkUrl

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.linkUrl = iprot.readString().decode('utf-8', errors='replace') 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('UserRestrictionExtraInfo')
        if self.linkUrl is not None:
            oprot.writeFieldBegin('linkUrl', TType.STRING, 1)
            oprot.writeString(self.linkUrl.encode('utf-8') if sys.version_info[0] == 2 else self.linkUrl)
            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 WebAuthDetails(object):
    """
    Attributes:
     - baseUrl
     - token

    """


    def __init__(self, baseUrl=None, token=None,):
        self.baseUrl = baseUrl
        self.token = token

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.baseUrl = iprot.readString().decode('utf-8', errors='replace') 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', errors='replace') 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('WebAuthDetails')
        if self.baseUrl is not None:
            oprot.writeFieldBegin('baseUrl', TType.STRING, 1)
            oprot.writeString(self.baseUrl.encode('utf-8') if sys.version_info[0] == 2 else self.baseUrl)
            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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

    """


    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, statusMessageContentMetadata=None, avatarProfile=None, nftProfile=None, pictureSource=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
        self.statusMessageContentMetadata = statusMessageContentMetadata
        self.avatarProfile = avatarProfile
        self.nftProfile = nftProfile
        self.pictureSource = pictureSource

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 36:
                if ftype == TType.MAP:
                    self.statusMessageContentMetadata = {}
                    (_ktype132, _vtype133, _size131) = iprot.readMapBegin()
                    for _i135 in range(_size131):
                        _key136 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val137 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.statusMessageContentMetadata[_key136] = _val137
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 37:
                if ftype == TType.STRUCT:
                    self.avatarProfile = AvatarProfile()
                    self.avatarProfile.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 38:
                if ftype == TType.BOOL:
                    self.nftProfile = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 39:
                if ftype == TType.I32:
                    self.pictureSource = 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('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()
        if self.statusMessageContentMetadata is not None:
            oprot.writeFieldBegin('statusMessageContentMetadata', TType.MAP, 36)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.statusMessageContentMetadata))
            for kiter138, viter139 in self.statusMessageContentMetadata.items():
                oprot.writeString(kiter138.encode('utf-8') if sys.version_info[0] == 2 else kiter138)
                oprot.writeString(viter139.encode('utf-8') if sys.version_info[0] == 2 else viter139)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.avatarProfile is not None:
            oprot.writeFieldBegin('avatarProfile', TType.STRUCT, 37)
            self.avatarProfile.write(oprot)
            oprot.writeFieldEnd()
        if self.nftProfile is not None:
            oprot.writeFieldBegin('nftProfile', TType.BOOL, 38)
            oprot.writeBool(self.nftProfile)
            oprot.writeFieldEnd()
        if self.pictureSource is not None:
            oprot.writeFieldBegin('pictureSource', TType.I32, 39)
            oprot.writeI32(self.pictureSource)
            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 AvatarProfile(object):
    """
    Attributes:
     - version
     - updatedMillis
     - thumbnail
     - usablePublicly

    """


    def __init__(self, version=None, updatedMillis=None, thumbnail=None, usablePublicly=None,):
        self.version = version
        self.updatedMillis = updatedMillis
        self.thumbnail = thumbnail
        self.usablePublicly = usablePublicly

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.updatedMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.thumbnail = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.usablePublicly = 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('AvatarProfile')
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.STRING, 1)
            oprot.writeString(self.version.encode('utf-8') if sys.version_info[0] == 2 else self.version)
            oprot.writeFieldEnd()
        if self.updatedMillis is not None:
            oprot.writeFieldBegin('updatedMillis', TType.I64, 2)
            oprot.writeI64(self.updatedMillis)
            oprot.writeFieldEnd()
        if self.thumbnail is not None:
            oprot.writeFieldBegin('thumbnail', TType.STRING, 3)
            oprot.writeString(self.thumbnail.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnail)
            oprot.writeFieldEnd()
        if self.usablePublicly is not None:
            oprot.writeFieldBegin('usablePublicly', TType.BOOL, 4)
            oprot.writeBool(self.usablePublicly)
            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

    """


    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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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 Message(object):
    """
    Attributes:
     - _from
     - to
     - toType
     - id
     - createdTime
     - deliveredTime
     - text
     - location
     - hasContent
     - contentType
     - contentPreview
     - contentMetadata
     - sessionId
     - chunks
     - relatedMessageId
     - messageRelationType
     - readCount
     - relatedMessageServiceCode
     - appExtensionType
     - reactions

    """


    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, appExtensionType=None, reactions=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
        self.appExtensionType = appExtensionType
        self.reactions = reactions

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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 = {}
                    (_ktype141, _vtype142, _size140) = iprot.readMapBegin()
                    for _i144 in range(_size140):
                        _key145 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val146 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.contentMetadata[_key145] = _val146
                    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 = []
                    (_etype150, _size147) = iprot.readListBegin()
                    for _i151 in range(_size147):
                        _elem152 = iprot.readBinary()
                        self.chunks.append(_elem152)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRING:
                    self.relatedMessageId = iprot.readString().decode('utf-8', errors='replace') 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)
            elif fid == 25:
                if ftype == TType.I32:
                    self.appExtensionType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 27:
                if ftype == TType.LIST:
                    self.reactions = []
                    (_etype156, _size153) = iprot.readListBegin()
                    for _i157 in range(_size153):
                        _elem158 = Reaction()
                        _elem158.read(iprot)
                        self.reactions.append(_elem158)
                    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('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 kiter159, viter160 in self.contentMetadata.items():
                oprot.writeString(kiter159.encode('utf-8') if sys.version_info[0] == 2 else kiter159)
                oprot.writeString(viter160.encode('utf-8') if sys.version_info[0] == 2 else viter160)
            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 iter161 in self.chunks:
                oprot.writeBinary(iter161)
            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()
        if self.appExtensionType is not None:
            oprot.writeFieldBegin('appExtensionType', TType.I32, 25)
            oprot.writeI32(self.appExtensionType)
            oprot.writeFieldEnd()
        if self.reactions is not None:
            oprot.writeFieldBegin('reactions', TType.LIST, 27)
            oprot.writeListBegin(TType.STRUCT, len(self.reactions))
            for iter162 in self.reactions:
                iter162.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 Reaction(object):
    """
    Attributes:
     - fromUserMid
     - atMillis
     - reactionType

    """


    def __init__(self, fromUserMid=None, atMillis=None, reactionType=None,):
        self.fromUserMid = fromUserMid
        self.atMillis = atMillis
        self.reactionType = reactionType

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.fromUserMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.atMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.reactionType = ReactionType()
                    self.reactionType.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('Reaction')
        if self.fromUserMid is not None:
            oprot.writeFieldBegin('fromUserMid', TType.STRING, 1)
            oprot.writeString(self.fromUserMid.encode('utf-8') if sys.version_info[0] == 2 else self.fromUserMid)
            oprot.writeFieldEnd()
        if self.atMillis is not None:
            oprot.writeFieldBegin('atMillis', TType.I64, 2)
            oprot.writeI64(self.atMillis)
            oprot.writeFieldEnd()
        if self.reactionType is not None:
            oprot.writeFieldBegin('reactionType', TType.STRUCT, 3)
            self.reactionType.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 ReactionType(object):
    """
    Attributes:
     - predefinedReactionType

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.predefinedReactionType = 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('ReactionType')
        if self.predefinedReactionType is not None:
            oprot.writeFieldBegin('predefinedReactionType', TType.I32, 1)
            oprot.writeI32(self.predefinedReactionType)
            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 ReactRequest(object):
    """
    Attributes:
     - reqSeq
     - messageId
     - reactionType

    """


    def __init__(self, reqSeq=None, messageId=None, reactionType=None,):
        self.reqSeq = reqSeq
        self.messageId = messageId
        self.reactionType = reactionType

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.I64:
                    self.messageId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.reactionType = ReactionType()
                    self.reactionType.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('ReactRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.I64, 2)
            oprot.writeI64(self.messageId)
            oprot.writeFieldEnd()
        if self.reactionType is not None:
            oprot.writeFieldBegin('reactionType', TType.STRUCT, 3)
            self.reactionType.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 Location(object):
    """
    Attributes:
     - title
     - address
     - latitude
     - longitude
     - phone
     - categoryId
     - provider
     - accuracy
     - altitudeMeters

    """


    def __init__(self, title=None, address=None, latitude=None, longitude=None, phone=None, categoryId=None, provider=None, accuracy=None, altitudeMeters=None,):
        self.title = title
        self.address = address
        self.latitude = latitude
        self.longitude = longitude
        self.phone = phone
        self.categoryId = categoryId
        self.provider = provider
        self.accuracy = accuracy
        self.altitudeMeters = altitudeMeters

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.categoryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.provider = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRUCT:
                    self.accuracy = GeolocationAccuracy()
                    self.accuracy.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.DOUBLE:
                    self.altitudeMeters = 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('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()
        if self.categoryId is not None:
            oprot.writeFieldBegin('categoryId', TType.STRING, 6)
            oprot.writeString(self.categoryId.encode('utf-8') if sys.version_info[0] == 2 else self.categoryId)
            oprot.writeFieldEnd()
        if self.provider is not None:
            oprot.writeFieldBegin('provider', TType.I32, 7)
            oprot.writeI32(self.provider)
            oprot.writeFieldEnd()
        if self.accuracy is not None:
            oprot.writeFieldBegin('accuracy', TType.STRUCT, 8)
            self.accuracy.write(oprot)
            oprot.writeFieldEnd()
        if self.altitudeMeters is not None:
            oprot.writeFieldBegin('altitudeMeters', TType.DOUBLE, 9)
            oprot.writeDouble(self.altitudeMeters)
            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 GeolocationAccuracy(object):
    """
    Attributes:
     - radiusMeters
     - radiusConfidence
     - altitudeAccuracy
     - velocityAccuracy
     - bearingAccuracy
     - accuracyMode

    """


    def __init__(self, radiusMeters=None, radiusConfidence=None, altitudeAccuracy=None, velocityAccuracy=None, bearingAccuracy=None, accuracyMode=None,):
        self.radiusMeters = radiusMeters
        self.radiusConfidence = radiusConfidence
        self.altitudeAccuracy = altitudeAccuracy
        self.velocityAccuracy = velocityAccuracy
        self.bearingAccuracy = bearingAccuracy
        self.accuracyMode = accuracyMode

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.radiusMeters = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.DOUBLE:
                    self.radiusConfidence = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.DOUBLE:
                    self.altitudeAccuracy = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.DOUBLE:
                    self.velocityAccuracy = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.DOUBLE:
                    self.bearingAccuracy = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.accuracyMode = 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('GeolocationAccuracy')
        if self.radiusMeters is not None:
            oprot.writeFieldBegin('radiusMeters', TType.DOUBLE, 1)
            oprot.writeDouble(self.radiusMeters)
            oprot.writeFieldEnd()
        if self.radiusConfidence is not None:
            oprot.writeFieldBegin('radiusConfidence', TType.DOUBLE, 2)
            oprot.writeDouble(self.radiusConfidence)
            oprot.writeFieldEnd()
        if self.altitudeAccuracy is not None:
            oprot.writeFieldBegin('altitudeAccuracy', TType.DOUBLE, 3)
            oprot.writeDouble(self.altitudeAccuracy)
            oprot.writeFieldEnd()
        if self.velocityAccuracy is not None:
            oprot.writeFieldBegin('velocityAccuracy', TType.DOUBLE, 4)
            oprot.writeDouble(self.velocityAccuracy)
            oprot.writeFieldEnd()
        if self.bearingAccuracy is not None:
            oprot.writeFieldBegin('bearingAccuracy', TType.DOUBLE, 5)
            oprot.writeDouble(self.bearingAccuracy)
            oprot.writeFieldEnd()
        if self.accuracyMode is not None:
            oprot.writeFieldBegin('accuracyMode', TType.I32, 6)
            oprot.writeI32(self.accuracyMode)
            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
     - statusMessageContentMetadata
     - avatarProfile
     - friendRingtone
     - friendRingbackTone
     - nftProfile
     - pictureSource

    """


    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, statusMessageContentMetadata=None, avatarProfile=None, friendRingtone=None, friendRingbackTone=None, nftProfile=None, pictureSource=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
        self.statusMessageContentMetadata = statusMessageContentMetadata
        self.avatarProfile = avatarProfile
        self.friendRingtone = friendRingtone
        self.friendRingbackTone = friendRingbackTone
        self.nftProfile = nftProfile
        self.pictureSource = pictureSource

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 43:
                if ftype == TType.MAP:
                    self.statusMessageContentMetadata = {}
                    (_ktype164, _vtype165, _size163) = iprot.readMapBegin()
                    for _i167 in range(_size163):
                        _key168 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val169 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.statusMessageContentMetadata[_key168] = _val169
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 44:
                if ftype == TType.STRUCT:
                    self.avatarProfile = AvatarProfile()
                    self.avatarProfile.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 45:
                if ftype == TType.STRING:
                    self.friendRingtone = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 46:
                if ftype == TType.STRING:
                    self.friendRingbackTone = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 47:
                if ftype == TType.BOOL:
                    self.nftProfile = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 48:
                if ftype == TType.I32:
                    self.pictureSource = 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('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()
        if self.statusMessageContentMetadata is not None:
            oprot.writeFieldBegin('statusMessageContentMetadata', TType.MAP, 43)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.statusMessageContentMetadata))
            for kiter170, viter171 in self.statusMessageContentMetadata.items():
                oprot.writeString(kiter170.encode('utf-8') if sys.version_info[0] == 2 else kiter170)
                oprot.writeString(viter171.encode('utf-8') if sys.version_info[0] == 2 else viter171)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.avatarProfile is not None:
            oprot.writeFieldBegin('avatarProfile', TType.STRUCT, 44)
            self.avatarProfile.write(oprot)
            oprot.writeFieldEnd()
        if self.friendRingtone is not None:
            oprot.writeFieldBegin('friendRingtone', TType.STRING, 45)
            oprot.writeString(self.friendRingtone.encode('utf-8') if sys.version_info[0] == 2 else self.friendRingtone)
            oprot.writeFieldEnd()
        if self.friendRingbackTone is not None:
            oprot.writeFieldBegin('friendRingbackTone', TType.STRING, 46)
            oprot.writeString(self.friendRingbackTone.encode('utf-8') if sys.version_info[0] == 2 else self.friendRingbackTone)
            oprot.writeFieldEnd()
        if self.nftProfile is not None:
            oprot.writeFieldBegin('nftProfile', TType.BOOL, 47)
            oprot.writeBool(self.nftProfile)
            oprot.writeFieldEnd()
        if self.pictureSource is not None:
            oprot.writeFieldBegin('pictureSource', TType.I32, 48)
            oprot.writeI32(self.pictureSource)
            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 GetContactsV2Request(object):
    """
    Attributes:
     - targetUserMids
     - neededContactCalendarEvents
     - withUserStatus

    """


    def __init__(self, targetUserMids=None, neededContactCalendarEvents=None, withUserStatus=None,):
        self.targetUserMids = targetUserMids
        self.neededContactCalendarEvents = neededContactCalendarEvents
        self.withUserStatus = withUserStatus

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.targetUserMids = []
                    (_etype175, _size172) = iprot.readListBegin()
                    for _i176 in range(_size172):
                        _elem177 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.targetUserMids.append(_elem177)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.SET:
                    self.neededContactCalendarEvents = set()
                    (_etype181, _size178) = iprot.readSetBegin()
                    for _i182 in range(_size178):
                        _elem183 = iprot.readI32()
                        self.neededContactCalendarEvents.add(_elem183)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.withUserStatus = 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('GetContactsV2Request')
        if self.targetUserMids is not None:
            oprot.writeFieldBegin('targetUserMids', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.targetUserMids))
            for iter184 in self.targetUserMids:
                oprot.writeString(iter184.encode('utf-8') if sys.version_info[0] == 2 else iter184)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.neededContactCalendarEvents is not None:
            oprot.writeFieldBegin('neededContactCalendarEvents', TType.SET, 2)
            oprot.writeSetBegin(TType.I32, len(self.neededContactCalendarEvents))
            for iter185 in self.neededContactCalendarEvents:
                oprot.writeI32(iter185)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.withUserStatus is not None:
            oprot.writeFieldBegin('withUserStatus', TType.BOOL, 3)
            oprot.writeBool(self.withUserStatus)
            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 GetContactsV2Response(object):
    """
    Attributes:
     - contacts

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.contacts = {}
                    (_ktype187, _vtype188, _size186) = iprot.readMapBegin()
                    for _i190 in range(_size186):
                        _key191 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val192 = ContactEntry()
                        _val192.read(iprot)
                        self.contacts[_key191] = _val192
                    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('GetContactsV2Response')
        if self.contacts is not None:
            oprot.writeFieldBegin('contacts', TType.MAP, 1)
            oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.contacts))
            for kiter193, viter194 in self.contacts.items():
                oprot.writeString(kiter193.encode('utf-8') if sys.version_info[0] == 2 else kiter193)
                viter194.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 ContactEntry(object):
    """
    Attributes:
     - userStatus
     - snapshotTimeMillis
     - contact
     - calendarEvents

    """


    def __init__(self, userStatus=None, snapshotTimeMillis=None, contact=None, calendarEvents=None,):
        self.userStatus = userStatus
        self.snapshotTimeMillis = snapshotTimeMillis
        self.contact = contact
        self.calendarEvents = calendarEvents

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.userStatus = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.snapshotTimeMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.contact = Contact()
                    self.contact.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.calendarEvents = ContactCalendarEvents()
                    self.calendarEvents.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('ContactEntry')
        if self.userStatus is not None:
            oprot.writeFieldBegin('userStatus', TType.I32, 1)
            oprot.writeI32(self.userStatus)
            oprot.writeFieldEnd()
        if self.snapshotTimeMillis is not None:
            oprot.writeFieldBegin('snapshotTimeMillis', TType.I64, 2)
            oprot.writeI64(self.snapshotTimeMillis)
            oprot.writeFieldEnd()
        if self.contact is not None:
            oprot.writeFieldBegin('contact', TType.STRUCT, 3)
            self.contact.write(oprot)
            oprot.writeFieldEnd()
        if self.calendarEvents is not None:
            oprot.writeFieldBegin('calendarEvents', TType.STRUCT, 4)
            self.calendarEvents.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 ContactCalendarEvents(object):
    """
    Attributes:
     - events

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.events = {}
                    (_ktype196, _vtype197, _size195) = iprot.readMapBegin()
                    for _i199 in range(_size195):
                        _key200 = iprot.readI32()
                        _val201 = ContactCalendarEvent()
                        _val201.read(iprot)
                        self.events[_key200] = _val201
                    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('ContactCalendarEvents')
        if self.events is not None:
            oprot.writeFieldBegin('events', TType.MAP, 1)
            oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.events))
            for kiter202, viter203 in self.events.items():
                oprot.writeI32(kiter202)
                viter203.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 ContactCalendarEvent(object):
    """
    Attributes:
     - id
     - state
     - year
     - month
     - day

    """


    def __init__(self, id=None, state=None, year=None, month=None, day=None,):
        self.id = id
        self.state = state
        self.year = year
        self.month = month
        self.day = day

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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.year = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.month = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.day = 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('ContactCalendarEvent')
        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.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 2)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.year is not None:
            oprot.writeFieldBegin('year', TType.I32, 3)
            oprot.writeI32(self.year)
            oprot.writeFieldEnd()
        if self.month is not None:
            oprot.writeFieldBegin('month', TType.I32, 4)
            oprot.writeI32(self.month)
            oprot.writeFieldEnd()
        if self.day is not None:
            oprot.writeFieldBegin('day', TType.I32, 5)
            oprot.writeI32(self.day)
            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 Configurations(object):
    """
    Attributes:
     - revision
     - configMap

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.MAP:
                    self.configMap = {}
                    (_ktype205, _vtype206, _size204) = iprot.readMapBegin()
                    for _i208 in range(_size204):
                        _key209 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val210 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.configMap[_key209] = _val210
                    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('Configurations')
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 1)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.configMap is not None:
            oprot.writeFieldBegin('configMap', TType.MAP, 2)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.configMap))
            for kiter211, viter212 in self.configMap.items():
                oprot.writeString(kiter211.encode('utf-8') if sys.version_info[0] == 2 else kiter211)
                oprot.writeString(viter212.encode('utf-8') if sys.version_info[0] == 2 else viter212)
            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 E2EEPublicKey(object):
    """
    Attributes:
     - version
     - keyId
     - keyData
     - createdTime

    """


    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 RSAKey(object):
    """
    Attributes:
     - keynm
     - nvalue
     - evalue
     - sessionKey

    """


    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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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 Settings(object):
    """
    Attributes:
     - notificationEnable
     - notificationMuteExpiration
     - notificationNewMessage
     - notificationGroupInvitation
     - notificationShowMessage
     - notificationIncomingCall
     - notificationSoundMessage
     - notificationSoundGroup
     - notificationDisabledWithSub
     - notificationPayment
     - privacySyncContacts
     - privacySearchByPhoneNumber
     - privacySearchByUserid
     - privacySearchByEmail
     - privacyAllowSecondaryDeviceLogin
     - privacyProfileImagePostToMyhome
     - privacyReceiveMessagesFromNotFriend
     - privacyAgreeUseLineCoinToPaidCall
     - privacyAgreeUsePaidCall
     - privacyAllowFriendRequest
     - contactMyTicket
     - identityProvider
     - identityIdentifier
     - snsAccounts
     - phoneRegistration
     - emailConfirmationStatus
     - accountMigrationPincodeType
     - enforcedInputAccountMigrationPincode
     - securityCenterSettingsType
     - allowUnregistrationSecondaryDevice
     - pwlessPrimaryCredentialRegistration
     - preferenceLocale
     - customModes
     - e2eeEnable
     - hitokotoBackupRequested
     - privacyProfileMusicPostToMyhome
     - privacyAllowNearby
     - agreementNearbyTime
     - agreementSquareTime
     - notificationMention
     - botUseAgreementAcceptedAt
     - agreementShakeFunction
     - agreementMobileContactName
     - agreementSoundToText
     - privacyPolicyVersion
     - agreementAdByWebAccess
     - agreementPhoneNumberMatching
     - agreementCommunicationInfo
     - privacySharePersonalInfoToFriends
     - agreementThingsWirelessCommunication
     - agreementGdpr
     - privacyStatusMessageHistory
     - agreementProvideLocation
     - agreementBeacon
     - privacyAllowProfileHistory
     - agreementContentsSuggest
     - agreementContentsSuggestDataCollection
     - privacyAgeResult
     - privacyAgeResultReceived
     - notificationThumbnail
     - agreementOcrImageCollection
     - privacyAllowFollow
     - privacyShowFollowList
     - notificationBadgeTalkOnly
     - agreementIcna
     - notificationReaction
     - agreementMid
     - homeNotificationNewFriend
     - homeNotificationFavoriteFriendUpdate
     - homeNotificationGroupMemberUpdate
     - homeNotificationBirthday
     - eapAllowedToConnect
     - agreementLineOutUse
     - agreementLineOutProvideInfo
     - notificationShowProfileImage
     - agreementPdpa
     - agreementLocationVersion
     - zhdPageAllowedToShow

    """


    def __init__(self, notificationEnable=None, notificationMuteExpiration=None, notificationNewMessage=None, notificationGroupInvitation=None, notificationShowMessage=None, notificationIncomingCall=None, notificationSoundMessage=None, notificationSoundGroup=None, notificationDisabledWithSub=None, notificationPayment=None, privacySyncContacts=None, privacySearchByPhoneNumber=None, privacySearchByUserid=None, privacySearchByEmail=None, privacyAllowSecondaryDeviceLogin=None, privacyProfileImagePostToMyhome=None, privacyReceiveMessagesFromNotFriend=None, privacyAgreeUseLineCoinToPaidCall=None, privacyAgreeUsePaidCall=None, privacyAllowFriendRequest=None, contactMyTicket=None, identityProvider=None, identityIdentifier=None, snsAccounts=None, phoneRegistration=None, emailConfirmationStatus=None, accountMigrationPincodeType=None, enforcedInputAccountMigrationPincode=None, securityCenterSettingsType=None, allowUnregistrationSecondaryDevice=None, pwlessPrimaryCredentialRegistration=None, preferenceLocale=None, customModes=None, e2eeEnable=None, hitokotoBackupRequested=None, privacyProfileMusicPostToMyhome=None, privacyAllowNearby=None, agreementNearbyTime=None, agreementSquareTime=None, notificationMention=None, botUseAgreementAcceptedAt=None, agreementShakeFunction=None, agreementMobileContactName=None, agreementSoundToText=None, privacyPolicyVersion=None, agreementAdByWebAccess=None, agreementPhoneNumberMatching=None, agreementCommunicationInfo=None, privacySharePersonalInfoToFriends=None, agreementThingsWirelessCommunication=None, agreementGdpr=None, privacyStatusMessageHistory=None, agreementProvideLocation=None, agreementBeacon=None, privacyAllowProfileHistory=None, agreementContentsSuggest=None, agreementContentsSuggestDataCollection=None, privacyAgeResult=None, privacyAgeResultReceived=None, notificationThumbnail=None, agreementOcrImageCollection=None, privacyAllowFollow=None, privacyShowFollowList=None, notificationBadgeTalkOnly=None, agreementIcna=None, notificationReaction=None, agreementMid=None, homeNotificationNewFriend=None, homeNotificationFavoriteFriendUpdate=None, homeNotificationGroupMemberUpdate=None, homeNotificationBirthday=None, eapAllowedToConnect=None, agreementLineOutUse=None, agreementLineOutProvideInfo=None, notificationShowProfileImage=None, agreementPdpa=None, agreementLocationVersion=None, zhdPageAllowedToShow=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.notificationPayment = notificationPayment
        self.privacySyncContacts = privacySyncContacts
        self.privacySearchByPhoneNumber = privacySearchByPhoneNumber
        self.privacySearchByUserid = privacySearchByUserid
        self.privacySearchByEmail = privacySearchByEmail
        self.privacyAllowSecondaryDeviceLogin = privacyAllowSecondaryDeviceLogin
        self.privacyProfileImagePostToMyhome = privacyProfileImagePostToMyhome
        self.privacyReceiveMessagesFromNotFriend = privacyReceiveMessagesFromNotFriend
        self.privacyAgreeUseLineCoinToPaidCall = privacyAgreeUseLineCoinToPaidCall
        self.privacyAgreeUsePaidCall = privacyAgreeUsePaidCall
        self.privacyAllowFriendRequest = privacyAllowFriendRequest
        self.contactMyTicket = contactMyTicket
        self.identityProvider = identityProvider
        self.identityIdentifier = identityIdentifier
        self.snsAccounts = snsAccounts
        self.phoneRegistration = phoneRegistration
        self.emailConfirmationStatus = emailConfirmationStatus
        self.accountMigrationPincodeType = accountMigrationPincodeType
        self.enforcedInputAccountMigrationPincode = enforcedInputAccountMigrationPincode
        self.securityCenterSettingsType = securityCenterSettingsType
        self.allowUnregistrationSecondaryDevice = allowUnregistrationSecondaryDevice
        self.pwlessPrimaryCredentialRegistration = pwlessPrimaryCredentialRegistration
        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
        self.agreementShakeFunction = agreementShakeFunction
        self.agreementMobileContactName = agreementMobileContactName
        self.agreementSoundToText = agreementSoundToText
        self.privacyPolicyVersion = privacyPolicyVersion
        self.agreementAdByWebAccess = agreementAdByWebAccess
        self.agreementPhoneNumberMatching = agreementPhoneNumberMatching
        self.agreementCommunicationInfo = agreementCommunicationInfo
        self.privacySharePersonalInfoToFriends = privacySharePersonalInfoToFriends
        self.agreementThingsWirelessCommunication = agreementThingsWirelessCommunication
        self.agreementGdpr = agreementGdpr
        self.privacyStatusMessageHistory = privacyStatusMessageHistory
        self.agreementProvideLocation = agreementProvideLocation
        self.agreementBeacon = agreementBeacon
        self.privacyAllowProfileHistory = privacyAllowProfileHistory
        self.agreementContentsSuggest = agreementContentsSuggest
        self.agreementContentsSuggestDataCollection = agreementContentsSuggestDataCollection
        self.privacyAgeResult = privacyAgeResult
        self.privacyAgeResultReceived = privacyAgeResultReceived
        self.notificationThumbnail = notificationThumbnail
        self.agreementOcrImageCollection = agreementOcrImageCollection
        self.privacyAllowFollow = privacyAllowFollow
        self.privacyShowFollowList = privacyShowFollowList
        self.notificationBadgeTalkOnly = notificationBadgeTalkOnly
        self.agreementIcna = agreementIcna
        self.notificationReaction = notificationReaction
        self.agreementMid = agreementMid
        self.homeNotificationNewFriend = homeNotificationNewFriend
        self.homeNotificationFavoriteFriendUpdate = homeNotificationFavoriteFriendUpdate
        self.homeNotificationGroupMemberUpdate = homeNotificationGroupMemberUpdate
        self.homeNotificationBirthday = homeNotificationBirthday
        self.eapAllowedToConnect = eapAllowedToConnect
        self.agreementLineOutUse = agreementLineOutUse
        self.agreementLineOutProvideInfo = agreementLineOutProvideInfo
        self.notificationShowProfileImage = notificationShowProfileImage
        self.agreementPdpa = agreementPdpa
        self.agreementLocationVersion = agreementLocationVersion
        self.zhdPageAllowedToShow = zhdPageAllowedToShow

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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 == 19:
                if ftype == TType.BOOL:
                    self.notificationPayment = 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 == 27:
                if ftype == TType.BOOL:
                    self.privacyAgreeUseLineCoinToPaidCall = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 28:
                if ftype == TType.BOOL:
                    self.privacyAgreeUsePaidCall = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 29:
                if ftype == TType.BOOL:
                    self.privacyAllowFriendRequest = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 30:
                if ftype == TType.STRING:
                    self.contactMyTicket = iprot.readString().decode('utf-8', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 42:
                if ftype == TType.MAP:
                    self.snsAccounts = {}
                    (_ktype214, _vtype215, _size213) = iprot.readMapBegin()
                    for _i217 in range(_size213):
                        _key218 = iprot.readI32()
                        _val219 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.snsAccounts[_key218] = _val219
                    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 == 45:
                if ftype == TType.I32:
                    self.accountMigrationPincodeType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 46:
                if ftype == TType.BOOL:
                    self.enforcedInputAccountMigrationPincode = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 47:
                if ftype == TType.I32:
                    self.securityCenterSettingsType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 48:
                if ftype == TType.BOOL:
                    self.allowUnregistrationSecondaryDevice = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 49:
                if ftype == TType.BOOL:
                    self.pwlessPrimaryCredentialRegistration = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 50:
                if ftype == TType.STRING:
                    self.preferenceLocale = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 60:
                if ftype == TType.MAP:
                    self.customModes = {}
                    (_ktype221, _vtype222, _size220) = iprot.readMapBegin()
                    for _i224 in range(_size220):
                        _key225 = iprot.readI32()
                        _val226 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.customModes[_key225] = _val226
                    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)
            elif fid == 70:
                if ftype == TType.I64:
                    self.agreementShakeFunction = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 71:
                if ftype == TType.I64:
                    self.agreementMobileContactName = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 73:
                if ftype == TType.I64:
                    self.agreementSoundToText = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 74:
                if ftype == TType.STRING:
                    self.privacyPolicyVersion = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 75:
                if ftype == TType.I64:
                    self.agreementAdByWebAccess = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 76:
                if ftype == TType.I64:
                    self.agreementPhoneNumberMatching = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 77:
                if ftype == TType.I64:
                    self.agreementCommunicationInfo = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 78:
                if ftype == TType.I32:
                    self.privacySharePersonalInfoToFriends = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 79:
                if ftype == TType.I64:
                    self.agreementThingsWirelessCommunication = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 80:
                if ftype == TType.I64:
                    self.agreementGdpr = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 81:
                if ftype == TType.I32:
                    self.privacyStatusMessageHistory = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 82:
                if ftype == TType.I64:
                    self.agreementProvideLocation = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 83:
                if ftype == TType.I64:
                    self.agreementBeacon = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 85:
                if ftype == TType.I32:
                    self.privacyAllowProfileHistory = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 86:
                if ftype == TType.I64:
                    self.agreementContentsSuggest = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 87:
                if ftype == TType.I64:
                    self.agreementContentsSuggestDataCollection = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 88:
                if ftype == TType.I32:
                    self.privacyAgeResult = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 89:
                if ftype == TType.BOOL:
                    self.privacyAgeResultReceived = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 72:
                if ftype == TType.BOOL:
                    self.notificationThumbnail = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 90:
                if ftype == TType.I64:
                    self.agreementOcrImageCollection = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 91:
                if ftype == TType.BOOL:
                    self.privacyAllowFollow = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 92:
                if ftype == TType.BOOL:
                    self.privacyShowFollowList = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 93:
                if ftype == TType.BOOL:
                    self.notificationBadgeTalkOnly = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 94:
                if ftype == TType.I64:
                    self.agreementIcna = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 95:
                if ftype == TType.BOOL:
                    self.notificationReaction = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 96:
                if ftype == TType.I64:
                    self.agreementMid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 97:
                if ftype == TType.BOOL:
                    self.homeNotificationNewFriend = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 98:
                if ftype == TType.BOOL:
                    self.homeNotificationFavoriteFriendUpdate = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 99:
                if ftype == TType.BOOL:
                    self.homeNotificationGroupMemberUpdate = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 100:
                if ftype == TType.BOOL:
                    self.homeNotificationBirthday = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 101:
                if ftype == TType.MAP:
                    self.eapAllowedToConnect = {}
                    (_ktype228, _vtype229, _size227) = iprot.readMapBegin()
                    for _i231 in range(_size227):
                        _key232 = iprot.readI32()
                        _val233 = iprot.readBool()
                        self.eapAllowedToConnect[_key232] = _val233
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 102:
                if ftype == TType.I64:
                    self.agreementLineOutUse = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 103:
                if ftype == TType.I64:
                    self.agreementLineOutProvideInfo = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 104:
                if ftype == TType.BOOL:
                    self.notificationShowProfileImage = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 105:
                if ftype == TType.I64:
                    self.agreementPdpa = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 106:
                if ftype == TType.STRING:
                    self.agreementLocationVersion = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 107:
                if ftype == TType.BOOL:
                    self.zhdPageAllowedToShow = 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('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.notificationPayment is not None:
            oprot.writeFieldBegin('notificationPayment', TType.BOOL, 19)
            oprot.writeBool(self.notificationPayment)
            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.privacyAgreeUseLineCoinToPaidCall is not None:
            oprot.writeFieldBegin('privacyAgreeUseLineCoinToPaidCall', TType.BOOL, 27)
            oprot.writeBool(self.privacyAgreeUseLineCoinToPaidCall)
            oprot.writeFieldEnd()
        if self.privacyAgreeUsePaidCall is not None:
            oprot.writeFieldBegin('privacyAgreeUsePaidCall', TType.BOOL, 28)
            oprot.writeBool(self.privacyAgreeUsePaidCall)
            oprot.writeFieldEnd()
        if self.privacyAllowFriendRequest is not None:
            oprot.writeFieldBegin('privacyAllowFriendRequest', TType.BOOL, 29)
            oprot.writeBool(self.privacyAllowFriendRequest)
            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 kiter234, viter235 in self.snsAccounts.items():
                oprot.writeI32(kiter234)
                oprot.writeString(viter235.encode('utf-8') if sys.version_info[0] == 2 else viter235)
            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.accountMigrationPincodeType is not None:
            oprot.writeFieldBegin('accountMigrationPincodeType', TType.I32, 45)
            oprot.writeI32(self.accountMigrationPincodeType)
            oprot.writeFieldEnd()
        if self.enforcedInputAccountMigrationPincode is not None:
            oprot.writeFieldBegin('enforcedInputAccountMigrationPincode', TType.BOOL, 46)
            oprot.writeBool(self.enforcedInputAccountMigrationPincode)
            oprot.writeFieldEnd()
        if self.securityCenterSettingsType is not None:
            oprot.writeFieldBegin('securityCenterSettingsType', TType.I32, 47)
            oprot.writeI32(self.securityCenterSettingsType)
            oprot.writeFieldEnd()
        if self.allowUnregistrationSecondaryDevice is not None:
            oprot.writeFieldBegin('allowUnregistrationSecondaryDevice', TType.BOOL, 48)
            oprot.writeBool(self.allowUnregistrationSecondaryDevice)
            oprot.writeFieldEnd()
        if self.pwlessPrimaryCredentialRegistration is not None:
            oprot.writeFieldBegin('pwlessPrimaryCredentialRegistration', TType.BOOL, 49)
            oprot.writeBool(self.pwlessPrimaryCredentialRegistration)
            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 kiter236, viter237 in self.customModes.items():
                oprot.writeI32(kiter236)
                oprot.writeString(viter237.encode('utf-8') if sys.version_info[0] == 2 else viter237)
            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()
        if self.agreementShakeFunction is not None:
            oprot.writeFieldBegin('agreementShakeFunction', TType.I64, 70)
            oprot.writeI64(self.agreementShakeFunction)
            oprot.writeFieldEnd()
        if self.agreementMobileContactName is not None:
            oprot.writeFieldBegin('agreementMobileContactName', TType.I64, 71)
            oprot.writeI64(self.agreementMobileContactName)
            oprot.writeFieldEnd()
        if self.notificationThumbnail is not None:
            oprot.writeFieldBegin('notificationThumbnail', TType.BOOL, 72)
            oprot.writeBool(self.notificationThumbnail)
            oprot.writeFieldEnd()
        if self.agreementSoundToText is not None:
            oprot.writeFieldBegin('agreementSoundToText', TType.I64, 73)
            oprot.writeI64(self.agreementSoundToText)
            oprot.writeFieldEnd()
        if self.privacyPolicyVersion is not None:
            oprot.writeFieldBegin('privacyPolicyVersion', TType.STRING, 74)
            oprot.writeString(self.privacyPolicyVersion.encode('utf-8') if sys.version_info[0] == 2 else self.privacyPolicyVersion)
            oprot.writeFieldEnd()
        if self.agreementAdByWebAccess is not None:
            oprot.writeFieldBegin('agreementAdByWebAccess', TType.I64, 75)
            oprot.writeI64(self.agreementAdByWebAccess)
            oprot.writeFieldEnd()
        if self.agreementPhoneNumberMatching is not None:
            oprot.writeFieldBegin('agreementPhoneNumberMatching', TType.I64, 76)
            oprot.writeI64(self.agreementPhoneNumberMatching)
            oprot.writeFieldEnd()
        if self.agreementCommunicationInfo is not None:
            oprot.writeFieldBegin('agreementCommunicationInfo', TType.I64, 77)
            oprot.writeI64(self.agreementCommunicationInfo)
            oprot.writeFieldEnd()
        if self.privacySharePersonalInfoToFriends is not None:
            oprot.writeFieldBegin('privacySharePersonalInfoToFriends', TType.I32, 78)
            oprot.writeI32(self.privacySharePersonalInfoToFriends)
            oprot.writeFieldEnd()
        if self.agreementThingsWirelessCommunication is not None:
            oprot.writeFieldBegin('agreementThingsWirelessCommunication', TType.I64, 79)
            oprot.writeI64(self.agreementThingsWirelessCommunication)
            oprot.writeFieldEnd()
        if self.agreementGdpr is not None:
            oprot.writeFieldBegin('agreementGdpr', TType.I64, 80)
            oprot.writeI64(self.agreementGdpr)
            oprot.writeFieldEnd()
        if self.privacyStatusMessageHistory is not None:
            oprot.writeFieldBegin('privacyStatusMessageHistory', TType.I32, 81)
            oprot.writeI32(self.privacyStatusMessageHistory)
            oprot.writeFieldEnd()
        if self.agreementProvideLocation is not None:
            oprot.writeFieldBegin('agreementProvideLocation', TType.I64, 82)
            oprot.writeI64(self.agreementProvideLocation)
            oprot.writeFieldEnd()
        if self.agreementBeacon is not None:
            oprot.writeFieldBegin('agreementBeacon', TType.I64, 83)
            oprot.writeI64(self.agreementBeacon)
            oprot.writeFieldEnd()
        if self.privacyAllowProfileHistory is not None:
            oprot.writeFieldBegin('privacyAllowProfileHistory', TType.I32, 85)
            oprot.writeI32(self.privacyAllowProfileHistory)
            oprot.writeFieldEnd()
        if self.agreementContentsSuggest is not None:
            oprot.writeFieldBegin('agreementContentsSuggest', TType.I64, 86)
            oprot.writeI64(self.agreementContentsSuggest)
            oprot.writeFieldEnd()
        if self.agreementContentsSuggestDataCollection is not None:
            oprot.writeFieldBegin('agreementContentsSuggestDataCollection', TType.I64, 87)
            oprot.writeI64(self.agreementContentsSuggestDataCollection)
            oprot.writeFieldEnd()
        if self.privacyAgeResult is not None:
            oprot.writeFieldBegin('privacyAgeResult', TType.I32, 88)
            oprot.writeI32(self.privacyAgeResult)
            oprot.writeFieldEnd()
        if self.privacyAgeResultReceived is not None:
            oprot.writeFieldBegin('privacyAgeResultReceived', TType.BOOL, 89)
            oprot.writeBool(self.privacyAgeResultReceived)
            oprot.writeFieldEnd()
        if self.agreementOcrImageCollection is not None:
            oprot.writeFieldBegin('agreementOcrImageCollection', TType.I64, 90)
            oprot.writeI64(self.agreementOcrImageCollection)
            oprot.writeFieldEnd()
        if self.privacyAllowFollow is not None:
            oprot.writeFieldBegin('privacyAllowFollow', TType.BOOL, 91)
            oprot.writeBool(self.privacyAllowFollow)
            oprot.writeFieldEnd()
        if self.privacyShowFollowList is not None:
            oprot.writeFieldBegin('privacyShowFollowList', TType.BOOL, 92)
            oprot.writeBool(self.privacyShowFollowList)
            oprot.writeFieldEnd()
        if self.notificationBadgeTalkOnly is not None:
            oprot.writeFieldBegin('notificationBadgeTalkOnly', TType.BOOL, 93)
            oprot.writeBool(self.notificationBadgeTalkOnly)
            oprot.writeFieldEnd()
        if self.agreementIcna is not None:
            oprot.writeFieldBegin('agreementIcna', TType.I64, 94)
            oprot.writeI64(self.agreementIcna)
            oprot.writeFieldEnd()
        if self.notificationReaction is not None:
            oprot.writeFieldBegin('notificationReaction', TType.BOOL, 95)
            oprot.writeBool(self.notificationReaction)
            oprot.writeFieldEnd()
        if self.agreementMid is not None:
            oprot.writeFieldBegin('agreementMid', TType.I64, 96)
            oprot.writeI64(self.agreementMid)
            oprot.writeFieldEnd()
        if self.homeNotificationNewFriend is not None:
            oprot.writeFieldBegin('homeNotificationNewFriend', TType.BOOL, 97)
            oprot.writeBool(self.homeNotificationNewFriend)
            oprot.writeFieldEnd()
        if self.homeNotificationFavoriteFriendUpdate is not None:
            oprot.writeFieldBegin('homeNotificationFavoriteFriendUpdate', TType.BOOL, 98)
            oprot.writeBool(self.homeNotificationFavoriteFriendUpdate)
            oprot.writeFieldEnd()
        if self.homeNotificationGroupMemberUpdate is not None:
            oprot.writeFieldBegin('homeNotificationGroupMemberUpdate', TType.BOOL, 99)
            oprot.writeBool(self.homeNotificationGroupMemberUpdate)
            oprot.writeFieldEnd()
        if self.homeNotificationBirthday is not None:
            oprot.writeFieldBegin('homeNotificationBirthday', TType.BOOL, 100)
            oprot.writeBool(self.homeNotificationBirthday)
            oprot.writeFieldEnd()
        if self.eapAllowedToConnect is not None:
            oprot.writeFieldBegin('eapAllowedToConnect', TType.MAP, 101)
            oprot.writeMapBegin(TType.I32, TType.BOOL, len(self.eapAllowedToConnect))
            for kiter238, viter239 in self.eapAllowedToConnect.items():
                oprot.writeI32(kiter238)
                oprot.writeBool(viter239)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.agreementLineOutUse is not None:
            oprot.writeFieldBegin('agreementLineOutUse', TType.I64, 102)
            oprot.writeI64(self.agreementLineOutUse)
            oprot.writeFieldEnd()
        if self.agreementLineOutProvideInfo is not None:
            oprot.writeFieldBegin('agreementLineOutProvideInfo', TType.I64, 103)
            oprot.writeI64(self.agreementLineOutProvideInfo)
            oprot.writeFieldEnd()
        if self.notificationShowProfileImage is not None:
            oprot.writeFieldBegin('notificationShowProfileImage', TType.BOOL, 104)
            oprot.writeBool(self.notificationShowProfileImage)
            oprot.writeFieldEnd()
        if self.agreementPdpa is not None:
            oprot.writeFieldBegin('agreementPdpa', TType.I64, 105)
            oprot.writeI64(self.agreementPdpa)
            oprot.writeFieldEnd()
        if self.agreementLocationVersion is not None:
            oprot.writeFieldBegin('agreementLocationVersion', TType.STRING, 106)
            oprot.writeString(self.agreementLocationVersion.encode('utf-8') if sys.version_info[0] == 2 else self.agreementLocationVersion)
            oprot.writeFieldEnd()
        if self.zhdPageAllowedToShow is not None:
            oprot.writeFieldBegin('zhdPageAllowedToShow', TType.BOOL, 107)
            oprot.writeBool(self.zhdPageAllowedToShow)
            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
     - specVersion

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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()
                    (_etype243, _size240) = iprot.readSetBegin()
                    for _i244 in range(_size240):
                        _elem245 = iprot.readI32()
                        self.allowedTypes.add(_elem245)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.publicKey = E2EEPublicKey()
                    self.publicKey.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.specVersion = 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('E2EENegotiationResult')
        if self.allowedTypes is not None:
            oprot.writeFieldBegin('allowedTypes', TType.SET, 1)
            oprot.writeSetBegin(TType.I32, len(self.allowedTypes))
            for iter246 in self.allowedTypes:
                oprot.writeI32(iter246)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.publicKey is not None:
            oprot.writeFieldBegin('publicKey', TType.STRUCT, 2)
            self.publicKey.write(oprot)
            oprot.writeFieldEnd()
        if self.specVersion is not None:
            oprot.writeFieldBegin('specVersion', TType.I32, 3)
            oprot.writeI32(self.specVersion)
            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

    """


    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', errors='replace') 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', errors='replace') 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 E2EEGroupSharedKey(object):
    """
    Attributes:
     - keyVersion
     - groupKeyId
     - creator
     - creatorKeyId
     - receiver
     - receiverKeyId
     - encryptedSharedKey
     - allowedTypes
     - specVersion

    """


    def __init__(self, keyVersion=None, groupKeyId=None, creator=None, creatorKeyId=None, receiver=None, receiverKeyId=None, encryptedSharedKey=None, allowedTypes=None, specVersion=None,):
        self.keyVersion = keyVersion
        self.groupKeyId = groupKeyId
        self.creator = creator
        self.creatorKeyId = creatorKeyId
        self.receiver = receiver
        self.receiverKeyId = receiverKeyId
        self.encryptedSharedKey = encryptedSharedKey
        self.allowedTypes = allowedTypes
        self.specVersion = specVersion

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.keyVersion = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.groupKeyId = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.creator = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.creatorKeyId = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.receiver = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.receiverKeyId = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.encryptedSharedKey = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.SET:
                    self.allowedTypes = set()
                    (_etype250, _size247) = iprot.readSetBegin()
                    for _i251 in range(_size247):
                        _elem252 = iprot.readI32()
                        self.allowedTypes.add(_elem252)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I32:
                    self.specVersion = 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('E2EEGroupSharedKey')
        if self.keyVersion is not None:
            oprot.writeFieldBegin('keyVersion', TType.I32, 1)
            oprot.writeI32(self.keyVersion)
            oprot.writeFieldEnd()
        if self.groupKeyId is not None:
            oprot.writeFieldBegin('groupKeyId', TType.I32, 2)
            oprot.writeI32(self.groupKeyId)
            oprot.writeFieldEnd()
        if self.creator is not None:
            oprot.writeFieldBegin('creator', TType.STRING, 3)
            oprot.writeString(self.creator.encode('utf-8') if sys.version_info[0] == 2 else self.creator)
            oprot.writeFieldEnd()
        if self.creatorKeyId is not None:
            oprot.writeFieldBegin('creatorKeyId', TType.I32, 4)
            oprot.writeI32(self.creatorKeyId)
            oprot.writeFieldEnd()
        if self.receiver is not None:
            oprot.writeFieldBegin('receiver', TType.STRING, 5)
            oprot.writeString(self.receiver.encode('utf-8') if sys.version_info[0] == 2 else self.receiver)
            oprot.writeFieldEnd()
        if self.receiverKeyId is not None:
            oprot.writeFieldBegin('receiverKeyId', TType.I32, 6)
            oprot.writeI32(self.receiverKeyId)
            oprot.writeFieldEnd()
        if self.encryptedSharedKey is not None:
            oprot.writeFieldBegin('encryptedSharedKey', TType.STRING, 7)
            oprot.writeBinary(self.encryptedSharedKey)
            oprot.writeFieldEnd()
        if self.allowedTypes is not None:
            oprot.writeFieldBegin('allowedTypes', TType.SET, 8)
            oprot.writeSetBegin(TType.I32, len(self.allowedTypes))
            for iter253 in self.allowedTypes:
                oprot.writeI32(iter253)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.specVersion is not None:
            oprot.writeFieldBegin('specVersion', TType.I32, 9)
            oprot.writeI32(self.specVersion)
            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
     - callerIdMask

    """


    def __init__(self, sessionId=None, method=None, callback=None, normalizedPhone=None, countryCode=None, nationalSignificantNumber=None, availableVerificationMethods=None, callerIdMask=None,):
        self.sessionId = sessionId
        self.method = method
        self.callback = callback
        self.normalizedPhone = normalizedPhone
        self.countryCode = countryCode
        self.nationalSignificantNumber = nationalSignificantNumber
        self.availableVerificationMethods = availableVerificationMethods
        self.callerIdMask = callerIdMask

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.LIST:
                    self.availableVerificationMethods = []
                    (_etype257, _size254) = iprot.readListBegin()
                    for _i258 in range(_size254):
                        _elem259 = iprot.readI32()
                        self.availableVerificationMethods.append(_elem259)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.callerIdMask = iprot.readString().decode('utf-8', errors='replace') 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('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 iter260 in self.availableVerificationMethods:
                oprot.writeI32(iter260)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.callerIdMask is not None:
            oprot.writeFieldBegin('callerIdMask', TType.STRING, 8)
            oprot.writeString(self.callerIdMask.encode('utf-8') if sys.version_info[0] == 2 else self.callerIdMask)
            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 FollowRequest(object):
    """
    Attributes:
     - followMid

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.followMid = FollowMid()
                    self.followMid.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('FollowRequest')
        if self.followMid is not None:
            oprot.writeFieldBegin('followMid', TType.STRUCT, 1)
            self.followMid.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 FollowMid(object):
    """
    Attributes:
     - mid
     - eMid

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.eMid = iprot.readString().decode('utf-8', errors='replace') 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('FollowMid')
        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.eMid is not None:
            oprot.writeFieldBegin('eMid', TType.STRING, 2)
            oprot.writeString(self.eMid.encode('utf-8') if sys.version_info[0] == 2 else self.eMid)
            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 UnfollowRequest(object):
    """
    Attributes:
     - followMid

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.followMid = FollowMid()
                    self.followMid.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('UnfollowRequest')
        if self.followMid is not None:
            oprot.writeFieldBegin('followMid', TType.STRUCT, 1)
            self.followMid.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 Ticket(object):
    """
    Attributes:
     - id
     - expirationTime
     - maxUseCount

    """


    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', errors='replace') 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 GetChatsRequest(object):
    """
    Attributes:
     - chatMids
     - withMembers
     - withInvitees

    """


    def __init__(self, chatMids=None, withMembers=None, withInvitees=None,):
        self.chatMids = chatMids
        self.withMembers = withMembers
        self.withInvitees = withInvitees

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chatMids = []
                    (_etype264, _size261) = iprot.readListBegin()
                    for _i265 in range(_size261):
                        _elem266 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.chatMids.append(_elem266)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.withMembers = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.withInvitees = 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('GetChatsRequest')
        if self.chatMids is not None:
            oprot.writeFieldBegin('chatMids', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.chatMids))
            for iter267 in self.chatMids:
                oprot.writeString(iter267.encode('utf-8') if sys.version_info[0] == 2 else iter267)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.withMembers is not None:
            oprot.writeFieldBegin('withMembers', TType.BOOL, 2)
            oprot.writeBool(self.withMembers)
            oprot.writeFieldEnd()
        if self.withInvitees is not None:
            oprot.writeFieldBegin('withInvitees', TType.BOOL, 3)
            oprot.writeBool(self.withInvitees)
            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 GetChatsResponse(object):
    """
    Attributes:
     - chats

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chats = []
                    (_etype271, _size268) = iprot.readListBegin()
                    for _i272 in range(_size268):
                        _elem273 = Chat()
                        _elem273.read(iprot)
                        self.chats.append(_elem273)
                    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('GetChatsResponse')
        if self.chats is not None:
            oprot.writeFieldBegin('chats', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.chats))
            for iter274 in self.chats:
                iter274.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 Chat(object):
    """
    Attributes:
     - type
     - chatMid
     - createdTime
     - notificationDisabled
     - favoriteTimestamp
     - chatName
     - picturePath
     - extra

    """


    def __init__(self, type=None, chatMid=None, createdTime=None, notificationDisabled=None, favoriteTimestamp=None, chatName=None, picturePath=None, extra=None,):
        self.type = type
        self.chatMid = chatMid
        self.createdTime = createdTime
        self.notificationDisabled = notificationDisabled
        self.favoriteTimestamp = favoriteTimestamp
        self.chatName = chatName
        self.picturePath = picturePath
        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.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.chatMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                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.BOOL:
                    self.notificationDisabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.favoriteTimestamp = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.chatName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.picturePath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRUCT:
                    self.extra = Extra()
                    self.extra.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('Chat')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            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.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 3)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.notificationDisabled is not None:
            oprot.writeFieldBegin('notificationDisabled', TType.BOOL, 4)
            oprot.writeBool(self.notificationDisabled)
            oprot.writeFieldEnd()
        if self.favoriteTimestamp is not None:
            oprot.writeFieldBegin('favoriteTimestamp', TType.I64, 5)
            oprot.writeI64(self.favoriteTimestamp)
            oprot.writeFieldEnd()
        if self.chatName is not None:
            oprot.writeFieldBegin('chatName', TType.STRING, 6)
            oprot.writeString(self.chatName.encode('utf-8') if sys.version_info[0] == 2 else self.chatName)
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 7)
            oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        if self.extra is not None:
            oprot.writeFieldBegin('extra', TType.STRUCT, 8)
            self.extra.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 Extra(object):
    """
    Attributes:
     - groupExtra
     - peerExtra

    """


    def __init__(self, groupExtra=None, peerExtra=None,):
        self.groupExtra = groupExtra
        self.peerExtra = peerExtra

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.groupExtra = GroupExtra()
                    self.groupExtra.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.peerExtra = PeerExtra()
                    self.peerExtra.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('Extra')
        if self.groupExtra is not None:
            oprot.writeFieldBegin('groupExtra', TType.STRUCT, 1)
            self.groupExtra.write(oprot)
            oprot.writeFieldEnd()
        if self.peerExtra is not None:
            oprot.writeFieldBegin('peerExtra', TType.STRUCT, 2)
            self.peerExtra.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 GroupExtra(object):
    """
    Attributes:
     - creator
     - preventedJoinByTicket
     - invitationTicket
     - memberMids
     - inviteeMids
     - addFriendDisabled
     - ticketDisabled

    """


    def __init__(self, creator=None, preventedJoinByTicket=None, invitationTicket=None, memberMids=None, inviteeMids=None, addFriendDisabled=None, ticketDisabled=None,):
        self.creator = creator
        self.preventedJoinByTicket = preventedJoinByTicket
        self.invitationTicket = invitationTicket
        self.memberMids = memberMids
        self.inviteeMids = inviteeMids
        self.addFriendDisabled = addFriendDisabled
        self.ticketDisabled = ticketDisabled

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.creator = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.preventedJoinByTicket = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.invitationTicket = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.MAP:
                    self.memberMids = {}
                    (_ktype276, _vtype277, _size275) = iprot.readMapBegin()
                    for _i279 in range(_size275):
                        _key280 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val281 = iprot.readI64()
                        self.memberMids[_key280] = _val281
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.MAP:
                    self.inviteeMids = {}
                    (_ktype283, _vtype284, _size282) = iprot.readMapBegin()
                    for _i286 in range(_size282):
                        _key287 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val288 = iprot.readI64()
                        self.inviteeMids[_key287] = _val288
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.addFriendDisabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.ticketDisabled = 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('GroupExtra')
        if self.creator is not None:
            oprot.writeFieldBegin('creator', TType.STRING, 1)
            oprot.writeString(self.creator.encode('utf-8') if sys.version_info[0] == 2 else self.creator)
            oprot.writeFieldEnd()
        if self.preventedJoinByTicket is not None:
            oprot.writeFieldBegin('preventedJoinByTicket', TType.BOOL, 2)
            oprot.writeBool(self.preventedJoinByTicket)
            oprot.writeFieldEnd()
        if self.invitationTicket is not None:
            oprot.writeFieldBegin('invitationTicket', TType.STRING, 3)
            oprot.writeString(self.invitationTicket.encode('utf-8') if sys.version_info[0] == 2 else self.invitationTicket)
            oprot.writeFieldEnd()
        if self.memberMids is not None:
            oprot.writeFieldBegin('memberMids', TType.MAP, 4)
            oprot.writeMapBegin(TType.STRING, TType.I64, len(self.memberMids))
            for kiter289, viter290 in self.memberMids.items():
                oprot.writeString(kiter289.encode('utf-8') if sys.version_info[0] == 2 else kiter289)
                oprot.writeI64(viter290)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.inviteeMids is not None:
            oprot.writeFieldBegin('inviteeMids', TType.MAP, 5)
            oprot.writeMapBegin(TType.STRING, TType.I64, len(self.inviteeMids))
            for kiter291, viter292 in self.inviteeMids.items():
                oprot.writeString(kiter291.encode('utf-8') if sys.version_info[0] == 2 else kiter291)
                oprot.writeI64(viter292)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.addFriendDisabled is not None:
            oprot.writeFieldBegin('addFriendDisabled', TType.BOOL, 6)
            oprot.writeBool(self.addFriendDisabled)
            oprot.writeFieldEnd()
        if self.ticketDisabled is not None:
            oprot.writeFieldBegin('ticketDisabled', TType.BOOL, 7)
            oprot.writeBool(self.ticketDisabled)
            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 PeerExtra(object):


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

    def validate(self):
        return

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

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

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


class GetFollowersRequest(object):
    """
    Attributes:
     - followMid
     - cursor

    """


    def __init__(self, followMid=None, cursor=None,):
        self.followMid = followMid
        self.cursor = cursor

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.followMid = FollowMid()
                    self.followMid.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.cursor = iprot.readString().decode('utf-8', errors='replace') 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('GetFollowersRequest')
        if self.followMid is not None:
            oprot.writeFieldBegin('followMid', TType.STRUCT, 1)
            self.followMid.write(oprot)
            oprot.writeFieldEnd()
        if self.cursor is not None:
            oprot.writeFieldBegin('cursor', TType.STRING, 2)
            oprot.writeString(self.cursor.encode('utf-8') if sys.version_info[0] == 2 else self.cursor)
            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 GetFollowersResponse(object):
    """
    Attributes:
     - profiles
     - cursor
     - followingCount
     - followerCount

    """


    def __init__(self, profiles=None, cursor=None, followingCount=None, followerCount=None,):
        self.profiles = profiles
        self.cursor = cursor
        self.followingCount = followingCount
        self.followerCount = followerCount

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.profiles = []
                    (_etype296, _size293) = iprot.readListBegin()
                    for _i297 in range(_size293):
                        _elem298 = FollowProfile()
                        _elem298.read(iprot)
                        self.profiles.append(_elem298)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.cursor = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.followingCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.followerCount = 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('GetFollowersResponse')
        if self.profiles is not None:
            oprot.writeFieldBegin('profiles', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.profiles))
            for iter299 in self.profiles:
                iter299.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.cursor is not None:
            oprot.writeFieldBegin('cursor', TType.STRING, 2)
            oprot.writeString(self.cursor.encode('utf-8') if sys.version_info[0] == 2 else self.cursor)
            oprot.writeFieldEnd()
        if self.followingCount is not None:
            oprot.writeFieldBegin('followingCount', TType.I64, 3)
            oprot.writeI64(self.followingCount)
            oprot.writeFieldEnd()
        if self.followerCount is not None:
            oprot.writeFieldBegin('followerCount', TType.I64, 4)
            oprot.writeI64(self.followerCount)
            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 FollowProfile(object):
    """
    Attributes:
     - followMid
     - displayName
     - picturePath
     - following
     - allowFollow
     - followBuddyDetail

    """


    def __init__(self, followMid=None, displayName=None, picturePath=None, following=None, allowFollow=None, followBuddyDetail=None,):
        self.followMid = followMid
        self.displayName = displayName
        self.picturePath = picturePath
        self.following = following
        self.allowFollow = allowFollow
        self.followBuddyDetail = followBuddyDetail

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.followMid = FollowMid()
                    self.followMid.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.displayName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.picturePath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.following = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.allowFollow = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.followBuddyDetail = FollowBuddyDetail()
                    self.followBuddyDetail.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('FollowProfile')
        if self.followMid is not None:
            oprot.writeFieldBegin('followMid', TType.STRUCT, 1)
            self.followMid.write(oprot)
            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.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 3)
            oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        if self.following is not None:
            oprot.writeFieldBegin('following', TType.BOOL, 4)
            oprot.writeBool(self.following)
            oprot.writeFieldEnd()
        if self.allowFollow is not None:
            oprot.writeFieldBegin('allowFollow', TType.BOOL, 5)
            oprot.writeBool(self.allowFollow)
            oprot.writeFieldEnd()
        if self.followBuddyDetail is not None:
            oprot.writeFieldBegin('followBuddyDetail', TType.STRUCT, 6)
            self.followBuddyDetail.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 FollowBuddyDetail(object):
    """
    Attributes:
     - iconType

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.iconType = 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('FollowBuddyDetail')
        if self.iconType is not None:
            oprot.writeFieldBegin('iconType', TType.I32, 1)
            oprot.writeI32(self.iconType)
            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 GetFollowingsRequest(object):
    """
    Attributes:
     - followMid
     - cursor

    """


    def __init__(self, followMid=None, cursor=None,):
        self.followMid = followMid
        self.cursor = cursor

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.followMid = FollowMid()
                    self.followMid.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.cursor = iprot.readString().decode('utf-8', errors='replace') 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('GetFollowingsRequest')
        if self.followMid is not None:
            oprot.writeFieldBegin('followMid', TType.STRUCT, 1)
            self.followMid.write(oprot)
            oprot.writeFieldEnd()
        if self.cursor is not None:
            oprot.writeFieldBegin('cursor', TType.STRING, 2)
            oprot.writeString(self.cursor.encode('utf-8') if sys.version_info[0] == 2 else self.cursor)
            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 GetFollowingsResponse(object):
    """
    Attributes:
     - profiles
     - cursor
     - followingCount
     - followerCount

    """


    def __init__(self, profiles=None, cursor=None, followingCount=None, followerCount=None,):
        self.profiles = profiles
        self.cursor = cursor
        self.followingCount = followingCount
        self.followerCount = followerCount

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.profiles = []
                    (_etype303, _size300) = iprot.readListBegin()
                    for _i304 in range(_size300):
                        _elem305 = FollowProfile()
                        _elem305.read(iprot)
                        self.profiles.append(_elem305)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.cursor = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.followingCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.followerCount = 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('GetFollowingsResponse')
        if self.profiles is not None:
            oprot.writeFieldBegin('profiles', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.profiles))
            for iter306 in self.profiles:
                iter306.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.cursor is not None:
            oprot.writeFieldBegin('cursor', TType.STRING, 2)
            oprot.writeString(self.cursor.encode('utf-8') if sys.version_info[0] == 2 else self.cursor)
            oprot.writeFieldEnd()
        if self.followingCount is not None:
            oprot.writeFieldBegin('followingCount', TType.I64, 3)
            oprot.writeI64(self.followingCount)
            oprot.writeFieldEnd()
        if self.followerCount is not None:
            oprot.writeFieldBegin('followerCount', TType.I64, 4)
            oprot.writeI64(self.followerCount)
            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

    """


    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', errors='replace') 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 = []
                    (_etype310, _size307) = iprot.readListBegin()
                    for _i311 in range(_size307):
                        _elem312 = Contact()
                        _elem312.read(iprot)
                        self.contacts.append(_elem312)
                    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 = []
                    (_etype316, _size313) = iprot.readListBegin()
                    for _i317 in range(_size313):
                        _elem318 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.memberMids.append(_elem318)
                    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 iter319 in self.contacts:
                iter319.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 iter320 in self.memberMids:
                oprot.writeString(iter320.encode('utf-8') if sys.version_info[0] == 2 else iter320)
            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 ContactModification(object):
    """
    Attributes:
     - type
     - luid
     - phones
     - emails
     - userids

    """


    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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.LIST:
                    self.phones = []
                    (_etype324, _size321) = iprot.readListBegin()
                    for _i325 in range(_size321):
                        _elem326 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.phones.append(_elem326)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.LIST:
                    self.emails = []
                    (_etype330, _size327) = iprot.readListBegin()
                    for _i331 in range(_size327):
                        _elem332 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.emails.append(_elem332)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.LIST:
                    self.userids = []
                    (_etype336, _size333) = iprot.readListBegin()
                    for _i337 in range(_size333):
                        _elem338 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.userids.append(_elem338)
                    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 iter339 in self.phones:
                oprot.writeString(iter339.encode('utf-8') if sys.version_info[0] == 2 else iter339)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.emails is not None:
            oprot.writeFieldBegin('emails', TType.LIST, 12)
            oprot.writeListBegin(TType.STRING, len(self.emails))
            for iter340 in self.emails:
                oprot.writeString(iter340.encode('utf-8') if sys.version_info[0] == 2 else iter340)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.userids is not None:
            oprot.writeFieldBegin('userids', TType.LIST, 13)
            oprot.writeListBegin(TType.STRING, len(self.userids))
            for iter341 in self.userids:
                oprot.writeString(iter341.encode('utf-8') if sys.version_info[0] == 2 else iter341)
            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 GetE2EEKeyBackupCertificatesRequest(object):


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

    def validate(self):
        return

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

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

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


class GetE2EEKeyBackupCertificatesResponse(object):
    """
    Attributes:
     - urlHashList

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.urlHashList = []
                    (_etype345, _size342) = iprot.readListBegin()
                    for _i346 in range(_size342):
                        _elem347 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.urlHashList.append(_elem347)
                    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('GetE2EEKeyBackupCertificatesResponse')
        if self.urlHashList is not None:
            oprot.writeFieldBegin('urlHashList', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.urlHashList))
            for iter348 in self.urlHashList:
                oprot.writeString(iter348.encode('utf-8') if sys.version_info[0] == 2 else iter348)
            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 DeleteOtherFromChatRequest(object):
    """
    Attributes:
     - reqSeq
     - chatMid
     - targetUserMids

    """


    def __init__(self, reqSeq=None, chatMid=None, targetUserMids=None,):
        self.reqSeq = reqSeq
        self.chatMid = chatMid
        self.targetUserMids = targetUserMids

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chatMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.SET:
                    self.targetUserMids = set()
                    (_etype352, _size349) = iprot.readSetBegin()
                    for _i353 in range(_size349):
                        _elem354 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.targetUserMids.add(_elem354)
                    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('DeleteOtherFromChatRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            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.targetUserMids is not None:
            oprot.writeFieldBegin('targetUserMids', TType.SET, 3)
            oprot.writeSetBegin(TType.STRING, len(self.targetUserMids))
            for iter355 in self.targetUserMids:
                oprot.writeString(iter355.encode('utf-8') if sys.version_info[0] == 2 else iter355)
            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 DeleteOtherFromChatResponse(object):


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

    def validate(self):
        return

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

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

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


class InviteIntoChatRequest(object):
    """
    Attributes:
     - reqSeq
     - chatMid
     - targetUserMids

    """


    def __init__(self, reqSeq=None, chatMid=None, targetUserMids=None,):
        self.reqSeq = reqSeq
        self.chatMid = chatMid
        self.targetUserMids = targetUserMids

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chatMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.SET:
                    self.targetUserMids = set()
                    (_etype359, _size356) = iprot.readSetBegin()
                    for _i360 in range(_size356):
                        _elem361 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.targetUserMids.add(_elem361)
                    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('InviteIntoChatRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            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.targetUserMids is not None:
            oprot.writeFieldBegin('targetUserMids', TType.SET, 3)
            oprot.writeSetBegin(TType.STRING, len(self.targetUserMids))
            for iter362 in self.targetUserMids:
                oprot.writeString(iter362.encode('utf-8') if sys.version_info[0] == 2 else iter362)
            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 InviteIntoChatResponse(object):


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

    def validate(self):
        return

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

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

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


class CancelChatInvitationRequest(object):
    """
    Attributes:
     - reqSeq
     - chatMid
     - targetUserMids

    """


    def __init__(self, reqSeq=None, chatMid=None, targetUserMids=None,):
        self.reqSeq = reqSeq
        self.chatMid = chatMid
        self.targetUserMids = targetUserMids

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chatMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.SET:
                    self.targetUserMids = set()
                    (_etype366, _size363) = iprot.readSetBegin()
                    for _i367 in range(_size363):
                        _elem368 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.targetUserMids.add(_elem368)
                    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('CancelChatInvitationRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            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.targetUserMids is not None:
            oprot.writeFieldBegin('targetUserMids', TType.SET, 3)
            oprot.writeSetBegin(TType.STRING, len(self.targetUserMids))
            for iter369 in self.targetUserMids:
                oprot.writeString(iter369.encode('utf-8') if sys.version_info[0] == 2 else iter369)
            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 CancelChatInvitationResponse(object):


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

    def validate(self):
        return

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

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

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


class DeleteSelfFromChatRequest(object):
    """
    Attributes:
     - reqSeq
     - chatMid
     - lastSeenMessageDeliveredTime
     - lastSeenMessageId
     - lastMessageDeliveredTime
     - lastMessageId

    """


    def __init__(self, reqSeq=None, chatMid=None, lastSeenMessageDeliveredTime=None, lastSeenMessageId=None, lastMessageDeliveredTime=None, lastMessageId=None,):
        self.reqSeq = reqSeq
        self.chatMid = chatMid
        self.lastSeenMessageDeliveredTime = lastSeenMessageDeliveredTime
        self.lastSeenMessageId = lastSeenMessageId
        self.lastMessageDeliveredTime = lastMessageDeliveredTime
        self.lastMessageId = lastMessageId

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chatMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.lastSeenMessageDeliveredTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.lastSeenMessageId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.lastMessageDeliveredTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.lastMessageId = iprot.readString().decode('utf-8', errors='replace') 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('DeleteSelfFromChatRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            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.lastSeenMessageDeliveredTime is not None:
            oprot.writeFieldBegin('lastSeenMessageDeliveredTime', TType.I64, 3)
            oprot.writeI64(self.lastSeenMessageDeliveredTime)
            oprot.writeFieldEnd()
        if self.lastSeenMessageId is not None:
            oprot.writeFieldBegin('lastSeenMessageId', TType.STRING, 4)
            oprot.writeString(self.lastSeenMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.lastSeenMessageId)
            oprot.writeFieldEnd()
        if self.lastMessageDeliveredTime is not None:
            oprot.writeFieldBegin('lastMessageDeliveredTime', TType.I64, 5)
            oprot.writeI64(self.lastMessageDeliveredTime)
            oprot.writeFieldEnd()
        if self.lastMessageId is not None:
            oprot.writeFieldBegin('lastMessageId', TType.STRING, 6)
            oprot.writeString(self.lastMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.lastMessageId)
            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 DeleteSelfFromChatResponse(object):


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

    def validate(self):
        return

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

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

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


class AcceptChatInvitationRequest(object):
    """
    Attributes:
     - reqSeq
     - chatMid

    """


    def __init__(self, reqSeq=None, chatMid=None,):
        self.reqSeq = reqSeq
        self.chatMid = chatMid

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chatMid = iprot.readString().decode('utf-8', errors='replace') 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('AcceptChatInvitationRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class AcceptChatInvitationResponse(object):


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

    def validate(self):
        return

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

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

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


class ReissueChatTicketRequest(object):
    """
    Attributes:
     - reqSeq
     - groupMid

    """


    def __init__(self, reqSeq=None, groupMid=None,):
        self.reqSeq = reqSeq
        self.groupMid = groupMid

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.groupMid = iprot.readString().decode('utf-8', errors='replace') 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('ReissueChatTicketRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.groupMid is not None:
            oprot.writeFieldBegin('groupMid', TType.STRING, 2)
            oprot.writeString(self.groupMid.encode('utf-8') if sys.version_info[0] == 2 else self.groupMid)
            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 ReissueChatTicketResponse(object):
    """
    Attributes:
     - ticketId

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.ticketId = iprot.readString().decode('utf-8', errors='replace') 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('ReissueChatTicketResponse')
        if self.ticketId is not None:
            oprot.writeFieldBegin('ticketId', TType.STRING, 1)
            oprot.writeString(self.ticketId.encode('utf-8') if sys.version_info[0] == 2 else self.ticketId)
            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 FindChatByTicketRequest(object):
    """
    Attributes:
     - ticketId

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.ticketId = iprot.readString().decode('utf-8', errors='replace') 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('FindChatByTicketRequest')
        if self.ticketId is not None:
            oprot.writeFieldBegin('ticketId', TType.STRING, 1)
            oprot.writeString(self.ticketId.encode('utf-8') if sys.version_info[0] == 2 else self.ticketId)
            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 FindChatByTicketResponse(object):
    """
    Attributes:
     - chat

    """


    def __init__(self, chat=None,):
        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.STRUCT:
                    self.chat = Chat()
                    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('FindChatByTicketResponse')
        if self.chat is not None:
            oprot.writeFieldBegin('chat', TType.STRUCT, 1)
            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 AcceptChatInvitationByTicketRequest(object):
    """
    Attributes:
     - reqSeq
     - chatMid
     - ticketId

    """


    def __init__(self, reqSeq=None, chatMid=None, ticketId=None,):
        self.reqSeq = reqSeq
        self.chatMid = chatMid
        self.ticketId = ticketId

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chatMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.ticketId = iprot.readString().decode('utf-8', errors='replace') 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('AcceptChatInvitationByTicketRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            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.ticketId is not None:
            oprot.writeFieldBegin('ticketId', TType.STRING, 3)
            oprot.writeString(self.ticketId.encode('utf-8') if sys.version_info[0] == 2 else self.ticketId)
            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 AcceptChatInvitationByTicketResponse(object):


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

    def validate(self):
        return

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

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

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


class UpdateChatRequest(object):
    """
    Attributes:
     - reqSeq
     - chat
     - updatedAttribute

    """


    def __init__(self, reqSeq=None, chat=None, updatedAttribute=None,):
        self.reqSeq = reqSeq
        self.chat = chat
        self.updatedAttribute = updatedAttribute

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chat = Chat()
                    self.chat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.updatedAttribute = 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('UpdateChatRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.chat is not None:
            oprot.writeFieldBegin('chat', TType.STRUCT, 2)
            self.chat.write(oprot)
            oprot.writeFieldEnd()
        if self.updatedAttribute is not None:
            oprot.writeFieldBegin('updatedAttribute', TType.I32, 3)
            oprot.writeI32(self.updatedAttribute)
            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 UpdateChatResponse(object):


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

    def validate(self):
        return

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

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

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


class RefreshAccessTokenRequest(object):
    """
    Attributes:
     - refreshToken

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.refreshToken = iprot.readString().decode('utf-8', errors='replace') 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('RefreshAccessTokenRequest')
        if self.refreshToken is not None:
            oprot.writeFieldBegin('refreshToken', TType.STRING, 1)
            oprot.writeString(self.refreshToken.encode('utf-8') if sys.version_info[0] == 2 else self.refreshToken)
            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 RefreshAccessTokenResponse(object):
    """
    Attributes:
     - accessToken
     - durationUntilRefreshInSec
     - retryPolicy
     - tokenIssueTimeEpochSec
     - refreshToken

    """


    def __init__(self, accessToken=None, durationUntilRefreshInSec=None, retryPolicy=None, tokenIssueTimeEpochSec=None, refreshToken=None,):
        self.accessToken = accessToken
        self.durationUntilRefreshInSec = durationUntilRefreshInSec
        self.retryPolicy = retryPolicy
        self.tokenIssueTimeEpochSec = tokenIssueTimeEpochSec
        self.refreshToken = refreshToken

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.accessToken = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.durationUntilRefreshInSec = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.retryPolicy = RetryPolicy()
                    self.retryPolicy.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.tokenIssueTimeEpochSec = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.refreshToken = iprot.readString().decode('utf-8', errors='replace') 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('RefreshAccessTokenResponse')
        if self.accessToken is not None:
            oprot.writeFieldBegin('accessToken', TType.STRING, 1)
            oprot.writeString(self.accessToken.encode('utf-8') if sys.version_info[0] == 2 else self.accessToken)
            oprot.writeFieldEnd()
        if self.durationUntilRefreshInSec is not None:
            oprot.writeFieldBegin('durationUntilRefreshInSec', TType.I64, 2)
            oprot.writeI64(self.durationUntilRefreshInSec)
            oprot.writeFieldEnd()
        if self.retryPolicy is not None:
            oprot.writeFieldBegin('retryPolicy', TType.STRUCT, 3)
            self.retryPolicy.write(oprot)
            oprot.writeFieldEnd()
        if self.tokenIssueTimeEpochSec is not None:
            oprot.writeFieldBegin('tokenIssueTimeEpochSec', TType.I64, 4)
            oprot.writeI64(self.tokenIssueTimeEpochSec)
            oprot.writeFieldEnd()
        if self.refreshToken is not None:
            oprot.writeFieldBegin('refreshToken', TType.STRING, 5)
            oprot.writeString(self.refreshToken.encode('utf-8') if sys.version_info[0] == 2 else self.refreshToken)
            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 RetryPolicy(object):
    """
    Attributes:
     - initialDelayInMillis
     - maxDelayInMillis
     - multiplier
     - jitterRate

    """


    def __init__(self, initialDelayInMillis=None, maxDelayInMillis=None, multiplier=None, jitterRate=None,):
        self.initialDelayInMillis = initialDelayInMillis
        self.maxDelayInMillis = maxDelayInMillis
        self.multiplier = multiplier
        self.jitterRate = jitterRate

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.initialDelayInMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.maxDelayInMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.DOUBLE:
                    self.multiplier = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.DOUBLE:
                    self.jitterRate = 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('RetryPolicy')
        if self.initialDelayInMillis is not None:
            oprot.writeFieldBegin('initialDelayInMillis', TType.I64, 1)
            oprot.writeI64(self.initialDelayInMillis)
            oprot.writeFieldEnd()
        if self.maxDelayInMillis is not None:
            oprot.writeFieldBegin('maxDelayInMillis', TType.I64, 2)
            oprot.writeI64(self.maxDelayInMillis)
            oprot.writeFieldEnd()
        if self.multiplier is not None:
            oprot.writeFieldBegin('multiplier', TType.DOUBLE, 3)
            oprot.writeDouble(self.multiplier)
            oprot.writeFieldEnd()
        if self.jitterRate is not None:
            oprot.writeFieldBegin('jitterRate', TType.DOUBLE, 4)
            oprot.writeDouble(self.jitterRate)
            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

    """


    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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.ranges = {}
                    (_ktype371, _vtype372, _size370) = iprot.readMapBegin()
                    for _i374 in range(_size370):
                        _key375 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val376 = []
                        (_etype380, _size377) = iprot.readListBegin()
                        for _i381 in range(_size377):
                            _elem382 = TMessageReadRangeEntry()
                            _elem382.read(iprot)
                            _val376.append(_elem382)
                        iprot.readListEnd()
                        self.ranges[_key375] = _val376
                    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 kiter383, viter384 in self.ranges.items():
                oprot.writeString(kiter383.encode('utf-8') if sys.version_info[0] == 2 else kiter383)
                oprot.writeListBegin(TType.STRUCT, len(viter384))
                for iter385 in viter384:
                    iter385.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 TMessageReadRangeEntry(object):
    """
    Attributes:
     - startMessageId
     - endMessageId
     - startTime
     - endTime

    """


    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 BuddyDetail(object):
    """
    Attributes:
     - mid
     - memberCount
     - onAir
     - businessAccount
     - addable
     - acceptableContentTypes
     - capableMyhome
     - freePhoneCallable
     - phoneNumberToDial
     - needPermissionApproval
     - channelId
     - channelProviderName
     - iconType
     - botType
     - showRichMenu
     - richMenuRevision
     - onAirLabel
     - useTheme
     - themeId
     - useBar
     - barRevision
     - useBackground
     - backgroundId
     - statusBarEnabled
     - statusBarRevision
     - searchId
     - onAirVersion
     - blockable
     - botActiveStatus
     - membershipEnabled

    """


    def __init__(self, mid=None, memberCount=None, onAir=None, businessAccount=None, addable=None, acceptableContentTypes=None, capableMyhome=None, freePhoneCallable=None, phoneNumberToDial=None, needPermissionApproval=None, channelId=None, channelProviderName=None, iconType=None, botType=None, showRichMenu=None, richMenuRevision=None, onAirLabel=None, useTheme=None, themeId=None, useBar=None, barRevision=None, useBackground=None, backgroundId=None, statusBarEnabled=None, statusBarRevision=None, searchId=None, onAirVersion=None, blockable=None, botActiveStatus=None, membershipEnabled=None,):
        self.mid = mid
        self.memberCount = memberCount
        self.onAir = onAir
        self.businessAccount = businessAccount
        self.addable = addable
        self.acceptableContentTypes = acceptableContentTypes
        self.capableMyhome = capableMyhome
        self.freePhoneCallable = freePhoneCallable
        self.phoneNumberToDial = phoneNumberToDial
        self.needPermissionApproval = needPermissionApproval
        self.channelId = channelId
        self.channelProviderName = channelProviderName
        self.iconType = iconType
        self.botType = botType
        self.showRichMenu = showRichMenu
        self.richMenuRevision = richMenuRevision
        self.onAirLabel = onAirLabel
        self.useTheme = useTheme
        self.themeId = themeId
        self.useBar = useBar
        self.barRevision = barRevision
        self.useBackground = useBackground
        self.backgroundId = backgroundId
        self.statusBarEnabled = statusBarEnabled
        self.statusBarRevision = statusBarRevision
        self.searchId = searchId
        self.onAirVersion = onAirVersion
        self.blockable = blockable
        self.botActiveStatus = botActiveStatus
        self.membershipEnabled = membershipEnabled

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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()
                    (_etype389, _size386) = iprot.readSetBegin()
                    for _i390 in range(_size386):
                        _elem391 = iprot.readI32()
                        self.acceptableContentTypes.add(_elem391)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.capableMyhome = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.BOOL:
                    self.freePhoneCallable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.phoneNumberToDial = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.BOOL:
                    self.needPermissionApproval = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.channelId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.channelProviderName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I32:
                    self.iconType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.I32:
                    self.botType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.BOOL:
                    self.showRichMenu = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.I64:
                    self.richMenuRevision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.I32:
                    self.onAirLabel = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 18:
                if ftype == TType.BOOL:
                    self.useTheme = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 19:
                if ftype == TType.STRING:
                    self.themeId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.BOOL:
                    self.useBar = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.I64:
                    self.barRevision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.BOOL:
                    self.useBackground = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.STRING:
                    self.backgroundId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.BOOL:
                    self.statusBarEnabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 25:
                if ftype == TType.I64:
                    self.statusBarRevision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 26:
                if ftype == TType.STRING:
                    self.searchId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 27:
                if ftype == TType.I32:
                    self.onAirVersion = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 28:
                if ftype == TType.BOOL:
                    self.blockable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 29:
                if ftype == TType.I32:
                    self.botActiveStatus = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 30:
                if ftype == TType.BOOL:
                    self.membershipEnabled = 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 iter392 in self.acceptableContentTypes:
                oprot.writeI32(iter392)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.capableMyhome is not None:
            oprot.writeFieldBegin('capableMyhome', TType.BOOL, 7)
            oprot.writeBool(self.capableMyhome)
            oprot.writeFieldEnd()
        if self.freePhoneCallable is not None:
            oprot.writeFieldBegin('freePhoneCallable', TType.BOOL, 8)
            oprot.writeBool(self.freePhoneCallable)
            oprot.writeFieldEnd()
        if self.phoneNumberToDial is not None:
            oprot.writeFieldBegin('phoneNumberToDial', TType.STRING, 9)
            oprot.writeString(self.phoneNumberToDial.encode('utf-8') if sys.version_info[0] == 2 else self.phoneNumberToDial)
            oprot.writeFieldEnd()
        if self.needPermissionApproval is not None:
            oprot.writeFieldBegin('needPermissionApproval', TType.BOOL, 10)
            oprot.writeBool(self.needPermissionApproval)
            oprot.writeFieldEnd()
        if self.channelId is not None:
            oprot.writeFieldBegin('channelId', TType.STRING, 11)
            oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId)
            oprot.writeFieldEnd()
        if self.channelProviderName is not None:
            oprot.writeFieldBegin('channelProviderName', TType.STRING, 12)
            oprot.writeString(self.channelProviderName.encode('utf-8') if sys.version_info[0] == 2 else self.channelProviderName)
            oprot.writeFieldEnd()
        if self.iconType is not None:
            oprot.writeFieldBegin('iconType', TType.I32, 13)
            oprot.writeI32(self.iconType)
            oprot.writeFieldEnd()
        if self.botType is not None:
            oprot.writeFieldBegin('botType', TType.I32, 14)
            oprot.writeI32(self.botType)
            oprot.writeFieldEnd()
        if self.showRichMenu is not None:
            oprot.writeFieldBegin('showRichMenu', TType.BOOL, 15)
            oprot.writeBool(self.showRichMenu)
            oprot.writeFieldEnd()
        if self.richMenuRevision is not None:
            oprot.writeFieldBegin('richMenuRevision', TType.I64, 16)
            oprot.writeI64(self.richMenuRevision)
            oprot.writeFieldEnd()
        if self.onAirLabel is not None:
            oprot.writeFieldBegin('onAirLabel', TType.I32, 17)
            oprot.writeI32(self.onAirLabel)
            oprot.writeFieldEnd()
        if self.useTheme is not None:
            oprot.writeFieldBegin('useTheme', TType.BOOL, 18)
            oprot.writeBool(self.useTheme)
            oprot.writeFieldEnd()
        if self.themeId is not None:
            oprot.writeFieldBegin('themeId', TType.STRING, 19)
            oprot.writeString(self.themeId.encode('utf-8') if sys.version_info[0] == 2 else self.themeId)
            oprot.writeFieldEnd()
        if self.useBar is not None:
            oprot.writeFieldBegin('useBar', TType.BOOL, 20)
            oprot.writeBool(self.useBar)
            oprot.writeFieldEnd()
        if self.barRevision is not None:
            oprot.writeFieldBegin('barRevision', TType.I64, 21)
            oprot.writeI64(self.barRevision)
            oprot.writeFieldEnd()
        if self.useBackground is not None:
            oprot.writeFieldBegin('useBackground', TType.BOOL, 22)
            oprot.writeBool(self.useBackground)
            oprot.writeFieldEnd()
        if self.backgroundId is not None:
            oprot.writeFieldBegin('backgroundId', TType.STRING, 23)
            oprot.writeString(self.backgroundId.encode('utf-8') if sys.version_info[0] == 2 else self.backgroundId)
            oprot.writeFieldEnd()
        if self.statusBarEnabled is not None:
            oprot.writeFieldBegin('statusBarEnabled', TType.BOOL, 24)
            oprot.writeBool(self.statusBarEnabled)
            oprot.writeFieldEnd()
        if self.statusBarRevision is not None:
            oprot.writeFieldBegin('statusBarRevision', TType.I64, 25)
            oprot.writeI64(self.statusBarRevision)
            oprot.writeFieldEnd()
        if self.searchId is not None:
            oprot.writeFieldBegin('searchId', TType.STRING, 26)
            oprot.writeString(self.searchId.encode('utf-8') if sys.version_info[0] == 2 else self.searchId)
            oprot.writeFieldEnd()
        if self.onAirVersion is not None:
            oprot.writeFieldBegin('onAirVersion', TType.I32, 27)
            oprot.writeI32(self.onAirVersion)
            oprot.writeFieldEnd()
        if self.blockable is not None:
            oprot.writeFieldBegin('blockable', TType.BOOL, 28)
            oprot.writeBool(self.blockable)
            oprot.writeFieldEnd()
        if self.botActiveStatus is not None:
            oprot.writeFieldBegin('botActiveStatus', TType.I32, 29)
            oprot.writeI32(self.botActiveStatus)
            oprot.writeFieldEnd()
        if self.membershipEnabled is not None:
            oprot.writeFieldBegin('membershipEnabled', TType.BOOL, 30)
            oprot.writeBool(self.membershipEnabled)
            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

    """


    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 GetPreviousMessagesV2Request(object):
    """
    Attributes:
     - messageBoxId
     - endMessageId
     - messagesCount
     - withReadCount
     - receivedOnly

    """


    def __init__(self, messageBoxId=None, endMessageId=None, messagesCount=None, withReadCount=None, receivedOnly=None,):
        self.messageBoxId = messageBoxId
        self.endMessageId = endMessageId
        self.messagesCount = messagesCount
        self.withReadCount = withReadCount
        self.receivedOnly = receivedOnly

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.messageBoxId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.endMessageId = MessageBoxV2MessageId()
                    self.endMessageId.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.messagesCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.withReadCount = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.receivedOnly = 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('GetPreviousMessagesV2Request')
        if self.messageBoxId is not None:
            oprot.writeFieldBegin('messageBoxId', TType.STRING, 1)
            oprot.writeString(self.messageBoxId.encode('utf-8') if sys.version_info[0] == 2 else self.messageBoxId)
            oprot.writeFieldEnd()
        if self.endMessageId is not None:
            oprot.writeFieldBegin('endMessageId', TType.STRUCT, 2)
            self.endMessageId.write(oprot)
            oprot.writeFieldEnd()
        if self.messagesCount is not None:
            oprot.writeFieldBegin('messagesCount', TType.I32, 3)
            oprot.writeI32(self.messagesCount)
            oprot.writeFieldEnd()
        if self.withReadCount is not None:
            oprot.writeFieldBegin('withReadCount', TType.BOOL, 4)
            oprot.writeBool(self.withReadCount)
            oprot.writeFieldEnd()
        if self.receivedOnly is not None:
            oprot.writeFieldBegin('receivedOnly', TType.BOOL, 5)
            oprot.writeBool(self.receivedOnly)
            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

    """


    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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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 GroupCall(object):
    """
    Attributes:
     - online
     - chatMid
     - hostMids
     - memberMids
     - started
     - mediaType
     - protocol

    """


    def __init__(self, online=None, chatMid=None, hostMids=None, memberMids=None, started=None, mediaType=None, protocol=None,):
        self.online = online
        self.chatMid = chatMid
        self.hostMids = hostMids
        self.memberMids = memberMids
        self.started = started
        self.mediaType = mediaType
        self.protocol = protocol

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.memberMids = []
                    (_etype396, _size393) = iprot.readListBegin()
                    for _i397 in range(_size393):
                        _elem398 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.memberMids.append(_elem398)
                    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)
            elif fid == 7:
                if ftype == TType.I32:
                    self.protocol = 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 iter399 in self.memberMids:
                oprot.writeString(iter399.encode('utf-8') if sys.version_info[0] == 2 else iter399)
            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()
        if self.protocol is not None:
            oprot.writeFieldBegin('protocol', TType.I32, 7)
            oprot.writeI32(self.protocol)
            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 SyncResponse(object):
    """
    Attributes:
     - operationResponse
     - fullSyncResponse
     - partialFullSyncResponse

    """


    def __init__(self, operationResponse=None, fullSyncResponse=None, partialFullSyncResponse=None,):
        self.operationResponse = operationResponse
        self.fullSyncResponse = fullSyncResponse
        self.partialFullSyncResponse = partialFullSyncResponse

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.operationResponse = OperationResponse()
                    self.operationResponse.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.fullSyncResponse = FullSyncResponse()
                    self.fullSyncResponse.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.partialFullSyncResponse = PartialFullSyncResponse()
                    self.partialFullSyncResponse.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('SyncResponse')
        if self.operationResponse is not None:
            oprot.writeFieldBegin('operationResponse', TType.STRUCT, 1)
            self.operationResponse.write(oprot)
            oprot.writeFieldEnd()
        if self.fullSyncResponse is not None:
            oprot.writeFieldBegin('fullSyncResponse', TType.STRUCT, 2)
            self.fullSyncResponse.write(oprot)
            oprot.writeFieldEnd()
        if self.partialFullSyncResponse is not None:
            oprot.writeFieldBegin('partialFullSyncResponse', TType.STRUCT, 3)
            self.partialFullSyncResponse.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 OperationResponse(object):
    """
    Attributes:
     - operations
     - hasMoreOps
     - globalEvents
     - individualEvents

    """


    def __init__(self, operations=None, hasMoreOps=None, globalEvents=None, individualEvents=None,):
        self.operations = operations
        self.hasMoreOps = hasMoreOps
        self.globalEvents = globalEvents
        self.individualEvents = individualEvents

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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 = []
                    (_etype403, _size400) = iprot.readListBegin()
                    for _i404 in range(_size400):
                        _elem405 = Operation()
                        _elem405.read(iprot)
                        self.operations.append(_elem405)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.hasMoreOps = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.globalEvents = TGlobalEvents()
                    self.globalEvents.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.individualEvents = TIndividualEvents()
                    self.individualEvents.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('OperationResponse')
        if self.operations is not None:
            oprot.writeFieldBegin('operations', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.operations))
            for iter406 in self.operations:
                iter406.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.hasMoreOps is not None:
            oprot.writeFieldBegin('hasMoreOps', TType.BOOL, 2)
            oprot.writeBool(self.hasMoreOps)
            oprot.writeFieldEnd()
        if self.globalEvents is not None:
            oprot.writeFieldBegin('globalEvents', TType.STRUCT, 3)
            self.globalEvents.write(oprot)
            oprot.writeFieldEnd()
        if self.individualEvents is not None:
            oprot.writeFieldBegin('individualEvents', TType.STRUCT, 4)
            self.individualEvents.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 FullSyncResponse(object):
    """
    Attributes:
     - reasons
     - nextRevision

    """


    def __init__(self, reasons=None, nextRevision=None,):
        self.reasons = reasons
        self.nextRevision = nextRevision

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.reasons = set()
                    (_etype410, _size407) = iprot.readSetBegin()
                    for _i411 in range(_size407):
                        _elem412 = iprot.readI32()
                        self.reasons.add(_elem412)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.nextRevision = 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('FullSyncResponse')
        if self.reasons is not None:
            oprot.writeFieldBegin('reasons', TType.SET, 1)
            oprot.writeSetBegin(TType.I32, len(self.reasons))
            for iter413 in self.reasons:
                oprot.writeI32(iter413)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.nextRevision is not None:
            oprot.writeFieldBegin('nextRevision', TType.I64, 2)
            oprot.writeI64(self.nextRevision)
            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 PartialFullSyncResponse(object):
    """
    Attributes:
     - targetCategories

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.targetCategories = {}
                    (_ktype415, _vtype416, _size414) = iprot.readMapBegin()
                    for _i418 in range(_size414):
                        _key419 = iprot.readI32()
                        _val420 = iprot.readI64()
                        self.targetCategories[_key419] = _val420
                    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('PartialFullSyncResponse')
        if self.targetCategories is not None:
            oprot.writeFieldBegin('targetCategories', TType.MAP, 1)
            oprot.writeMapBegin(TType.I32, TType.I64, len(self.targetCategories))
            for kiter421, viter422 in self.targetCategories.items():
                oprot.writeI32(kiter421)
                oprot.writeI64(viter422)
            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 TGlobalEvents(object):
    """
    Attributes:
     - events
     - lastRevision

    """


    def __init__(self, events=None, lastRevision=None,):
        self.events = events
        self.lastRevision = lastRevision

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.events = {}
                    (_ktype424, _vtype425, _size423) = iprot.readMapBegin()
                    for _i427 in range(_size423):
                        _key428 = iprot.readI32()
                        _val429 = GlobalEvent()
                        _val429.read(iprot)
                        self.events[_key428] = _val429
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.lastRevision = 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('TGlobalEvents')
        if self.events is not None:
            oprot.writeFieldBegin('events', TType.MAP, 1)
            oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.events))
            for kiter430, viter431 in self.events.items():
                oprot.writeI32(kiter430)
                viter431.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.lastRevision is not None:
            oprot.writeFieldBegin('lastRevision', TType.I64, 2)
            oprot.writeI64(self.lastRevision)
            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 TIndividualEvents(object):
    """
    Attributes:
     - events
     - lastRevision

    """


    def __init__(self, events=None, lastRevision=None,):
        self.events = events
        self.lastRevision = lastRevision

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.events = set()
                    (_etype435, _size432) = iprot.readSetBegin()
                    for _i436 in range(_size432):
                        _elem437 = iprot.readI32()
                        self.events.add(_elem437)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.lastRevision = 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('TIndividualEvents')
        if self.events is not None:
            oprot.writeFieldBegin('events', TType.SET, 1)
            oprot.writeSetBegin(TType.I32, len(self.events))
            for iter438 in self.events:
                oprot.writeI32(iter438)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.lastRevision is not None:
            oprot.writeFieldBegin('lastRevision', TType.I64, 2)
            oprot.writeI64(self.lastRevision)
            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:
     - type
     - minDelayInMinutes
     - maxDelayInMinutes
     - createTimeMillis
     - maxDelayHardLimit

    """


    def __init__(self, type=None, minDelayInMinutes=None, maxDelayInMinutes=None, createTimeMillis=None, maxDelayHardLimit=None,):
        self.type = type
        self.minDelayInMinutes = minDelayInMinutes
        self.maxDelayInMinutes = maxDelayInMinutes
        self.createTimeMillis = createTimeMillis
        self.maxDelayHardLimit = maxDelayHardLimit

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.minDelayInMinutes = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.maxDelayInMinutes = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.createTimeMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.maxDelayHardLimit = 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('GlobalEvent')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.minDelayInMinutes is not None:
            oprot.writeFieldBegin('minDelayInMinutes', TType.I32, 2)
            oprot.writeI32(self.minDelayInMinutes)
            oprot.writeFieldEnd()
        if self.maxDelayInMinutes is not None:
            oprot.writeFieldBegin('maxDelayInMinutes', TType.I32, 3)
            oprot.writeI32(self.maxDelayInMinutes)
            oprot.writeFieldEnd()
        if self.createTimeMillis is not None:
            oprot.writeFieldBegin('createTimeMillis', TType.I64, 4)
            oprot.writeI64(self.createTimeMillis)
            oprot.writeFieldEnd()
        if self.maxDelayHardLimit is not None:
            oprot.writeFieldBegin('maxDelayHardLimit', TType.BOOL, 5)
            oprot.writeBool(self.maxDelayHardLimit)
            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 DetermineMediaMessageFlowResponse(object):
    """
    Attributes:
     - flowMap
     - cacheTtlMillis

    """


    def __init__(self, flowMap=None, cacheTtlMillis=None,):
        self.flowMap = flowMap
        self.cacheTtlMillis = cacheTtlMillis

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.flowMap = {}
                    (_ktype440, _vtype441, _size439) = iprot.readMapBegin()
                    for _i443 in range(_size439):
                        _key444 = iprot.readI32()
                        _val445 = iprot.readI32()
                        self.flowMap[_key444] = _val445
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.cacheTtlMillis = 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('DetermineMediaMessageFlowResponse')
        if self.flowMap is not None:
            oprot.writeFieldBegin('flowMap', TType.MAP, 1)
            oprot.writeMapBegin(TType.I32, TType.I32, len(self.flowMap))
            for kiter446, viter447 in self.flowMap.items():
                oprot.writeI32(kiter446)
                oprot.writeI32(viter447)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.cacheTtlMillis is not None:
            oprot.writeFieldBegin('cacheTtlMillis', TType.I64, 2)
            oprot.writeI64(self.cacheTtlMillis)
            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 DisasterInfo(object):
    """
    Attributes:
     - disasterId
     - title
     - region
     - disasterDescription
     - seeMoreUrl
     - status

    """


    def __init__(self, disasterId=None, title=None, region=None, disasterDescription=None, seeMoreUrl=None, status=None,):
        self.disasterId = disasterId
        self.title = title
        self.region = region
        self.disasterDescription = disasterDescription
        self.seeMoreUrl = seeMoreUrl
        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.STRING:
                    self.disasterId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.title = iprot.readString().decode('utf-8', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.disasterDescription = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.seeMoreUrl = iprot.readString().decode('utf-8', errors='replace') 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)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DisasterInfo')
        if self.disasterId is not None:
            oprot.writeFieldBegin('disasterId', TType.STRING, 1)
            oprot.writeString(self.disasterId.encode('utf-8') if sys.version_info[0] == 2 else self.disasterId)
            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.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()
        if self.disasterDescription is not None:
            oprot.writeFieldBegin('disasterDescription', TType.STRING, 4)
            oprot.writeString(self.disasterDescription.encode('utf-8') if sys.version_info[0] == 2 else self.disasterDescription)
            oprot.writeFieldEnd()
        if self.seeMoreUrl is not None:
            oprot.writeFieldBegin('seeMoreUrl', TType.STRING, 5)
            oprot.writeString(self.seeMoreUrl.encode('utf-8') if sys.version_info[0] == 2 else self.seeMoreUrl)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 7)
            oprot.writeI32(self.status)
            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 GetDisasterCasesRequest(object):


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

    def validate(self):
        return

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

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

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


class GetDisasterCasesResponse(object):
    """
    Attributes:
     - disasters
     - messageTemplate
     - ttlInMillis

    """


    def __init__(self, disasters=None, messageTemplate=None, ttlInMillis=None,):
        self.disasters = disasters
        self.messageTemplate = messageTemplate
        self.ttlInMillis = ttlInMillis

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.disasters = []
                    (_etype451, _size448) = iprot.readListBegin()
                    for _i452 in range(_size448):
                        _elem453 = DisasterInfo()
                        _elem453.read(iprot)
                        self.disasters.append(_elem453)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.messageTemplate = []
                    (_etype457, _size454) = iprot.readListBegin()
                    for _i458 in range(_size454):
                        _elem459 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.messageTemplate.append(_elem459)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.ttlInMillis = 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('GetDisasterCasesResponse')
        if self.disasters is not None:
            oprot.writeFieldBegin('disasters', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.disasters))
            for iter460 in self.disasters:
                iter460.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.messageTemplate is not None:
            oprot.writeFieldBegin('messageTemplate', TType.LIST, 2)
            oprot.writeListBegin(TType.STRING, len(self.messageTemplate))
            for iter461 in self.messageTemplate:
                oprot.writeString(iter461.encode('utf-8') if sys.version_info[0] == 2 else iter461)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ttlInMillis is not None:
            oprot.writeFieldBegin('ttlInMillis', TType.I64, 3)
            oprot.writeI64(self.ttlInMillis)
            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
     - state

    """


    def __init__(self, message=None, fromType=None, squareMessageRevision=None, state=None,):
        self.message = message
        self.fromType = fromType
        self.squareMessageRevision = squareMessageRevision
        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.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)
            elif fid == 5:
                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('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()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 5)
            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 SquarePreference(object):
    """
    Attributes:
     - favoriteTimestamp
     - notiForNewJoinRequest

    """


    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

    """


    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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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 SquareMessageReaction(object):
    """
    Attributes:
     - type
     - reactor
     - createdAt
     - updatedAt

    """


    def __init__(self, type=None, reactor=None, createdAt=None, updatedAt=None,):
        self.type = type
        self.reactor = reactor
        self.createdAt = createdAt
        self.updatedAt = updatedAt

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.reactor = SquareMember()
                    self.reactor.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.createdAt = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.updatedAt = 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('SquareMessageReaction')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.reactor is not None:
            oprot.writeFieldBegin('reactor', TType.STRUCT, 2)
            self.reactor.write(oprot)
            oprot.writeFieldEnd()
        if self.createdAt is not None:
            oprot.writeFieldBegin('createdAt', TType.I64, 3)
            oprot.writeI64(self.createdAt)
            oprot.writeFieldEnd()
        if self.updatedAt is not None:
            oprot.writeFieldBegin('updatedAt', TType.I64, 4)
            oprot.writeI64(self.updatedAt)
            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 SquareMessageReactionStatus(object):
    """
    Attributes:
     - totalCount
     - countByReactionType
     - myReaction

    """


    def __init__(self, totalCount=None, countByReactionType=None, myReaction=None,):
        self.totalCount = totalCount
        self.countByReactionType = countByReactionType
        self.myReaction = myReaction

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.totalCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.countByReactionType = {}
                    (_ktype463, _vtype464, _size462) = iprot.readMapBegin()
                    for _i466 in range(_size462):
                        _key467 = iprot.readI32()
                        _val468 = iprot.readI32()
                        self.countByReactionType[_key467] = _val468
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.myReaction = SquareMessageReaction()
                    self.myReaction.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('SquareMessageReactionStatus')
        if self.totalCount is not None:
            oprot.writeFieldBegin('totalCount', TType.I32, 1)
            oprot.writeI32(self.totalCount)
            oprot.writeFieldEnd()
        if self.countByReactionType is not None:
            oprot.writeFieldBegin('countByReactionType', TType.MAP, 2)
            oprot.writeMapBegin(TType.I32, TType.I32, len(self.countByReactionType))
            for kiter469, viter470 in self.countByReactionType.items():
                oprot.writeI32(kiter469)
                oprot.writeI32(viter470)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.myReaction is not None:
            oprot.writeFieldBegin('myReaction', TType.STRUCT, 3)
            self.myReaction.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 SquareEventReceiveMessage(object):
    """
    Attributes:
     - squareChatMid
     - squareMessage
     - senderDisplayName
     - messageReactionStatus
     - senderRevision
     - squareMid

    """


    def __init__(self, squareChatMid=None, squareMessage=None, senderDisplayName=None, messageReactionStatus=None, senderRevision=None, squareMid=None,):
        self.squareChatMid = squareChatMid
        self.squareMessage = squareMessage
        self.senderDisplayName = senderDisplayName
        self.messageReactionStatus = messageReactionStatus
        self.senderRevision = senderRevision
        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.squareChatMid = iprot.readString().decode('utf-8', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.messageReactionStatus = SquareMessageReactionStatus()
                    self.messageReactionStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.senderRevision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.squareMid = iprot.readString().decode('utf-8', errors='replace') 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('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()
        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.messageReactionStatus is not None:
            oprot.writeFieldBegin('messageReactionStatus', TType.STRUCT, 4)
            self.messageReactionStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.senderRevision is not None:
            oprot.writeFieldBegin('senderRevision', TType.I64, 5)
            oprot.writeI64(self.senderRevision)
            oprot.writeFieldEnd()
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 6)
            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 SquareEventSendMessage(object):
    """
    Attributes:
     - squareChatMid
     - squareMessage
     - reqSeq
     - senderDisplayName
     - messageReactionStatus

    """


    def __init__(self, squareChatMid=None, squareMessage=None, reqSeq=None, senderDisplayName=None, messageReactionStatus=None,):
        self.squareChatMid = squareChatMid
        self.squareMessage = squareMessage
        self.reqSeq = reqSeq
        self.senderDisplayName = senderDisplayName
        self.messageReactionStatus = messageReactionStatus

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.senderDisplayName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.messageReactionStatus = SquareMessageReactionStatus()
                    self.messageReactionStatus.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('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()
        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.messageReactionStatus is not None:
            oprot.writeFieldBegin('messageReactionStatus', TType.STRUCT, 5)
            self.messageReactionStatus.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 SquareEventMutateMessage(object):
    """
    Attributes:
     - squareChatMid
     - squareMessage
     - reqSeq
     - senderDisplayName

    """


    def __init__(self, squareChatMid=None, squareMessage=None, reqSeq=None, senderDisplayName=None,):
        self.squareChatMid = squareChatMid
        self.squareMessage = squareMessage
        self.reqSeq = reqSeq
        self.senderDisplayName = senderDisplayName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.senderDisplayName = iprot.readString().decode('utf-8', errors='replace') 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('SquareEventMutateMessage')
        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()
        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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

    """


    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', errors='replace') 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 SquareMemberRelation(object):
    """
    Attributes:
     - state
     - revision

    """


    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 SquareEventNotifiedInviteIntoSquareChat(object):
    """
    Attributes:
     - squareChatMid
     - invitees
     - invitor
     - invitorRelation

    """


    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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.invitees = []
                    (_etype474, _size471) = iprot.readListBegin()
                    for _i475 in range(_size471):
                        _elem476 = SquareMember()
                        _elem476.read(iprot)
                        self.invitees.append(_elem476)
                    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 iter477 in self.invitees:
                iter477.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

    """


    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', errors='replace') 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', errors='replace') 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

    """


    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', errors='replace') 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', errors='replace') 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

    """


    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', errors='replace') 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', errors='replace') 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', errors='replace') 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

    """


    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', errors='replace') 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
     - kicker

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.kickees = []
                    (_etype481, _size478) = iprot.readListBegin()
                    for _i482 in range(_size478):
                        _elem483 = SquareMember()
                        _elem483.read(iprot)
                        self.kickees.append(_elem483)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.kicker = SquareMember()
                    self.kicker.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('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 iter484 in self.kickees:
                iter484.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.kicker is not None:
            oprot.writeFieldBegin('kicker', TType.STRUCT, 4)
            self.kicker.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 ApprovalValue(object):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        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.message = iprot.readString().decode('utf-8', errors='replace') 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('ApprovalValue')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            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 CodeValue(object):
    """
    Attributes:
     - code

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.code = iprot.readString().decode('utf-8', errors='replace') 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('CodeValue')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.STRING, 1)
            oprot.writeString(self.code.encode('utf-8') if sys.version_info[0] == 2 else self.code)
            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 SquareJoinMethodValue(object):
    """
    Attributes:
     - approvalValue
     - codeValue

    """


    def __init__(self, approvalValue=None, codeValue=None,):
        self.approvalValue = approvalValue
        self.codeValue = codeValue

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.approvalValue = ApprovalValue()
                    self.approvalValue.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.codeValue = CodeValue()
                    self.codeValue.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('SquareJoinMethodValue')
        if self.approvalValue is not None:
            oprot.writeFieldBegin('approvalValue', TType.STRUCT, 1)
            self.approvalValue.write(oprot)
            oprot.writeFieldEnd()
        if self.codeValue is not None:
            oprot.writeFieldBegin('codeValue', TType.STRUCT, 2)
            self.codeValue.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 SquareJoinMethod(object):
    """
    Attributes:
     - type
     - value

    """


    def __init__(self, type=None, value=None,):
        self.type = type
        self.value = value

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.value = SquareJoinMethodValue()
                    self.value.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('SquareJoinMethod')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.value is not None:
            oprot.writeFieldBegin('value', TType.STRUCT, 2)
            self.value.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 Square(object):
    """
    Attributes:
     - mid
     - name
     - welcomeMessage
     - profileImageObsHash
     - desc
     - searchable
     - type
     - categoryId
     - invitationURL
     - revision
     - ableToUseInvitationTicket
     - state
     - emblems
     - joinMethod
     - adultOnly
     - svcTags
     - createdAt

    """


    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, emblems=None, joinMethod=None, adultOnly=None, svcTags=None, createdAt=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
        self.emblems = emblems
        self.joinMethod = joinMethod
        self.adultOnly = adultOnly
        self.svcTags = svcTags
        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.mid = iprot.readString().decode('utf-8', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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)
            elif fid == 13:
                if ftype == TType.LIST:
                    self.emblems = []
                    (_etype488, _size485) = iprot.readListBegin()
                    for _i489 in range(_size485):
                        _elem490 = iprot.readI32()
                        self.emblems.append(_elem490)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRUCT:
                    self.joinMethod = SquareJoinMethod()
                    self.joinMethod.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I32:
                    self.adultOnly = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.LIST:
                    self.svcTags = []
                    (_etype494, _size491) = iprot.readListBegin()
                    for _i495 in range(_size491):
                        _elem496 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.svcTags.append(_elem496)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                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('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()
        if self.emblems is not None:
            oprot.writeFieldBegin('emblems', TType.LIST, 13)
            oprot.writeListBegin(TType.I32, len(self.emblems))
            for iter497 in self.emblems:
                oprot.writeI32(iter497)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.joinMethod is not None:
            oprot.writeFieldBegin('joinMethod', TType.STRUCT, 14)
            self.joinMethod.write(oprot)
            oprot.writeFieldEnd()
        if self.adultOnly is not None:
            oprot.writeFieldBegin('adultOnly', TType.I32, 15)
            oprot.writeI32(self.adultOnly)
            oprot.writeFieldEnd()
        if self.svcTags is not None:
            oprot.writeFieldBegin('svcTags', TType.LIST, 16)
            oprot.writeListBegin(TType.STRING, len(self.svcTags))
            for iter498 in self.svcTags:
                oprot.writeString(iter498.encode('utf-8') if sys.version_info[0] == 2 else iter498)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.createdAt is not None:
            oprot.writeFieldBegin('createdAt', TType.I64, 17)
            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 SquareEventNotifiedShutdownSquare(object):
    """
    Attributes:
     - squareChatMid
     - square

    """


    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', errors='replace') 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 MessageVisibility(object):
    """
    Attributes:
     - showJoinMessage
     - showLeaveMessage
     - showKickoutMessage

    """


    def __init__(self, showJoinMessage=None, showLeaveMessage=None, showKickoutMessage=None,):
        self.showJoinMessage = showJoinMessage
        self.showLeaveMessage = showLeaveMessage
        self.showKickoutMessage = showKickoutMessage

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.showJoinMessage = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.showLeaveMessage = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.showKickoutMessage = 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('MessageVisibility')
        if self.showJoinMessage is not None:
            oprot.writeFieldBegin('showJoinMessage', TType.BOOL, 1)
            oprot.writeBool(self.showJoinMessage)
            oprot.writeFieldEnd()
        if self.showLeaveMessage is not None:
            oprot.writeFieldBegin('showLeaveMessage', TType.BOOL, 2)
            oprot.writeBool(self.showLeaveMessage)
            oprot.writeFieldEnd()
        if self.showKickoutMessage is not None:
            oprot.writeFieldBegin('showKickoutMessage', TType.BOOL, 3)
            oprot.writeBool(self.showKickoutMessage)
            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
     - invitationUrl
     - messageVisibility
     - ableToSearchMessage

    """


    def __init__(self, squareChatMid=None, squareMid=None, type=None, name=None, chatImageObsHash=None, squareChatRevision=None, maxMemberCount=None, state=None, invitationUrl=None, messageVisibility=None, ableToSearchMessage=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
        self.invitationUrl = invitationUrl
        self.messageVisibility = messageVisibility
        self.ableToSearchMessage = ableToSearchMessage

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.invitationUrl = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRUCT:
                    self.messageVisibility = MessageVisibility()
                    self.messageVisibility.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I32:
                    self.ableToSearchMessage = 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()
        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.messageVisibility is not None:
            oprot.writeFieldBegin('messageVisibility', TType.STRUCT, 10)
            self.messageVisibility.write(oprot)
            oprot.writeFieldEnd()
        if self.ableToSearchMessage is not None:
            oprot.writeFieldBegin('ableToSearchMessage', TType.I32, 11)
            oprot.writeI32(self.ableToSearchMessage)
            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

    """


    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

    """


    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', errors='replace') 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', errors='replace') 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

    """


    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', errors='replace') 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 SquareEventNotifiedUpdateSquareChatMaxMemberCount(object):
    """
    Attributes:
     - squareChatMid
     - maxMemberCount
     - editor

    """


    def __init__(self, squareChatMid=None, maxMemberCount=None, editor=None,):
        self.squareChatMid = squareChatMid
        self.maxMemberCount = maxMemberCount
        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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.maxMemberCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                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('SquareEventNotifiedUpdateSquareChatMaxMemberCount')
        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.maxMemberCount is not None:
            oprot.writeFieldBegin('maxMemberCount', TType.I32, 2)
            oprot.writeI32(self.maxMemberCount)
            oprot.writeFieldEnd()
        if self.editor is not None:
            oprot.writeFieldBegin('editor', TType.STRUCT, 3)
            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 SquareEventNotifiedAddBot(object):
    """
    Attributes:
     - squareChatMid
     - squareMember
     - botMid
     - botDisplayName

    """


    def __init__(self, squareChatMid=None, squareMember=None, botMid=None, botDisplayName=None,):
        self.squareChatMid = squareChatMid
        self.squareMember = squareMember
        self.botMid = botMid
        self.botDisplayName = botDisplayName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.botMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.botDisplayName = iprot.readString().decode('utf-8', errors='replace') 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('SquareEventNotifiedAddBot')
        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()
        if self.botMid is not None:
            oprot.writeFieldBegin('botMid', TType.STRING, 3)
            oprot.writeString(self.botMid.encode('utf-8') if sys.version_info[0] == 2 else self.botMid)
            oprot.writeFieldEnd()
        if self.botDisplayName is not None:
            oprot.writeFieldBegin('botDisplayName', TType.STRING, 4)
            oprot.writeString(self.botDisplayName.encode('utf-8') if sys.version_info[0] == 2 else self.botDisplayName)
            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 SquareEventNotifiedRemoveBot(object):
    """
    Attributes:
     - squareChatMid
     - squareMember
     - botMid
     - botDisplayName

    """


    def __init__(self, squareChatMid=None, squareMember=None, botMid=None, botDisplayName=None,):
        self.squareChatMid = squareChatMid
        self.squareMember = squareMember
        self.botMid = botMid
        self.botDisplayName = botDisplayName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.botMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.botDisplayName = iprot.readString().decode('utf-8', errors='replace') 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('SquareEventNotifiedRemoveBot')
        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()
        if self.botMid is not None:
            oprot.writeFieldBegin('botMid', TType.STRING, 3)
            oprot.writeString(self.botMid.encode('utf-8') if sys.version_info[0] == 2 else self.botMid)
            oprot.writeFieldEnd()
        if self.botDisplayName is not None:
            oprot.writeFieldBegin('botDisplayName', TType.STRING, 4)
            oprot.writeString(self.botDisplayName.encode('utf-8') if sys.version_info[0] == 2 else self.botDisplayName)
            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 SquareEventNotifiedUpdateReadonlyChat(object):
    """
    Attributes:
     - squareChatMid
     - readonly

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.readonly = 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('SquareEventNotifiedUpdateReadonlyChat')
        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.readonly is not None:
            oprot.writeFieldBegin('readonly', TType.BOOL, 2)
            oprot.writeBool(self.readonly)
            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 MessageStatusContents(object):
    """
    Attributes:
     - messageReactionStatus

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.messageReactionStatus = SquareMessageReactionStatus()
                    self.messageReactionStatus.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('MessageStatusContents')
        if self.messageReactionStatus is not None:
            oprot.writeFieldBegin('messageReactionStatus', TType.STRUCT, 1)
            self.messageReactionStatus.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 SquareMessageStatus(object):
    """
    Attributes:
     - squareChatMid
     - globalMessageId
     - type
     - contents
     - publishedAt

    """


    def __init__(self, squareChatMid=None, globalMessageId=None, type=None, contents=None, publishedAt=None,):
        self.squareChatMid = squareChatMid
        self.globalMessageId = globalMessageId
        self.type = type
        self.contents = contents
        self.publishedAt = publishedAt

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.globalMessageId = iprot.readString().decode('utf-8', errors='replace') 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.STRUCT:
                    self.contents = MessageStatusContents()
                    self.contents.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.publishedAt = 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('SquareMessageStatus')
        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.globalMessageId is not None:
            oprot.writeFieldBegin('globalMessageId', TType.STRING, 2)
            oprot.writeString(self.globalMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.globalMessageId)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 3)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.contents is not None:
            oprot.writeFieldBegin('contents', TType.STRUCT, 4)
            self.contents.write(oprot)
            oprot.writeFieldEnd()
        if self.publishedAt is not None:
            oprot.writeFieldBegin('publishedAt', TType.I64, 5)
            oprot.writeI64(self.publishedAt)
            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 SquareEventNotifiedUpdateMessageStatus(object):
    """
    Attributes:
     - squareChatMid
     - messageId
     - messageStatus

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.messageId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.messageStatus = SquareMessageStatus()
                    self.messageStatus.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('SquareEventNotifiedUpdateMessageStatus')
        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, 2)
            oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId)
            oprot.writeFieldEnd()
        if self.messageStatus is not None:
            oprot.writeFieldBegin('messageStatus', TType.STRUCT, 3)
            self.messageStatus.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 UrlButton(object):
    """
    Attributes:
     - text
     - url

    """


    def __init__(self, text=None, url=None,):
        self.text = text
        self.url = url

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.text = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.url = iprot.readString().decode('utf-8', errors='replace') 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('UrlButton')
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 1)
            oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text)
            oprot.writeFieldEnd()
        if self.url is not None:
            oprot.writeFieldBegin('url', TType.STRING, 2)
            oprot.writeString(self.url.encode('utf-8') if sys.version_info[0] == 2 else self.url)
            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 TextButton(object):
    """
    Attributes:
     - text

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.text = iprot.readString().decode('utf-8', errors='replace') 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('TextButton')
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 1)
            oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text)
            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 OkButton(object):
    """
    Attributes:
     - text

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.text = iprot.readString().decode('utf-8', errors='replace') 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('OkButton')
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 1)
            oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text)
            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 ButtonContent(object):
    """
    Attributes:
     - urlButton
     - textButton
     - okButton

    """


    def __init__(self, urlButton=None, textButton=None, okButton=None,):
        self.urlButton = urlButton
        self.textButton = textButton
        self.okButton = okButton

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.urlButton = UrlButton()
                    self.urlButton.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.textButton = TextButton()
                    self.textButton.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.okButton = OkButton()
                    self.okButton.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('ButtonContent')
        if self.urlButton is not None:
            oprot.writeFieldBegin('urlButton', TType.STRUCT, 1)
            self.urlButton.write(oprot)
            oprot.writeFieldEnd()
        if self.textButton is not None:
            oprot.writeFieldBegin('textButton', TType.STRUCT, 2)
            self.textButton.write(oprot)
            oprot.writeFieldEnd()
        if self.okButton is not None:
            oprot.writeFieldBegin('okButton', TType.STRUCT, 3)
            self.okButton.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 SquareEventChatPopup(object):
    """
    Attributes:
     - squareChatMid
     - popupId
     - flexJson
     - button

    """


    def __init__(self, squareChatMid=None, popupId=None, flexJson=None, button=None,):
        self.squareChatMid = squareChatMid
        self.popupId = popupId
        self.flexJson = flexJson
        self.button = button

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.popupId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.flexJson = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.button = ButtonContent()
                    self.button.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('SquareEventChatPopup')
        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.popupId is not None:
            oprot.writeFieldBegin('popupId', TType.I64, 2)
            oprot.writeI64(self.popupId)
            oprot.writeFieldEnd()
        if self.flexJson is not None:
            oprot.writeFieldBegin('flexJson', TType.STRING, 3)
            oprot.writeString(self.flexJson.encode('utf-8') if sys.version_info[0] == 2 else self.flexJson)
            oprot.writeFieldEnd()
        if self.button is not None:
            oprot.writeFieldBegin('button', TType.STRUCT, 4)
            self.button.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 SquareEventNotifiedSystemMessage(object):
    """
    Attributes:
     - squareChatMid
     - text

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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('SquareEventNotifiedSystemMessage')
        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.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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

    """


    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', errors='replace') 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.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 SquareStatus(object):
    """
    Attributes:
     - memberCount
     - joinRequestCount
     - lastJoinRequestAt
     - openChatCount

    """


    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 SquareEventNotifiedUpdateSquareStatus(object):
    """
    Attributes:
     - squareChatMid
     - squareStatus

    """


    def __init__(self, squareChatMid=None, squareStatus=None,):
        self.squareChatMid = squareChatMid
        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.squareChatMid = iprot.readString().decode('utf-8', errors='replace') 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.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.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 SquareEventNotifiedUpdateSquareMember(object):
    """
    Attributes:
     - squareChatMid
     - squareMemberMid
     - squareMember

    """


    def __init__(self, squareChatMid=None, squareMemberMid=None, squareMember=None,):
        self.squareChatMid = squareChatMid
        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.squareChatMid = iprot.readString().decode('utf-8', errors='replace') 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', errors='replace') 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.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.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

    """


    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', errors='replace') 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', errors='replace') 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 SquareChatStatusWithoutMessage(object):
    """
    Attributes:
     - memberCount
     - unreadMessageCount
     - markedAsReadMessageId
     - mentionedMessageId
     - notifiedMessageType

    """


    def __init__(self, memberCount=None, unreadMessageCount=None, markedAsReadMessageId=None, mentionedMessageId=None, notifiedMessageType=None,):
        self.memberCount = memberCount
        self.unreadMessageCount = unreadMessageCount
        self.markedAsReadMessageId = markedAsReadMessageId
        self.mentionedMessageId = mentionedMessageId
        self.notifiedMessageType = notifiedMessageType

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.markedAsReadMessageId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.mentionedMessageId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.notifiedMessageType = 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()
        if self.markedAsReadMessageId is not None:
            oprot.writeFieldBegin('markedAsReadMessageId', TType.STRING, 3)
            oprot.writeString(self.markedAsReadMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.markedAsReadMessageId)
            oprot.writeFieldEnd()
        if self.mentionedMessageId is not None:
            oprot.writeFieldBegin('mentionedMessageId', TType.STRING, 4)
            oprot.writeString(self.mentionedMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.mentionedMessageId)
            oprot.writeFieldEnd()
        if self.notifiedMessageType is not None:
            oprot.writeFieldBegin('notifiedMessageType', TType.I32, 5)
            oprot.writeI32(self.notifiedMessageType)
            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

    """


    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', errors='replace') 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 SquareChatMember(object):
    """
    Attributes:
     - squareMemberMid
     - squareChatMid
     - revision
     - membershipState
     - notificationForMessage
     - notificationForNewMember

    """


    def __init__(self, squareMemberMid=None, squareChatMid=None, revision=None, membershipState=None, notificationForMessage=None, notificationForNewMember=None,):
        self.squareMemberMid = squareMemberMid
        self.squareChatMid = squareChatMid
        self.revision = revision
        self.membershipState = membershipState
        self.notificationForMessage = notificationForMessage
        self.notificationForNewMember = notificationForNewMember

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.notificationForNewMember = 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()
        if self.notificationForNewMember is not None:
            oprot.writeFieldBegin('notificationForNewMember', TType.BOOL, 6)
            oprot.writeBool(self.notificationForNewMember)
            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
     - squareChatMember

    """


    def __init__(self, squareChatMid=None, squareChatMember=None,):
        self.squareChatMid = squareChatMid
        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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                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.squareChatMember is not None:
            oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 2)
            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 SquareAuthority(object):
    """
    Attributes:
     - squareMid
     - updateSquareProfile
     - inviteNewMember
     - approveJoinRequest
     - createPost
     - createOpenSquareChat
     - deleteSquareChatOrPost
     - removeSquareMember
     - grantRole
     - enableInvitationTicket
     - revision
     - createSquareChatAnnouncement
     - updateMaxChatMemberCount
     - useReadonlyDefaultChat

    """


    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, createSquareChatAnnouncement=None, updateMaxChatMemberCount=None, useReadonlyDefaultChat=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
        self.createSquareChatAnnouncement = createSquareChatAnnouncement
        self.updateMaxChatMemberCount = updateMaxChatMemberCount
        self.useReadonlyDefaultChat = useReadonlyDefaultChat

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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)
            elif fid == 12:
                if ftype == TType.I32:
                    self.createSquareChatAnnouncement = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I32:
                    self.updateMaxChatMemberCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.I32:
                    self.useReadonlyDefaultChat = 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('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()
        if self.createSquareChatAnnouncement is not None:
            oprot.writeFieldBegin('createSquareChatAnnouncement', TType.I32, 12)
            oprot.writeI32(self.createSquareChatAnnouncement)
            oprot.writeFieldEnd()
        if self.updateMaxChatMemberCount is not None:
            oprot.writeFieldBegin('updateMaxChatMemberCount', TType.I32, 13)
            oprot.writeI32(self.updateMaxChatMemberCount)
            oprot.writeFieldEnd()
        if self.useReadonlyDefaultChat is not None:
            oprot.writeFieldBegin('useReadonlyDefaultChat', TType.I32, 14)
            oprot.writeI32(self.useReadonlyDefaultChat)
            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

    """


    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', errors='replace') 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 SquareFeature(object):
    """
    Attributes:
     - controlState
     - booleanValue

    """


    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
     - creatingSquareChat
     - readonlyDefaultChat
     - showingAdvertisement
     - delegateJoinToPlug
     - delegateKickOutToPlug
     - disableUpdateJoinMethod
     - disableTransferAdmin
     - creatingLiveTalk
     - _notSure

    """


    def __init__(self, squareMid=None, revision=None, creatingSecretSquareChat=None, invitingIntoOpenSquareChat=None, creatingSquareChat=None, readonlyDefaultChat=None, showingAdvertisement=None, delegateJoinToPlug=None, delegateKickOutToPlug=None, disableUpdateJoinMethod=None, disableTransferAdmin=None, creatingLiveTalk=None, _notSure=None,):
        self.squareMid = squareMid
        self.revision = revision
        self.creatingSecretSquareChat = creatingSecretSquareChat
        self.invitingIntoOpenSquareChat = invitingIntoOpenSquareChat
        self.creatingSquareChat = creatingSquareChat
        self.readonlyDefaultChat = readonlyDefaultChat
        self.showingAdvertisement = showingAdvertisement
        self.delegateJoinToPlug = delegateJoinToPlug
        self.delegateKickOutToPlug = delegateKickOutToPlug
        self.disableUpdateJoinMethod = disableUpdateJoinMethod
        self.disableTransferAdmin = disableTransferAdmin
        self.creatingLiveTalk = creatingLiveTalk
        self._notSure = _notSure

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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)
            elif fid == 13:
                if ftype == TType.STRUCT:
                    self.creatingSquareChat = SquareFeature()
                    self.creatingSquareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRUCT:
                    self.readonlyDefaultChat = SquareFeature()
                    self.readonlyDefaultChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.STRUCT:
                    self.showingAdvertisement = SquareFeature()
                    self.showingAdvertisement.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.STRUCT:
                    self.delegateJoinToPlug = SquareFeature()
                    self.delegateJoinToPlug.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRUCT:
                    self.delegateKickOutToPlug = SquareFeature()
                    self.delegateKickOutToPlug.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 18:
                if ftype == TType.STRUCT:
                    self.disableUpdateJoinMethod = SquareFeature()
                    self.disableUpdateJoinMethod.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 19:
                if ftype == TType.STRUCT:
                    self.disableTransferAdmin = SquareFeature()
                    self.disableTransferAdmin.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.STRUCT:
                    self.creatingLiveTalk = SquareFeature()
                    self.creatingLiveTalk.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRUCT:
                    self._notSure = SquareFeature()
                    self._notSure.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()
        if self.creatingSquareChat is not None:
            oprot.writeFieldBegin('creatingSquareChat', TType.STRUCT, 13)
            self.creatingSquareChat.write(oprot)
            oprot.writeFieldEnd()
        if self.readonlyDefaultChat is not None:
            oprot.writeFieldBegin('readonlyDefaultChat', TType.STRUCT, 14)
            self.readonlyDefaultChat.write(oprot)
            oprot.writeFieldEnd()
        if self.showingAdvertisement is not None:
            oprot.writeFieldBegin('showingAdvertisement', TType.STRUCT, 15)
            self.showingAdvertisement.write(oprot)
            oprot.writeFieldEnd()
        if self.delegateJoinToPlug is not None:
            oprot.writeFieldBegin('delegateJoinToPlug', TType.STRUCT, 16)
            self.delegateJoinToPlug.write(oprot)
            oprot.writeFieldEnd()
        if self.delegateKickOutToPlug is not None:
            oprot.writeFieldBegin('delegateKickOutToPlug', TType.STRUCT, 17)
            self.delegateKickOutToPlug.write(oprot)
            oprot.writeFieldEnd()
        if self.disableUpdateJoinMethod is not None:
            oprot.writeFieldBegin('disableUpdateJoinMethod', TType.STRUCT, 18)
            self.disableUpdateJoinMethod.write(oprot)
            oprot.writeFieldEnd()
        if self.disableTransferAdmin is not None:
            oprot.writeFieldBegin('disableTransferAdmin', TType.STRUCT, 19)
            self.disableTransferAdmin.write(oprot)
            oprot.writeFieldEnd()
        if self.creatingLiveTalk is not None:
            oprot.writeFieldBegin('creatingLiveTalk', TType.STRUCT, 20)
            self.creatingLiveTalk.write(oprot)
            oprot.writeFieldEnd()
        if self._notSure is not None:
            oprot.writeFieldBegin('_notSure', TType.STRUCT, 21)
            self._notSure.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 NoteStatus(object):
    """
    Attributes:
     - noteCount
     - latestCreatedAt

    """


    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 SquareEventNotifiedCreateSquareMember(object):
    """
    Attributes:
     - square
     - squareAuthority
     - squareStatus
     - squareMember
     - squareFeatureSet
     - noteStatus

    """


    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('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()
        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 SquareChatStatus(object):
    """
    Attributes:
     - lastMessage
     - senderDisplayName
     - otherStatus

    """


    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', errors='replace') 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 SquareChatFeature(object):
    """
    Attributes:
     - controlState
     - booleanValue

    """


    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('SquareChatFeature')
        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 SquareChatFeatureSet(object):
    """
    Attributes:
     - squareChatMid
     - revision
     - disableUpdateMaxChatMemberCount
     - disableMarkAsReadEvent

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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.disableUpdateMaxChatMemberCount = SquareChatFeature()
                    self.disableUpdateMaxChatMemberCount.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRUCT:
                    self.disableMarkAsReadEvent = SquareChatFeature()
                    self.disableMarkAsReadEvent.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('SquareChatFeatureSet')
        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()
        if self.disableUpdateMaxChatMemberCount is not None:
            oprot.writeFieldBegin('disableUpdateMaxChatMemberCount', TType.STRUCT, 11)
            self.disableUpdateMaxChatMemberCount.write(oprot)
            oprot.writeFieldEnd()
        if self.disableMarkAsReadEvent is not None:
            oprot.writeFieldBegin('disableMarkAsReadEvent', TType.STRUCT, 12)
            self.disableMarkAsReadEvent.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:
     - chat
     - chatStatus
     - chatMember
     - joinedAt
     - peerSquareMember
     - squareChatFeatureSet

    """


    def __init__(self, chat=None, chatStatus=None, chatMember=None, joinedAt=None, peerSquareMember=None, squareChatFeatureSet=None,):
        self.chat = chat
        self.chatStatus = chatStatus
        self.chatMember = chatMember
        self.joinedAt = joinedAt
        self.peerSquareMember = peerSquareMember
        self.squareChatFeatureSet = squareChatFeatureSet

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chat = SquareChat()
                    self.chat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.chatStatus = SquareChatStatus()
                    self.chatStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.chatMember = SquareChatMember()
                    self.chatMember.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.joinedAt = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.peerSquareMember = SquareMember()
                    self.peerSquareMember.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.squareChatFeatureSet = SquareChatFeatureSet()
                    self.squareChatFeatureSet.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.chat is not None:
            oprot.writeFieldBegin('chat', TType.STRUCT, 1)
            self.chat.write(oprot)
            oprot.writeFieldEnd()
        if self.chatStatus is not None:
            oprot.writeFieldBegin('chatStatus', TType.STRUCT, 2)
            self.chatStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.chatMember is not None:
            oprot.writeFieldBegin('chatMember', TType.STRUCT, 3)
            self.chatMember.write(oprot)
            oprot.writeFieldEnd()
        if self.joinedAt is not None:
            oprot.writeFieldBegin('joinedAt', TType.I64, 4)
            oprot.writeI64(self.joinedAt)
            oprot.writeFieldEnd()
        if self.peerSquareMember is not None:
            oprot.writeFieldBegin('peerSquareMember', TType.STRUCT, 5)
            self.peerSquareMember.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChatFeatureSet is not None:
            oprot.writeFieldBegin('squareChatFeatureSet', TType.STRUCT, 6)
            self.squareChatFeatureSet.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

    """


    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', errors='replace') 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', errors='replace') 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', errors='replace') 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 SquareEventNotifiedUpdateSquareFeatureSet(object):
    """
    Attributes:
     - squareFeatureSet

    """


    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 SquareEventNotifiedUpdateSquareChatFeatureSet(object):
    """
    Attributes:
     - squareChatFeatureSet

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.squareChatFeatureSet = SquareChatFeatureSet()
                    self.squareChatFeatureSet.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('SquareEventNotifiedUpdateSquareChatFeatureSet')
        if self.squareChatFeatureSet is not None:
            oprot.writeFieldBegin('squareChatFeatureSet', TType.STRUCT, 1)
            self.squareChatFeatureSet.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 SquareEventNotifiedUpdateSquareNoteStatus(object):
    """
    Attributes:
     - squareMid
     - noteStatus

    """


    def __init__(self, squareMid=None, noteStatus=None,):
        self.squareMid = squareMid
        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.STRING:
                    self.squareMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                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('SquareEventNotifiedUpdateSquareNoteStatus')
        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.noteStatus is not None:
            oprot.writeFieldBegin('noteStatus', TType.STRUCT, 2)
            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 SquareEventNotifiedUpdateSquareChatAnnouncement(object):
    """
    Attributes:
     - squareChatMid
     - announcementSeq

    """


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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareChatAnnouncement')
        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.announcementSeq is not None:
            oprot.writeFieldBegin('announcementSeq', TType.I64, 2)
            oprot.writeI64(self.announcementSeq)
            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

    """


    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', errors='replace') 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', errors='replace') 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', errors='replace') 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', errors='replace') 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

    """


    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', errors='replace') 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', errors='replace') 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', errors='replace') 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

    """


    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', errors='replace') 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', errors='replace') 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', errors='replace') 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

    """


    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', errors='replace') 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', errors='replace') 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', errors='replace') 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
     - mentionedMessageId
     - notifiedMessageType
     - reqSeq

    """


    def __init__(self, squareChatMid=None, squareMessage=None, senderDisplayName=None, unreadCount=None, requiredToFetchChatEvents=None, mentionedMessageId=None, notifiedMessageType=None, reqSeq=None,):
        self.squareChatMid = squareChatMid
        self.squareMessage = squareMessage
        self.senderDisplayName = senderDisplayName
        self.unreadCount = unreadCount
        self.requiredToFetchChatEvents = requiredToFetchChatEvents
        self.mentionedMessageId = mentionedMessageId
        self.notifiedMessageType = notifiedMessageType
        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', errors='replace') 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', errors='replace') 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)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.mentionedMessageId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.notifiedMessageType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                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('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()
        if self.mentionedMessageId is not None:
            oprot.writeFieldBegin('mentionedMessageId', TType.STRING, 6)
            oprot.writeString(self.mentionedMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.mentionedMessageId)
            oprot.writeFieldEnd()
        if self.notifiedMessageType is not None:
            oprot.writeFieldBegin('notifiedMessageType', TType.I32, 7)
            oprot.writeI32(self.notifiedMessageType)
            oprot.writeFieldEnd()
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 8)
            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 SquareEventNotificationPostAnnouncement(object):
    """
    Attributes:
     - squareMid
     - squareName
     - squareProfileImageObsHash
     - actionUri

    """


    def __init__(self, squareMid=None, squareName=None, squareProfileImageObsHash=None, actionUri=None,):
        self.squareMid = squareMid
        self.squareName = squareName
        self.squareProfileImageObsHash = squareProfileImageObsHash
        self.actionUri = actionUri

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.squareProfileImageObsHash = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.actionUri = iprot.readString().decode('utf-8', errors='replace') 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('SquareEventNotificationPostAnnouncement')
        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.squareProfileImageObsHash is not None:
            oprot.writeFieldBegin('squareProfileImageObsHash', TType.STRING, 3)
            oprot.writeString(self.squareProfileImageObsHash.encode('utf-8') if sys.version_info[0] == 2 else self.squareProfileImageObsHash)
            oprot.writeFieldEnd()
        if self.actionUri is not None:
            oprot.writeFieldBegin('actionUri', TType.STRING, 4)
            oprot.writeString(self.actionUri.encode('utf-8') if sys.version_info[0] == 2 else self.actionUri)
            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 SquareEventNotificationPost(object):
    """
    Attributes:
     - squareMid
     - notificationPostType
     - thumbnailObsHash
     - text
     - actionUri

    """


    def __init__(self, squareMid=None, notificationPostType=None, thumbnailObsHash=None, text=None, actionUri=None,):
        self.squareMid = squareMid
        self.notificationPostType = notificationPostType
        self.thumbnailObsHash = thumbnailObsHash
        self.text = text
        self.actionUri = actionUri

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.notificationPostType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.thumbnailObsHash = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.text = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.actionUri = iprot.readString().decode('utf-8', errors='replace') 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('SquareEventNotificationPost')
        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.notificationPostType is not None:
            oprot.writeFieldBegin('notificationPostType', TType.I32, 2)
            oprot.writeI32(self.notificationPostType)
            oprot.writeFieldEnd()
        if self.thumbnailObsHash is not None:
            oprot.writeFieldBegin('thumbnailObsHash', TType.STRING, 3)
            oprot.writeString(self.thumbnailObsHash.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailObsHash)
            oprot.writeFieldEnd()
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 4)
            oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text)
            oprot.writeFieldEnd()
        if self.actionUri is not None:
            oprot.writeFieldBegin('actionUri', TType.STRING, 5)
            oprot.writeString(self.actionUri.encode('utf-8') if sys.version_info[0] == 2 else self.actionUri)
            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 SquareEventNotificationNewChatMember(object):
    """
    Attributes:
     - squareChatMid
     - squareChatName

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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('SquareEventNotificationNewChatMember')
        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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SquareEventNotificationMessageReaction(object):
    """
    Attributes:
     - squareChatMid
     - messageId
     - squareChatName
     - reactorName
     - thumbnailObsHash
     - messageText
     - type

    """


    def __init__(self, squareChatMid=None, messageId=None, squareChatName=None, reactorName=None, thumbnailObsHash=None, messageText=None, type=None,):
        self.squareChatMid = squareChatMid
        self.messageId = messageId
        self.squareChatName = squareChatName
        self.reactorName = reactorName
        self.thumbnailObsHash = thumbnailObsHash
        self.messageText = messageText
        self.type = type

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SquareEventNotificationMessageReaction')
        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, 2)
            oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId)
            oprot.writeFieldEnd()
        if self.squareChatName is not None:
            oprot.writeFieldBegin('squareChatName', TType.STRING, 3)
            oprot.writeString(self.squareChatName.encode('utf-8') if sys.version_info[0] == 2 else self.squareChatName)
            oprot.writeFieldEnd()
        if self.reactorName is not None:
            oprot.writeFieldBegin('reactorName', TType.STRING, 4)
            oprot.writeString(self.reactorName.encode('utf-8') if sys.version_info[0] == 2 else self.reactorName)
            oprot.writeFieldEnd()
        if self.thumbnailObsHash is not None:
            oprot.writeFieldBegin('thumbnailObsHash', TType.STRING, 5)
            oprot.writeString(self.thumbnailObsHash.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailObsHash)
            oprot.writeFieldEnd()
        if self.messageText is not None:
            oprot.writeFieldBegin('messageText', TType.STRING, 6)
            oprot.writeString(self.messageText.encode('utf-8') if sys.version_info[0] == 2 else self.messageText)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 7)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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
     - notifiedUpdateSquare
     - notifiedUpdateSquareMember
     - notifiedUpdateSquareChat
     - notifiedUpdateSquareChatMember
     - notifiedUpdateSquareAuthority
     - notifiedUpdateSquareStatus
     - notifiedUpdateSquareChatStatus
     - notifiedCreateSquareMember
     - notifiedCreateSquareChatMember
     - notifiedUpdateSquareMemberRelation
     - notifiedShutdownSquare
     - notifiedKickoutFromSquare
     - notifiedDeleteSquareChat
     - notificationJoinRequest
     - notificationJoined
     - notificationPromoteCoadmin
     - notificationPromoteAdmin
     - notificationDemoteMember
     - notificationKickedOut
     - notificationSquareDelete
     - notificationSquareChatDelete
     - notificationMessage
     - notifiedUpdateSquareChatProfileName
     - notifiedUpdateSquareChatProfileImage
     - notifiedUpdateSquareFeatureSet
     - notifiedAddBot
     - notifiedRemoveBot
     - notifiedUpdateSquareNoteStatus
     - notifiedUpdateSquareChatAnnouncement
     - notifiedUpdateSquareChatMaxMemberCount
     - notificationPostAnnouncement
     - notificationPost
     - mutateMessage
     - notificationNewChatMember
     - notifiedUpdateReadonlyChat
     - notifiedUpdateMessageStatus
     - notificationMessageReaction
     - chatPopup
     - notifiedSystemMessage
     - notifiedUpdateSquareChatFeatureSet

    """


    def __init__(self, receiveMessage=None, sendMessage=None, notifiedJoinSquareChat=None, notifiedInviteIntoSquareChat=None, notifiedLeaveSquareChat=None, notifiedDestroyMessage=None, notifiedMarkAsRead=None, notifiedUpdateSquareMemberProfile=None, notifiedUpdateSquare=None, notifiedUpdateSquareMember=None, notifiedUpdateSquareChat=None, notifiedUpdateSquareChatMember=None, notifiedUpdateSquareAuthority=None, notifiedUpdateSquareStatus=None, notifiedUpdateSquareChatStatus=None, notifiedCreateSquareMember=None, notifiedCreateSquareChatMember=None, notifiedUpdateSquareMemberRelation=None, notifiedShutdownSquare=None, notifiedKickoutFromSquare=None, notifiedDeleteSquareChat=None, notificationJoinRequest=None, notificationJoined=None, notificationPromoteCoadmin=None, notificationPromoteAdmin=None, notificationDemoteMember=None, notificationKickedOut=None, notificationSquareDelete=None, notificationSquareChatDelete=None, notificationMessage=None, notifiedUpdateSquareChatProfileName=None, notifiedUpdateSquareChatProfileImage=None, notifiedUpdateSquareFeatureSet=None, notifiedAddBot=None, notifiedRemoveBot=None, notifiedUpdateSquareNoteStatus=None, notifiedUpdateSquareChatAnnouncement=None, notifiedUpdateSquareChatMaxMemberCount=None, notificationPostAnnouncement=None, notificationPost=None, mutateMessage=None, notificationNewChatMember=None, notifiedUpdateReadonlyChat=None, notifiedUpdateMessageStatus=None, notificationMessageReaction=None, chatPopup=None, notifiedSystemMessage=None, notifiedUpdateSquareChatFeatureSet=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.notifiedUpdateSquare = notifiedUpdateSquare
        self.notifiedUpdateSquareMember = notifiedUpdateSquareMember
        self.notifiedUpdateSquareChat = notifiedUpdateSquareChat
        self.notifiedUpdateSquareChatMember = notifiedUpdateSquareChatMember
        self.notifiedUpdateSquareAuthority = notifiedUpdateSquareAuthority
        self.notifiedUpdateSquareStatus = notifiedUpdateSquareStatus
        self.notifiedUpdateSquareChatStatus = notifiedUpdateSquareChatStatus
        self.notifiedCreateSquareMember = notifiedCreateSquareMember
        self.notifiedCreateSquareChatMember = notifiedCreateSquareChatMember
        self.notifiedUpdateSquareMemberRelation = notifiedUpdateSquareMemberRelation
        self.notifiedShutdownSquare = notifiedShutdownSquare
        self.notifiedKickoutFromSquare = notifiedKickoutFromSquare
        self.notifiedDeleteSquareChat = notifiedDeleteSquareChat
        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.notifiedUpdateSquareChatProfileName = notifiedUpdateSquareChatProfileName
        self.notifiedUpdateSquareChatProfileImage = notifiedUpdateSquareChatProfileImage
        self.notifiedUpdateSquareFeatureSet = notifiedUpdateSquareFeatureSet
        self.notifiedAddBot = notifiedAddBot
        self.notifiedRemoveBot = notifiedRemoveBot
        self.notifiedUpdateSquareNoteStatus = notifiedUpdateSquareNoteStatus
        self.notifiedUpdateSquareChatAnnouncement = notifiedUpdateSquareChatAnnouncement
        self.notifiedUpdateSquareChatMaxMemberCount = notifiedUpdateSquareChatMaxMemberCount
        self.notificationPostAnnouncement = notificationPostAnnouncement
        self.notificationPost = notificationPost
        self.mutateMessage = mutateMessage
        self.notificationNewChatMember = notificationNewChatMember
        self.notifiedUpdateReadonlyChat = notifiedUpdateReadonlyChat
        self.notifiedUpdateMessageStatus = notifiedUpdateMessageStatus
        self.notificationMessageReaction = notificationMessageReaction
        self.chatPopup = chatPopup
        self.notifiedSystemMessage = notifiedSystemMessage
        self.notifiedUpdateSquareChatFeatureSet = notifiedUpdateSquareChatFeatureSet

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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 == 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 == 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 == 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 == 19:
                if ftype == TType.STRUCT:
                    self.notifiedShutdownSquare = SquareEventNotifiedShutdownSquare()
                    self.notifiedShutdownSquare.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 == 21:
                if ftype == TType.STRUCT:
                    self.notifiedDeleteSquareChat = SquareEventNotifiedDeleteSquareChat()
                    self.notifiedDeleteSquareChat.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 == 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 == 33:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareFeatureSet = SquareEventNotifiedUpdateSquareFeatureSet()
                    self.notifiedUpdateSquareFeatureSet.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 34:
                if ftype == TType.STRUCT:
                    self.notifiedAddBot = SquareEventNotifiedAddBot()
                    self.notifiedAddBot.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 35:
                if ftype == TType.STRUCT:
                    self.notifiedRemoveBot = SquareEventNotifiedRemoveBot()
                    self.notifiedRemoveBot.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 36:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareNoteStatus = SquareEventNotifiedUpdateSquareNoteStatus()
                    self.notifiedUpdateSquareNoteStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 37:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareChatAnnouncement = SquareEventNotifiedUpdateSquareChatAnnouncement()
                    self.notifiedUpdateSquareChatAnnouncement.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 38:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareChatMaxMemberCount = SquareEventNotifiedUpdateSquareChatMaxMemberCount()
                    self.notifiedUpdateSquareChatMaxMemberCount.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 39:
                if ftype == TType.STRUCT:
                    self.notificationPostAnnouncement = SquareEventNotificationPostAnnouncement()
                    self.notificationPostAnnouncement.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 40:
                if ftype == TType.STRUCT:
                    self.notificationPost = SquareEventNotificationPost()
                    self.notificationPost.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 41:
                if ftype == TType.STRUCT:
                    self.mutateMessage = SquareEventMutateMessage()
                    self.mutateMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 42:
                if ftype == TType.STRUCT:
                    self.notificationNewChatMember = SquareEventNotificationNewChatMember()
                    self.notificationNewChatMember.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 43:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateReadonlyChat = SquareEventNotifiedUpdateReadonlyChat()
                    self.notifiedUpdateReadonlyChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 44:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateMessageStatus = SquareEventNotifiedUpdateMessageStatus()
                    self.notifiedUpdateMessageStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 45:
                if ftype == TType.STRUCT:
                    self.notificationMessageReaction = SquareEventNotificationMessageReaction()
                    self.notificationMessageReaction.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 46:
                if ftype == TType.STRUCT:
                    self.chatPopup = SquareEventChatPopup()
                    self.chatPopup.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 47:
                if ftype == TType.STRUCT:
                    self.notifiedSystemMessage = SquareEventNotifiedSystemMessage()
                    self.notifiedSystemMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 48:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareChatFeatureSet = SquareEventNotifiedUpdateSquareChatFeatureSet()
                    self.notifiedUpdateSquareChatFeatureSet.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()
        if self.notifiedAddBot is not None:
            oprot.writeFieldBegin('notifiedAddBot', TType.STRUCT, 34)
            self.notifiedAddBot.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedRemoveBot is not None:
            oprot.writeFieldBegin('notifiedRemoveBot', TType.STRUCT, 35)
            self.notifiedRemoveBot.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedUpdateSquareNoteStatus is not None:
            oprot.writeFieldBegin('notifiedUpdateSquareNoteStatus', TType.STRUCT, 36)
            self.notifiedUpdateSquareNoteStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedUpdateSquareChatAnnouncement is not None:
            oprot.writeFieldBegin('notifiedUpdateSquareChatAnnouncement', TType.STRUCT, 37)
            self.notifiedUpdateSquareChatAnnouncement.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedUpdateSquareChatMaxMemberCount is not None:
            oprot.writeFieldBegin('notifiedUpdateSquareChatMaxMemberCount', TType.STRUCT, 38)
            self.notifiedUpdateSquareChatMaxMemberCount.write(oprot)
            oprot.writeFieldEnd()
        if self.notificationPostAnnouncement is not None:
            oprot.writeFieldBegin('notificationPostAnnouncement', TType.STRUCT, 39)
            self.notificationPostAnnouncement.write(oprot)
            oprot.writeFieldEnd()
        if self.notificationPost is not None:
            oprot.writeFieldBegin('notificationPost', TType.STRUCT, 40)
            self.notificationPost.write(oprot)
            oprot.writeFieldEnd()
        if self.mutateMessage is not None:
            oprot.writeFieldBegin('mutateMessage', TType.STRUCT, 41)
            self.mutateMessage.write(oprot)
            oprot.writeFieldEnd()
        if self.notificationNewChatMember is not None:
            oprot.writeFieldBegin('notificationNewChatMember', TType.STRUCT, 42)
            self.notificationNewChatMember.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedUpdateReadonlyChat is not None:
            oprot.writeFieldBegin('notifiedUpdateReadonlyChat', TType.STRUCT, 43)
            self.notifiedUpdateReadonlyChat.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedUpdateMessageStatus is not None:
            oprot.writeFieldBegin('notifiedUpdateMessageStatus', TType.STRUCT, 44)
            self.notifiedUpdateMessageStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.notificationMessageReaction is not None:
            oprot.writeFieldBegin('notificationMessageReaction', TType.STRUCT, 45)
            self.notificationMessageReaction.write(oprot)
            oprot.writeFieldEnd()
        if self.chatPopup is not None:
            oprot.writeFieldBegin('chatPopup', TType.STRUCT, 46)
            self.chatPopup.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedSystemMessage is not None:
            oprot.writeFieldBegin('notifiedSystemMessage', TType.STRUCT, 47)
            self.notifiedSystemMessage.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedUpdateSquareChatFeatureSet is not None:
            oprot.writeFieldBegin('notifiedUpdateSquareChatFeatureSet', TType.STRUCT, 48)
            self.notifiedUpdateSquareChatFeatureSet.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

    """


    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', errors='replace') 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 SendMessageResponse(object):
    """
    Attributes:
     - createdSquareMessage

    """


    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 UnsendMessageResponse(object):
    """
    Attributes:
     - unsentMessage

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.unsentMessage = SquareMessage()
                    self.unsentMessage.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('UnsendMessageResponse')
        if self.unsentMessage is not None:
            oprot.writeFieldBegin('unsentMessage', TType.STRUCT, 1)
            self.unsentMessage.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 FetchMyEventsResponse(object):
    """
    Attributes:
     - subscription
     - events
     - syncToken
     - continuationToken

    """


    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 = []
                    (_etype502, _size499) = iprot.readListBegin()
                    for _i503 in range(_size499):
                        _elem504 = SquareEvent()
                        _elem504.read(iprot)
                        self.events.append(_elem504)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.syncToken = iprot.readString().decode('utf-8', errors='replace') 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', errors='replace') 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 iter505 in self.events:
                iter505.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 GetSquareEmidResponse(object):
    """
    Attributes:
     - squareEmid

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.squareEmid = iprot.readString().decode('utf-8', errors='replace') 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('GetSquareEmidResponse')
        if self.squareEmid is not None:
            oprot.writeFieldBegin('squareEmid', TType.STRING, 1)
            oprot.writeString(self.squareEmid.encode('utf-8') if sys.version_info[0] == 2 else self.squareEmid)
            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 GetSquareMembersBySquareResponse(object):
    """
    Attributes:
     - members

    """


    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.LIST:
                    self.members = []
                    (_etype509, _size506) = iprot.readListBegin()
                    for _i510 in range(_size506):
                        _elem511 = SquareMember()
                        _elem511.read(iprot)
                        self.members.append(_elem511)
                    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('GetSquareMembersBySquareResponse')
        if self.members is not None:
            oprot.writeFieldBegin('members', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.members))
            for iter512 in self.members:
                iter512.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 ManualRepairResponse(object):
    """
    Attributes:
     - events
     - syncToken
     - continuationToken

    """


    def __init__(self, events=None, syncToken=None, continuationToken=None,):
        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.LIST:
                    self.events = []
                    (_etype516, _size513) = iprot.readListBegin()
                    for _i517 in range(_size513):
                        _elem518 = SquareEvent()
                        _elem518.read(iprot)
                        self.events.append(_elem518)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.syncToken = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readString().decode('utf-8', errors='replace') 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('ManualRepairResponse')
        if self.events is not None:
            oprot.writeFieldBegin('events', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.events))
            for iter519 in self.events:
                iter519.write(oprot)
            oprot.writeListEnd()
            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.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 InviteIntoSquareChatResponse(object):
    """
    Attributes:
     - inviteeMids

    """


    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 = []
                    (_etype523, _size520) = iprot.readListBegin()
                    for _i524 in range(_size520):
                        _elem525 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.inviteeMids.append(_elem525)
                    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('InviteIntoSquareChatResponse')
        if self.inviteeMids is not None:
            oprot.writeFieldBegin('inviteeMids', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.inviteeMids))
            for iter526 in self.inviteeMids:
                oprot.writeString(iter526.encode('utf-8') if sys.version_info[0] == 2 else iter526)
            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 InviteToSquareResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._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 GetJoinedSquaresResponse(object):
    """
    Attributes:
     - squares
     - members
     - authorities
     - statuses
     - continuationToken
     - noteStatuses

    """


    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 = []
                    (_etype530, _size527) = iprot.readListBegin()
                    for _i531 in range(_size527):
                        _elem532 = Square()
                        _elem532.read(iprot)
                        self.squares.append(_elem532)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.members = {}
                    (_ktype534, _vtype535, _size533) = iprot.readMapBegin()
                    for _i537 in range(_size533):
                        _key538 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val539 = SquareMember()
                        _val539.read(iprot)
                        self.members[_key538] = _val539
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.authorities = {}
                    (_ktype541, _vtype542, _size540) = iprot.readMapBegin()
                    for _i544 in range(_size540):
                        _key545 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val546 = SquareAuthority()
                        _val546.read(iprot)
                        self.authorities[_key545] = _val546
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.MAP:
                    self.statuses = {}
                    (_ktype548, _vtype549, _size547) = iprot.readMapBegin()
                    for _i551 in range(_size547):
                        _key552 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val553 = SquareStatus()
                        _val553.read(iprot)
                        self.statuses[_key552] = _val553
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.MAP:
                    self.noteStatuses = {}
                    (_ktype555, _vtype556, _size554) = iprot.readMapBegin()
                    for _i558 in range(_size554):
                        _key559 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val560 = NoteStatus()
                        _val560.read(iprot)
                        self.noteStatuses[_key559] = _val560
                    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 iter561 in self.squares:
                iter561.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 kiter562, viter563 in self.members.items():
                oprot.writeString(kiter562.encode('utf-8') if sys.version_info[0] == 2 else kiter562)
                viter563.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 kiter564, viter565 in self.authorities.items():
                oprot.writeString(kiter564.encode('utf-8') if sys.version_info[0] == 2 else kiter564)
                viter565.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 kiter566, viter567 in self.statuses.items():
                oprot.writeString(kiter566.encode('utf-8') if sys.version_info[0] == 2 else kiter566)
                viter567.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 kiter568, viter569 in self.noteStatuses.items():
                oprot.writeString(kiter568.encode('utf-8') if sys.version_info[0] == 2 else kiter568)
                viter569.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 MarkAsReadResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._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 ReactToMessageResponse(object):
    """
    Attributes:
     - reaction
     - status

    """


    def __init__(self, reaction=None, status=None,):
        self.reaction = reaction
        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.reaction = SquareMessageReaction()
                    self.reaction.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.status = SquareMessageReactionStatus()
                    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('ReactToMessageResponse')
        if self.reaction is not None:
            oprot.writeFieldBegin('reaction', TType.STRUCT, 1)
            self.reaction.write(oprot)
            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 FindSquareByInvitationTicketResponse(object):
    """
    Attributes:
     - square
     - myMembership
     - squareAuthority
     - squareStatus
     - squareFeatureSet
     - noteStatus
     - chat
     - chatStatus

    """


    def __init__(self, square=None, myMembership=None, squareAuthority=None, squareStatus=None, squareFeatureSet=None, noteStatus=None, chat=None, chatStatus=None,):
        self.square = square
        self.myMembership = myMembership
        self.squareAuthority = squareAuthority
        self.squareStatus = squareStatus
        self.squareFeatureSet = squareFeatureSet
        self.noteStatus = noteStatus
        self.chat = chat
        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.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.myMembership = SquareMember()
                    self.myMembership.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareAuthority = SquareAuthority()
                    self.squareAuthority.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.squareStatus = SquareStatus()
                    self.squareStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.squareFeatureSet = SquareFeatureSet()
                    self.squareFeatureSet.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.noteStatus = NoteStatus()
                    self.noteStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRUCT:
                    self.chat = SquareChat()
                    self.chat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                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('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()
        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()
        if self.chat is not None:
            oprot.writeFieldBegin('chat', TType.STRUCT, 7)
            self.chat.write(oprot)
            oprot.writeFieldEnd()
        if self.chatStatus is not None:
            oprot.writeFieldBegin('chatStatus', TType.STRUCT, 8)
            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 SubscriptionState(object):
    """
    Attributes:
     - subscriptionId
     - ttlMillis

    """


    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 FetchSquareChatEventsResponse(object):
    """
    Attributes:
     - subscription
     - events
     - syncToken
     - continuationToken

    """


    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 = []
                    (_etype573, _size570) = iprot.readListBegin()
                    for _i574 in range(_size570):
                        _elem575 = SquareEvent()
                        _elem575.read(iprot)
                        self.events.append(_elem575)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.syncToken = iprot.readString().decode('utf-8', errors='replace') 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', errors='replace') 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 iter576 in self.events:
                iter576.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 GetSquareResponse(object):
    """
    Attributes:
     - square
     - myMembership
     - squareAuthority
     - squareStatus
     - squareFeatureSet
     - noteStatus

    """


    def __init__(self, square=None, myMembership=None, squareAuthority=None, squareStatus=None, squareFeatureSet=None, noteStatus=None,):
        self.square = square
        self.myMembership = myMembership
        self.squareAuthority = squareAuthority
        self.squareStatus = squareStatus
        self.squareFeatureSet = squareFeatureSet
        self.noteStatus = noteStatus

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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)
            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('GetSquareResponse')
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 1)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        if self.myMembership is not None:
            oprot.writeFieldBegin('myMembership', TType.STRUCT, 2)
            self.myMembership.write(oprot)
            oprot.writeFieldEnd()
        if self.squareAuthority is not None:
            oprot.writeFieldBegin('squareAuthority', TType.STRUCT, 3)
            self.squareAuthority.write(oprot)
            oprot.writeFieldEnd()
        if self.squareStatus is not None:
            oprot.writeFieldBegin('squareStatus', TType.STRUCT, 4)
            self.squareStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.squareFeatureSet is not None:
            oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 5)
            self.squareFeatureSet.write(oprot)
            oprot.writeFieldEnd()
        if self.noteStatus is not None:
            oprot.writeFieldBegin('noteStatus', TType.STRUCT, 6)
            self.noteStatus.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

    """


    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 = []
                    (_etype580, _size577) = iprot.readListBegin()
                    for _i581 in range(_size577):
                        _elem582 = SquareChat()
                        _elem582.read(iprot)
                        self.squareChats.append(_elem582)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readString().decode('utf-8', errors='replace') 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 = {}
                    (_ktype584, _vtype585, _size583) = iprot.readMapBegin()
                    for _i587 in range(_size583):
                        _key588 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val589 = SquareChatStatus()
                        _val589.read(iprot)
                        self.squareChatStatuses[_key588] = _val589
                    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 iter590 in self.squareChats:
                iter590.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 kiter591, viter592 in self.squareChatStatuses.items():
                oprot.writeString(kiter591.encode('utf-8') if sys.version_info[0] == 2 else kiter591)
                viter592.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 CreateSquareResponse(object):
    """
    Attributes:
     - square
     - creator
     - authority
     - status
     - featureSet
     - noteStatus
     - squareChat
     - squareChatStatus
     - squareChatMember
     - squareChatFeatureSet

    """


    def __init__(self, square=None, creator=None, authority=None, status=None, featureSet=None, noteStatus=None, squareChat=None, squareChatStatus=None, squareChatMember=None, squareChatFeatureSet=None,):
        self.square = square
        self.creator = creator
        self.authority = authority
        self.status = status
        self.featureSet = featureSet
        self.noteStatus = noteStatus
        self.squareChat = squareChat
        self.squareChatStatus = squareChatStatus
        self.squareChatMember = squareChatMember
        self.squareChatFeatureSet = squareChatFeatureSet

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.featureSet = SquareFeatureSet()
                    self.featureSet.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.noteStatus = NoteStatus()
                    self.noteStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRUCT:
                    self.squareChat = SquareChat()
                    self.squareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRUCT:
                    self.squareChatStatus = SquareChatStatus()
                    self.squareChatStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRUCT:
                    self.squareChatMember = SquareChatMember()
                    self.squareChatMember.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRUCT:
                    self.squareChatFeatureSet = SquareChatFeatureSet()
                    self.squareChatFeatureSet.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()
        if self.featureSet is not None:
            oprot.writeFieldBegin('featureSet', TType.STRUCT, 5)
            self.featureSet.write(oprot)
            oprot.writeFieldEnd()
        if self.noteStatus is not None:
            oprot.writeFieldBegin('noteStatus', TType.STRUCT, 6)
            self.noteStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChat is not None:
            oprot.writeFieldBegin('squareChat', TType.STRUCT, 7)
            self.squareChat.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChatStatus is not None:
            oprot.writeFieldBegin('squareChatStatus', TType.STRUCT, 8)
            self.squareChatStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChatMember is not None:
            oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 9)
            self.squareChatMember.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChatFeatureSet is not None:
            oprot.writeFieldBegin('squareChatFeatureSet', TType.STRUCT, 10)
            self.squareChatFeatureSet.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 TextMessageAnnouncementContents(object):
    """
    Attributes:
     - messageId
     - text
     - senderSquareMemberMid
     - createdAt
     - senderMid

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') 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', errors='replace') 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)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.senderMid = iprot.readString().decode('utf-8', errors='replace') 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('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()
        if self.senderMid is not None:
            oprot.writeFieldBegin('senderMid', TType.STRING, 5)
            oprot.writeString(self.senderMid.encode('utf-8') if sys.version_info[0] == 2 else self.senderMid)
            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

    """


    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
     - createdAt
     - creator

    """


    def __init__(self, announcementSeq=None, type=None, contents=None, createdAt=None, creator=None,):
        self.announcementSeq = announcementSeq
        self.type = type
        self.contents = contents
        self.createdAt = createdAt
        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.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)
            elif fid == 4:
                if ftype == TType.I64:
                    self.createdAt = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.creator = iprot.readString().decode('utf-8', errors='replace') 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('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()
        if self.createdAt is not None:
            oprot.writeFieldBegin('createdAt', TType.I64, 4)
            oprot.writeI64(self.createdAt)
            oprot.writeFieldEnd()
        if self.creator is not None:
            oprot.writeFieldBegin('creator', TType.STRING, 5)
            oprot.writeString(self.creator.encode('utf-8') if sys.version_info[0] == 2 else self.creator)
            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 GetSquareChatAnnouncementsResponse(object):
    """
    Attributes:
     - announcements

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.announcements = []
                    (_etype596, _size593) = iprot.readListBegin()
                    for _i597 in range(_size593):
                        _elem598 = SquareChatAnnouncement()
                        _elem598.read(iprot)
                        self.announcements.append(_elem598)
                    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('GetSquareChatAnnouncementsResponse')
        if self.announcements is not None:
            oprot.writeFieldBegin('announcements', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.announcements))
            for iter599 in self.announcements:
                iter599.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 GetSquareFeatureSetResponse(object):
    """
    Attributes:
     - squareFeatureSet

    """


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

    def validate(self):
        return

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

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

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


class GetSquareChatFeatureSetResponse(object):
    """
    Attributes:
     - squareChatFeatureSet

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.squareChatFeatureSet = SquareChatFeatureSet()
                    self.squareChatFeatureSet.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('GetSquareChatFeatureSetResponse')
        if self.squareChatFeatureSet is not None:
            oprot.writeFieldBegin('squareChatFeatureSet', TType.STRUCT, 1)
            self.squareChatFeatureSet.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 AcceptSpeakersResponse(object):


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

    def validate(self):
        return

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

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

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


class AcceptToChangeRoleResponse(object):


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

    def validate(self):
        return

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

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

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


class AcceptToListenResponse(object):


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

    def validate(self):
        return

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

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

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


class AcceptToSpeakResponse(object):


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

    def validate(self):
        return

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

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

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


class CancelToSpeakResponse(object):


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

    def validate(self):
        return

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

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

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


class EndLiveTalkResponse(object):


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

    def validate(self):
        return

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

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

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


class LiveTalkEventNotifiedUpdateLiveTalkTitle(object):
    """
    Attributes:
     - title

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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('LiveTalkEventNotifiedUpdateLiveTalkTitle')
        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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting(object):
    """
    Attributes:
     - speakerSetting

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.speakerSetting = 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('LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting')
        if self.speakerSetting is not None:
            oprot.writeFieldBegin('speakerSetting', TType.I32, 1)
            oprot.writeI32(self.speakerSetting)
            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 LiveTalkEventNotifiedUpdateLiveTalkAnnouncement(object):
    """
    Attributes:
     - announcement

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.announcement = iprot.readString().decode('utf-8', errors='replace') 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('LiveTalkEventNotifiedUpdateLiveTalkAnnouncement')
        if self.announcement is not None:
            oprot.writeFieldBegin('announcement', TType.STRING, 1)
            oprot.writeString(self.announcement.encode('utf-8') if sys.version_info[0] == 2 else self.announcement)
            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 LiveTalkEventNotifiedUpdateSquareMemberRole(object):
    """
    Attributes:
     - squareMemberMid
     - role

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.role = 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('LiveTalkEventNotifiedUpdateSquareMemberRole')
        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.role is not None:
            oprot.writeFieldBegin('role', TType.I32, 2)
            oprot.writeI32(self.role)
            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 LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak(object):
    """
    Attributes:
     - allowRequestToSpeak

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.allowRequestToSpeak = 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('LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak')
        if self.allowRequestToSpeak is not None:
            oprot.writeFieldBegin('allowRequestToSpeak', TType.BOOL, 1)
            oprot.writeBool(self.allowRequestToSpeak)
            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 LiveTalkEventPayload(object):
    """
    Attributes:
     - notifiedUpdateLiveTalkTitle
     - notifiedUpdateLiveTalkSpeakerSetting
     - notifiedUpdateLiveTalkAnnouncement
     - notifiedUpdateSquareMemberRole
     - notifiedUpdateLiveTalkAllowRequestToSpeak

    """


    def __init__(self, notifiedUpdateLiveTalkTitle=None, notifiedUpdateLiveTalkSpeakerSetting=None, notifiedUpdateLiveTalkAnnouncement=None, notifiedUpdateSquareMemberRole=None, notifiedUpdateLiveTalkAllowRequestToSpeak=None,):
        self.notifiedUpdateLiveTalkTitle = notifiedUpdateLiveTalkTitle
        self.notifiedUpdateLiveTalkSpeakerSetting = notifiedUpdateLiveTalkSpeakerSetting
        self.notifiedUpdateLiveTalkAnnouncement = notifiedUpdateLiveTalkAnnouncement
        self.notifiedUpdateSquareMemberRole = notifiedUpdateSquareMemberRole
        self.notifiedUpdateLiveTalkAllowRequestToSpeak = notifiedUpdateLiveTalkAllowRequestToSpeak

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.notifiedUpdateLiveTalkTitle = LiveTalkEventNotifiedUpdateLiveTalkTitle()
                    self.notifiedUpdateLiveTalkTitle.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateLiveTalkSpeakerSetting = LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting()
                    self.notifiedUpdateLiveTalkSpeakerSetting.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateLiveTalkAnnouncement = LiveTalkEventNotifiedUpdateLiveTalkAnnouncement()
                    self.notifiedUpdateLiveTalkAnnouncement.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareMemberRole = LiveTalkEventNotifiedUpdateSquareMemberRole()
                    self.notifiedUpdateSquareMemberRole.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateLiveTalkAllowRequestToSpeak = LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak()
                    self.notifiedUpdateLiveTalkAllowRequestToSpeak.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('LiveTalkEventPayload')
        if self.notifiedUpdateLiveTalkTitle is not None:
            oprot.writeFieldBegin('notifiedUpdateLiveTalkTitle', TType.STRUCT, 1)
            self.notifiedUpdateLiveTalkTitle.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedUpdateLiveTalkSpeakerSetting is not None:
            oprot.writeFieldBegin('notifiedUpdateLiveTalkSpeakerSetting', TType.STRUCT, 2)
            self.notifiedUpdateLiveTalkSpeakerSetting.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedUpdateLiveTalkAnnouncement is not None:
            oprot.writeFieldBegin('notifiedUpdateLiveTalkAnnouncement', TType.STRUCT, 3)
            self.notifiedUpdateLiveTalkAnnouncement.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedUpdateSquareMemberRole is not None:
            oprot.writeFieldBegin('notifiedUpdateSquareMemberRole', TType.STRUCT, 4)
            self.notifiedUpdateSquareMemberRole.write(oprot)
            oprot.writeFieldEnd()
        if self.notifiedUpdateLiveTalkAllowRequestToSpeak is not None:
            oprot.writeFieldBegin('notifiedUpdateLiveTalkAllowRequestToSpeak', TType.STRUCT, 5)
            self.notifiedUpdateLiveTalkAllowRequestToSpeak.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 LiveTalkEvent(object):
    """
    Attributes:
     - type
     - payload
     - syncToken

    """


    def __init__(self, type=None, payload=None, syncToken=None,):
        self.type = type
        self.payload = payload
        self.syncToken = syncToken

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.payload = LiveTalkEventPayload()
                    self.payload.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.syncToken = iprot.readString().decode('utf-8', errors='replace') 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('LiveTalkEvent')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.payload is not None:
            oprot.writeFieldBegin('payload', TType.STRUCT, 2)
            self.payload.write(oprot)
            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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class FetchLiveTalkEventsResponse(object):
    """
    Attributes:
     - events
     - syncToken
     - hasMore

    """


    def __init__(self, events=None, syncToken=None, hasMore=None,):
        self.events = events
        self.syncToken = syncToken
        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.events = []
                    (_etype603, _size600) = iprot.readListBegin()
                    for _i604 in range(_size600):
                        _elem605 = LiveTalkEvent()
                        _elem605.read(iprot)
                        self.events.append(_elem605)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.syncToken = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                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('FetchLiveTalkEventsResponse')
        if self.events is not None:
            oprot.writeFieldBegin('events', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.events))
            for iter606 in self.events:
                iter606.write(oprot)
            oprot.writeListEnd()
            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.hasMore is not None:
            oprot.writeFieldBegin('hasMore', TType.BOOL, 3)
            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 LiveTalk(object):
    """
    Attributes:
     - squareChatMid
     - sessionId
     - title
     - type
     - speakerSetting
     - allowRequestToSpeak
     - announcement
     - participantCount
     - revision
     - startedAt

    """


    def __init__(self, squareChatMid=None, sessionId=None, title=None, type=None, speakerSetting=None, allowRequestToSpeak=None, announcement=None, participantCount=None, revision=None, startedAt=None,):
        self.squareChatMid = squareChatMid
        self.sessionId = sessionId
        self.title = title
        self.type = type
        self.speakerSetting = speakerSetting
        self.allowRequestToSpeak = allowRequestToSpeak
        self.announcement = announcement
        self.participantCount = participantCount
        self.revision = revision
        self.startedAt = startedAt

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.title = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.speakerSetting = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.allowRequestToSpeak = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.announcement = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.participantCount = 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.I64:
                    self.startedAt = 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('LiveTalk')
        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.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()
        if self.title is not None:
            oprot.writeFieldBegin('title', TType.STRING, 3)
            oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 4)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.speakerSetting is not None:
            oprot.writeFieldBegin('speakerSetting', TType.I32, 5)
            oprot.writeI32(self.speakerSetting)
            oprot.writeFieldEnd()
        if self.allowRequestToSpeak is not None:
            oprot.writeFieldBegin('allowRequestToSpeak', TType.BOOL, 6)
            oprot.writeBool(self.allowRequestToSpeak)
            oprot.writeFieldEnd()
        if self.announcement is not None:
            oprot.writeFieldBegin('announcement', TType.STRING, 7)
            oprot.writeString(self.announcement.encode('utf-8') if sys.version_info[0] == 2 else self.announcement)
            oprot.writeFieldEnd()
        if self.participantCount is not None:
            oprot.writeFieldBegin('participantCount', TType.I32, 8)
            oprot.writeI32(self.participantCount)
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 9)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.startedAt is not None:
            oprot.writeFieldBegin('startedAt', TType.I64, 10)
            oprot.writeI64(self.startedAt)
            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 FindLiveTalkByInvitationTicketResponse(object):
    """
    Attributes:
     - chatInvitationTicket
     - liveTalk
     - chat
     - squareMember
     - chatMembershipState

    """


    def __init__(self, chatInvitationTicket=None, liveTalk=None, chat=None, squareMember=None, chatMembershipState=None,):
        self.chatInvitationTicket = chatInvitationTicket
        self.liveTalk = liveTalk
        self.chat = chat
        self.squareMember = squareMember
        self.chatMembershipState = chatMembershipState

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chatInvitationTicket = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.liveTalk = LiveTalk()
                    self.liveTalk.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.chat = SquareChat()
                    self.chat.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.I32:
                    self.chatMembershipState = 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('FindLiveTalkByInvitationTicketResponse')
        if self.chatInvitationTicket is not None:
            oprot.writeFieldBegin('chatInvitationTicket', TType.STRING, 1)
            oprot.writeString(self.chatInvitationTicket.encode('utf-8') if sys.version_info[0] == 2 else self.chatInvitationTicket)
            oprot.writeFieldEnd()
        if self.liveTalk is not None:
            oprot.writeFieldBegin('liveTalk', TType.STRUCT, 2)
            self.liveTalk.write(oprot)
            oprot.writeFieldEnd()
        if self.chat is not None:
            oprot.writeFieldBegin('chat', TType.STRUCT, 3)
            self.chat.write(oprot)
            oprot.writeFieldEnd()
        if self.squareMember is not None:
            oprot.writeFieldBegin('squareMember', TType.STRUCT, 4)
            self.squareMember.write(oprot)
            oprot.writeFieldEnd()
        if self.chatMembershipState is not None:
            oprot.writeFieldBegin('chatMembershipState', TType.I32, 5)
            oprot.writeI32(self.chatMembershipState)
            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 ForceEndLiveTalkResponse(object):


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

    def validate(self):
        return

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

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

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


class LiveTalkSpeaker(object):
    """
    Attributes:
     - displayName
     - profileImageObsHash
     - role

    """


    def __init__(self, displayName=None, profileImageObsHash=None, role=None,):
        self.displayName = displayName
        self.profileImageObsHash = profileImageObsHash
        self.role = role

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.displayName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.profileImageObsHash = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.role = 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('LiveTalkSpeaker')
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 1)
            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, 2)
            oprot.writeString(self.profileImageObsHash.encode('utf-8') if sys.version_info[0] == 2 else self.profileImageObsHash)
            oprot.writeFieldEnd()
        if self.role is not None:
            oprot.writeFieldBegin('role', TType.I32, 3)
            oprot.writeI32(self.role)
            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 GetLiveTalkInfoForNonMemberResponse(object):
    """
    Attributes:
     - chatName
     - liveTalk
     - speakers
     - chatInvitationUrl

    """


    def __init__(self, chatName=None, liveTalk=None, speakers=None, chatInvitationUrl=None,):
        self.chatName = chatName
        self.liveTalk = liveTalk
        self.speakers = speakers
        self.chatInvitationUrl = chatInvitationUrl

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.chatName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.liveTalk = LiveTalk()
                    self.liveTalk.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.speakers = []
                    (_etype610, _size607) = iprot.readListBegin()
                    for _i611 in range(_size607):
                        _elem612 = LiveTalkSpeaker()
                        _elem612.read(iprot)
                        self.speakers.append(_elem612)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.chatInvitationUrl = iprot.readString().decode('utf-8', errors='replace') 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('GetLiveTalkInfoForNonMemberResponse')
        if self.chatName is not None:
            oprot.writeFieldBegin('chatName', TType.STRING, 1)
            oprot.writeString(self.chatName.encode('utf-8') if sys.version_info[0] == 2 else self.chatName)
            oprot.writeFieldEnd()
        if self.liveTalk is not None:
            oprot.writeFieldBegin('liveTalk', TType.STRUCT, 2)
            self.liveTalk.write(oprot)
            oprot.writeFieldEnd()
        if self.speakers is not None:
            oprot.writeFieldBegin('speakers', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.speakers))
            for iter613 in self.speakers:
                iter613.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.chatInvitationUrl is not None:
            oprot.writeFieldBegin('chatInvitationUrl', TType.STRING, 4)
            oprot.writeString(self.chatInvitationUrl.encode('utf-8') if sys.version_info[0] == 2 else self.chatInvitationUrl)
            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 GetLiveTalkInvitationUrlResponse(object):
    """
    Attributes:
     - invitationUrl

    """


    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', errors='replace') 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('GetLiveTalkInvitationUrlResponse')
        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 GetLiveTalkSpeakersForNonMemberResponse(object):
    """
    Attributes:
     - speakers

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.speakers = []
                    (_etype617, _size614) = iprot.readListBegin()
                    for _i618 in range(_size614):
                        _elem619 = LiveTalkSpeaker()
                        _elem619.read(iprot)
                        self.speakers.append(_elem619)
                    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('GetLiveTalkSpeakersForNonMemberResponse')
        if self.speakers is not None:
            oprot.writeFieldBegin('speakers', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.speakers))
            for iter620 in self.speakers:
                iter620.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 GetSquareInfoByChatMidResponse(object):
    """
    Attributes:
     - defaultChatMid
     - squareName
     - squareDesc

    """


    def __init__(self, defaultChatMid=None, squareName=None, squareDesc=None,):
        self.defaultChatMid = defaultChatMid
        self.squareName = squareName
        self.squareDesc = squareDesc

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.defaultChatMid = iprot.readString().decode('utf-8', errors='replace') 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', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.squareDesc = iprot.readString().decode('utf-8', errors='replace') 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('GetSquareInfoByChatMidResponse')
        if self.defaultChatMid is not None:
            oprot.writeFieldBegin('defaultChatMid', TType.STRING, 1)
            oprot.writeString(self.defaultChatMid.encode('utf-8') if sys.version_info[0] == 2 else self.defaultChatMid)
            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.squareDesc is not None:
            oprot.writeFieldBegin('squareDesc', TType.STRING, 3)
            oprot.writeString(self.squareDesc.encode('utf-8') if sys.version_info[0] == 2 else self.squareDesc)
            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 InviteToChangeRoleResponse(object):


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

    def validate(self):
        return

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

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

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


class InviteToListenResponse(object):


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

    def validate(self):
        return

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

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

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


class InviteToLiveTalkResponse(object):


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

    def validate(self):
        return

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

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

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


class InviteToSpeakResponse(object):
    """
    Attributes:
     - inviteRequestId

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.inviteRequestId = iprot.readString().decode('utf-8', errors='replace') 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('InviteToSpeakResponse')
        if self.inviteRequestId is not None:
            oprot.writeFieldBegin('inviteRequestId', TType.STRING, 1)
            oprot.writeString(self.inviteRequestId.encode('utf-8') if sys.version_info[0] == 2 else self.inviteRequestId)
            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 JoinLiveTalkResponse(object):
    """
    Attributes:
     - hostMemberMid
     - memberSessionId
     - token
     - proto
     - voipAddress
     - voipAddress6
     - voipUdpPort
     - voipTcpPort
     - fromZone
     - commParam
     - orionAddress
     - polarisAddress
     - polarisZone
     - polarisUdpPort

    """


    def __init__(self, hostMemberMid=None, memberSessionId=None, token=None, proto=None, voipAddress=None, voipAddress6=None, voipUdpPort=None, voipTcpPort=None, fromZone=None, commParam=None, orionAddress=None, polarisAddress=None, polarisZone=None, polarisUdpPort=None,):
        self.hostMemberMid = hostMemberMid
        self.memberSessionId = memberSessionId
        self.token = token
        self.proto = proto
        self.voipAddress = voipAddress
        self.voipAddress6 = voipAddress6
        self.voipUdpPort = voipUdpPort
        self.voipTcpPort = voipTcpPort
        self.fromZone = fromZone
        self.commParam = commParam
        self.orionAddress = orionAddress
        self.polarisAddress = polarisAddress
        self.polarisZone = polarisZone
        self.polarisUdpPort = polarisUdpPort

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.hostMemberMid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.memberSessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.token = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.proto = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.voipAddress = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.voipAddress6 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.voipUdpPort = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.voipTcpPort = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.fromZone = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.commParam = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.orionAddress = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.polarisAddress = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRING:
                    self.polarisZone = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.I32:
                    self.polarisUdpPort = 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('JoinLiveTalkResponse')
        if self.hostMemberMid is not None:
            oprot.writeFieldBegin('hostMemberMid', TType.STRING, 1)
            oprot.writeString(self.hostMemberMid.encode('utf-8') if sys.version_info[0] == 2 else self.hostMemberMid)
            oprot.writeFieldEnd()
        if self.memberSessionId is not None:
            oprot.writeFieldBegin('memberSessionId', TType.STRING, 2)
            oprot.writeString(self.memberSessionId.encode('utf-8') if sys.version_info[0] == 2 else self.memberSessionId)
            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.proto is not None:
            oprot.writeFieldBegin('proto', TType.STRING, 4)
            oprot.writeString(self.proto.encode('utf-8') if sys.version_info[0] == 2 else self.proto)
            oprot.writeFieldEnd()
        if self.voipAddress is not None:
            oprot.writeFieldBegin('voipAddress', TType.STRING, 5)
            oprot.writeString(self.voipAddress.encode('utf-8') if sys.version_info[0] == 2 else self.voipAddress)
            oprot.writeFieldEnd()
        if self.voipAddress6 is not None:
            oprot.writeFieldBegin('voipAddress6', TType.STRING, 6)
            oprot.writeString(self.voipAddress6.encode('utf-8') if sys.version_info[0] == 2 else self.voipAddress6)
            oprot.writeFieldEnd()
        if self.voipUdpPort is not None:
            oprot.writeFieldBegin('voipUdpPort', TType.I32, 7)
            oprot.writeI32(self.voipUdpPort)
            oprot.writeFieldEnd()
        if self.voipTcpPort is not None:
            oprot.writeFieldBegin('voipTcpPort', TType.I32, 8)
            oprot.writeI32(self.voipTcpPort)
            oprot.writeFieldEnd()
        if self.fromZone is not None:
            oprot.writeFieldBegin('fromZone', TType.STRING, 9)
            oprot.writeString(self.fromZone.encode('utf-8') if sys.version_info[0] == 2 else self.fromZone)
            oprot.writeFieldEnd()
        if self.commParam is not None:
            oprot.writeFieldBegin('commParam', TType.STRING, 10)
            oprot.writeString(self.commParam.encode('utf-8') if sys.version_info[0] == 2 else self.commParam)
            oprot.writeFieldEnd()
        if self.orionAddress is not None:
            oprot.writeFieldBegin('orionAddress', TType.STRING, 11)
            oprot.writeString(self.orionAddress.encode('utf-8') if sys.version_info[0] == 2 else self.orionAddress)
            oprot.writeFieldEnd()
        if self.polarisAddress is not None:
            oprot.writeFieldBegin('polarisAddress', TType.STRING, 12)
            oprot.writeString(self.polarisAddress.encode('utf-8') if sys.version_info[0] == 2 else self.polarisAddress)
            oprot.writeFieldEnd()
        if self.polarisZone is not None:
            oprot.writeFieldBegin('polarisZone', TType.STRING, 13)
            oprot.writeString(self.polarisZone.encode('utf-8') if sys.version_info[0] == 2 else self.polarisZone)
            oprot.writeFieldEnd()
        if self.polarisUdpPort is not None:
            oprot.writeFieldBegin('polarisUdpPort', TType.I32, 14)
            oprot.writeI32(self.polarisUdpPort)
            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 KickOutLiveTalkParticipantsResponse(object):


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

    def validate(self):
        return

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

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

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


class RejectSpeakersResponse(object):


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

    def validate(self):
        return

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

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

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


class RejectToSpeakResponse(object):


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

    def validate(self):
        return

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

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

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


class ReportLiveTalkResponse(object):


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

    def validate(self):
        return

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

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

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


class ReportLiveTalkSpeakerResponse(object):


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

    def validate(self):
        return

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

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

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


class RequestToListenResponse(object):


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

    def validate(self):
        return

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

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

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


class RequestToSpeakResponse(object):


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

    def validate(self):
        return

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

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

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


class StartLiveTalkResponse(object):
    """
    Attributes:
     - liveTalk

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.liveTalk = LiveTalk()
                    self.liveTalk.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('StartLiveTalkResponse')
        if self.liveTalk is not None:
            oprot.writeFieldBegin('liveTalk', TType.STRUCT, 1)
            self.liveTalk.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 UpdateLiveTalkAttrsResponse(object):


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

    def validate(self):
        return

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

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

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


class CreateQrCodeForSecureResponse(object):
    """
    Attributes:
     - callbackUrl
     - longPollingMaxCount
     - longPollingIntervalSec
     - nonce

    """


    def __init__(self, callbackUrl=None, longPollingMaxCount=None, longPollingIntervalSec=None, nonce=None,):
        self.callbackUrl = callbackUrl
        self.longPollingMaxCount = longPollingMaxCount
        self.longPollingIntervalSec = longPollingIntervalSec
        self.nonce = nonce

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.callbackUrl = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.longPollingMaxCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.longPollingIntervalSec = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.nonce = iprot.readString().decode('utf-8', errors='replace') 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('CreateQrCodeForSecureResponse')
        if self.callbackUrl is not None:
            oprot.writeFieldBegin('callbackUrl', TType.STRING, 1)
            oprot.writeString(self.callbackUrl.encode('utf-8') if sys.version_info[0] == 2 else self.callbackUrl)
            oprot.writeFieldEnd()
        if self.longPollingMaxCount is not None:
            oprot.writeFieldBegin('longPollingMaxCount', TType.I32, 2)
            oprot.writeI32(self.longPollingMaxCount)
            oprot.writeFieldEnd()
        if self.longPollingIntervalSec is not None:
            oprot.writeFieldBegin('longPollingIntervalSec', TType.I32, 3)
            oprot.writeI32(self.longPollingIntervalSec)
            oprot.writeFieldEnd()
        if self.nonce is not None:
            oprot.writeFieldBegin('nonce', TType.STRING, 4)
            oprot.writeString(self.nonce.encode('utf-8') if sys.version_info[0] == 2 else self.nonce)
            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 RefreshApiRetryPolicy(object):
    """
    Attributes:
     - initialDelayInMillis
     - maxDelayInMillis
     - multiplier
     - jitterRate

    """


    def __init__(self, initialDelayInMillis=None, maxDelayInMillis=None, multiplier=None, jitterRate=None,):
        self.initialDelayInMillis = initialDelayInMillis
        self.maxDelayInMillis = maxDelayInMillis
        self.multiplier = multiplier
        self.jitterRate = jitterRate

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.initialDelayInMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.maxDelayInMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.DOUBLE:
                    self.multiplier = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.DOUBLE:
                    self.jitterRate = 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('RefreshApiRetryPolicy')
        if self.initialDelayInMillis is not None:
            oprot.writeFieldBegin('initialDelayInMillis', TType.I64, 1)
            oprot.writeI64(self.initialDelayInMillis)
            oprot.writeFieldEnd()
        if self.maxDelayInMillis is not None:
            oprot.writeFieldBegin('maxDelayInMillis', TType.I64, 2)
            oprot.writeI64(self.maxDelayInMillis)
            oprot.writeFieldEnd()
        if self.multiplier is not None:
            oprot.writeFieldBegin('multiplier', TType.DOUBLE, 3)
            oprot.writeDouble(self.multiplier)
            oprot.writeFieldEnd()
        if self.jitterRate is not None:
            oprot.writeFieldBegin('jitterRate', TType.DOUBLE, 4)
            oprot.writeDouble(self.jitterRate)
            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 TokenV3IssueResult(object):
    """
    Attributes:
     - accessToken
     - refreshToken
     - durationUntilRefreshInSec
     - refreshApiRetryPolicy
     - loginSessionId
     - tokenIssueTimeEpochSec

    """


    def __init__(self, accessToken=None, refreshToken=None, durationUntilRefreshInSec=None, refreshApiRetryPolicy=None, loginSessionId=None, tokenIssueTimeEpochSec=None,):
        self.accessToken = accessToken
        self.refreshToken = refreshToken
        self.durationUntilRefreshInSec = durationUntilRefreshInSec
        self.refreshApiRetryPolicy = refreshApiRetryPolicy
        self.loginSessionId = loginSessionId
        self.tokenIssueTimeEpochSec = tokenIssueTimeEpochSec

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.accessToken = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.refreshToken = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.durationUntilRefreshInSec = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.refreshApiRetryPolicy = RefreshApiRetryPolicy()
                    self.refreshApiRetryPolicy.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.loginSessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.tokenIssueTimeEpochSec = 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('TokenV3IssueResult')
        if self.accessToken is not None:
            oprot.writeFieldBegin('accessToken', TType.STRING, 1)
            oprot.writeString(self.accessToken.encode('utf-8') if sys.version_info[0] == 2 else self.accessToken)
            oprot.writeFieldEnd()
        if self.refreshToken is not None:
            oprot.writeFieldBegin('refreshToken', TType.STRING, 2)
            oprot.writeString(self.refreshToken.encode('utf-8') if sys.version_info[0] == 2 else self.refreshToken)
            oprot.writeFieldEnd()
        if self.durationUntilRefreshInSec is not None:
            oprot.writeFieldBegin('durationUntilRefreshInSec', TType.I64, 3)
            oprot.writeI64(self.durationUntilRefreshInSec)
            oprot.writeFieldEnd()
        if self.refreshApiRetryPolicy is not None:
            oprot.writeFieldBegin('refreshApiRetryPolicy', TType.STRUCT, 4)
            self.refreshApiRetryPolicy.write(oprot)
            oprot.writeFieldEnd()
        if self.loginSessionId is not None:
            oprot.writeFieldBegin('loginSessionId', TType.STRING, 5)
            oprot.writeString(self.loginSessionId.encode('utf-8') if sys.version_info[0] == 2 else self.loginSessionId)
            oprot.writeFieldEnd()
        if self.tokenIssueTimeEpochSec is not None:
            oprot.writeFieldBegin('tokenIssueTimeEpochSec', TType.I64, 6)
            oprot.writeI64(self.tokenIssueTimeEpochSec)
            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 QrCodeLoginV2Response(object):
    """
    Attributes:
     - certificate
     - accessTokenV2
     - tokenV3IssueResult
     - mid
     - lastBindTimestamp
     - metaData

    """


    def __init__(self, certificate=None, accessTokenV2=None, tokenV3IssueResult=None, mid=None, lastBindTimestamp=None, metaData=None,):
        self.certificate = certificate
        self.accessTokenV2 = accessTokenV2
        self.tokenV3IssueResult = tokenV3IssueResult
        self.mid = mid
        self.lastBindTimestamp = lastBindTimestamp
        self.metaData = metaData

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.certificate = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.accessTokenV2 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.tokenV3IssueResult = TokenV3IssueResult()
                    self.tokenV3IssueResult.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.mid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I64:
                    self.lastBindTimestamp = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.MAP:
                    self.metaData = {}
                    (_ktype622, _vtype623, _size621) = iprot.readMapBegin()
                    for _i625 in range(_size621):
                        _key626 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val627 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.metaData[_key626] = _val627
                    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('QrCodeLoginV2Response')
        if self.certificate is not None:
            oprot.writeFieldBegin('certificate', TType.STRING, 1)
            oprot.writeString(self.certificate.encode('utf-8') if sys.version_info[0] == 2 else self.certificate)
            oprot.writeFieldEnd()
        if self.accessTokenV2 is not None:
            oprot.writeFieldBegin('accessTokenV2', TType.STRING, 2)
            oprot.writeString(self.accessTokenV2.encode('utf-8') if sys.version_info[0] == 2 else self.accessTokenV2)
            oprot.writeFieldEnd()
        if self.tokenV3IssueResult is not None:
            oprot.writeFieldBegin('tokenV3IssueResult', TType.STRUCT, 3)
            self.tokenV3IssueResult.write(oprot)
            oprot.writeFieldEnd()
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 4)
            oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.lastBindTimestamp is not None:
            oprot.writeFieldBegin('lastBindTimestamp', TType.I64, 9)
            oprot.writeI64(self.lastBindTimestamp)
            oprot.writeFieldEnd()
        if self.metaData is not None:
            oprot.writeFieldBegin('metaData', TType.MAP, 10)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metaData))
            for kiter628, viter629 in self.metaData.items():
                oprot.writeString(kiter628.encode('utf-8') if sys.version_info[0] == 2 else kiter628)
                oprot.writeString(viter629.encode('utf-8') if sys.version_info[0] == 2 else viter629)
            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)
all_structs.append(TalkException)
TalkException.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
)
all_structs.append(ChannelException)
ChannelException.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
)
all_structs.append(SquareException)
SquareException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'errorCode', None, None, ),  # 1
    (2, TType.STRUCT, 'errorExtraInfo', [ErrorExtraInfo, None], None, ),  # 2
    (3, TType.STRING, 'reason', 'UTF8', None, ),  # 3
)
all_structs.append(LiffException)
LiffException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
    (2, TType.STRING, 'message', 'UTF8', None, ),  # 2
    (3, TType.STRUCT, 'payload', [LiffErrorPayload, None], None, ),  # 3
)
all_structs.append(HomeException)
HomeException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'exceptionCode', None, None, ),  # 1
    (2, TType.STRING, 'message', 'UTF8', None, ),  # 2
    (3, TType.I64, 'retryTimeMillis', None, None, ),  # 3
)
all_structs.append(ChatappException)
ChatappException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
    (2, TType.STRING, 'reason', 'UTF8', None, ),  # 2
)
all_structs.append(MembershipException)
MembershipException.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
)
all_structs.append(BotException)
BotException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'errorCode', None, None, ),  # 1
    (2, TType.STRING, 'reason', 'UTF8', None, ),  # 2
    (3, TType.MAP, 'parameterMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 3
)
all_structs.append(BotExternalException)
BotExternalException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'errorCode', None, None, ),  # 1
    (2, TType.STRING, 'reason', 'UTF8', None, ),  # 2
)
all_structs.append(LiffChannelException)
LiffChannelException.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
)
all_structs.append(AccessTokenRefreshException)
AccessTokenRefreshException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'errorCode', None, None, ),  # 1
    (2, TType.I64, 'reasonCode', None, None, ),  # 2
)
all_structs.append(AccountEapConnectException)
AccountEapConnectException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
    (2, TType.STRING, 'alertMessage', 'UTF8', None, ),  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (11, TType.STRUCT, 'webAuthDetails', [WebAuthDetails, None], None, ),  # 11
)
all_structs.append(PwlessCredentialException)
PwlessCredentialException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
    (2, TType.STRING, 'alertMessage', 'UTF8', None, ),  # 2
)
all_structs.append(SecondAuthFactorPinCodeException)
SecondAuthFactorPinCodeException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
    (2, TType.STRING, 'alertMessage', 'UTF8', None, ),  # 2
)
all_structs.append(AuthException)
AuthException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
    (2, TType.STRING, 'alertMessage', 'UTF8', None, ),  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (11, TType.STRUCT, 'webAuthDetails', [WebAuthDetails, None], None, ),  # 11
)
all_structs.append(SecondaryPwlessLoginException)
SecondaryPwlessLoginException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
    (2, TType.STRING, 'alertMessage', 'UTF8', None, ),  # 2
)
all_structs.append(SecondaryQrCodeException)
SecondaryQrCodeException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
    (2, TType.STRING, 'alertMessage', 'UTF8', None, ),  # 2
)
all_structs.append(PaymentException)
PaymentException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'errorCode', None, None, ),  # 1
    (2, TType.STRING, 'debugReason', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'serverDefinedMessage', 'UTF8', None, ),  # 3
    (4, TType.MAP, 'errorDetailMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 4
)
all_structs.append(SettingsException)
SettingsException.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
)
all_structs.append(TicketException)
TicketException.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
)
all_structs.append(ThingsException)
ThingsException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
    (2, TType.STRING, 'reason', 'UTF8', None, ),  # 2
)
all_structs.append(SuggestTrialException)
SuggestTrialException.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
)
all_structs.append(LFLPremiumException)
LFLPremiumException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
)
all_structs.append(WalletException)
WalletException.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'code', None, None, ),  # 1
    (2, TType.STRING, 'reason', 'UTF8', None, ),  # 2
    (3, TType.MAP, 'attributes', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 3
)
all_structs.append(ShopException)
ShopException.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
)
all_structs.append(PointException)
PointException.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
)
all_structs.append(E2EEKeyBackupException)
E2EEKeyBackupException.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
)
all_structs.append(BeaconCondition)
BeaconCondition.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'inFriends', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'notInFriends', 'UTF8', None, ),  # 2
    (3, TType.BOOL, 'termsAgreed', None, None, ),  # 3
)
all_structs.append(BeaconBackgroundNotification)
BeaconBackgroundNotification.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'actionInterval', None, None, ),  # 1
    (2, TType.LIST, 'actionAndConditions', (TType.STRUCT, [BeaconCondition, None], False), None, ),  # 2
    (3, TType.I64, 'actionDelay', None, None, ),  # 3
    (4, TType.LIST, 'actionConditions', (TType.STRUCT, [BeaconCondition, None], False), None, ),  # 4
)
all_structs.append(LiffErrorPayload)
LiffErrorPayload.thrift_spec = (
    None,  # 0
    None,  # 1
    None,  # 2
    (3, TType.STRUCT, 'consentRequired', [LiffErrorConsentRequired, None], None, ),  # 3
)
all_structs.append(LiffErrorConsentRequired)
LiffErrorConsentRequired.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'channelId', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'consentUrl', 'UTF8', None, ),  # 2
)
all_structs.append(ErrorExtraInfo)
ErrorExtraInfo.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'preconditionFailedExtraInfo', None, None, ),  # 1
    (2, TType.STRUCT, 'userRestrictionInfo', [UserRestrictionExtraInfo, None], None, ),  # 2
)
all_structs.append(UserRestrictionExtraInfo)
UserRestrictionExtraInfo.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'linkUrl', 'UTF8', None, ),  # 1
)
all_structs.append(WebAuthDetails)
WebAuthDetails.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'baseUrl', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'token', 'UTF8', None, ),  # 2
)
all_structs.append(Profile)
Profile.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
    (36, TType.MAP, 'statusMessageContentMetadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 36
    (37, TType.STRUCT, 'avatarProfile', [AvatarProfile, None], None, ),  # 37
    (38, TType.BOOL, 'nftProfile', None, None, ),  # 38
    (39, TType.I32, 'pictureSource', None, None, ),  # 39
)
all_structs.append(AvatarProfile)
AvatarProfile.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'version', 'UTF8', None, ),  # 1
    (2, TType.I64, 'updatedMillis', None, None, ),  # 2
    (3, TType.STRING, 'thumbnail', 'UTF8', None, ),  # 3
    (4, TType.BOOL, 'usablePublicly', None, None, ),  # 4
)
all_structs.append(Operation)
Operation.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, None], None, ),  # 20
)
all_structs.append(Message)
Message.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, None], 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
    (25, TType.I32, 'appExtensionType', None, None, ),  # 25
    None,  # 26
    (27, TType.LIST, 'reactions', (TType.STRUCT, [Reaction, None], False), None, ),  # 27
)
all_structs.append(Reaction)
Reaction.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'fromUserMid', 'UTF8', None, ),  # 1
    (2, TType.I64, 'atMillis', None, None, ),  # 2
    (3, TType.STRUCT, 'reactionType', [ReactionType, None], None, ),  # 3
)
all_structs.append(ReactionType)
ReactionType.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'predefinedReactionType', None, None, ),  # 1
)
all_structs.append(ReactRequest)
ReactRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.I64, 'messageId', None, None, ),  # 2
    (3, TType.STRUCT, 'reactionType', [ReactionType, None], None, ),  # 3
)
all_structs.append(Location)
Location.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
    (6, TType.STRING, 'categoryId', 'UTF8', None, ),  # 6
    (7, TType.I32, 'provider', None, None, ),  # 7
    (8, TType.STRUCT, 'accuracy', [GeolocationAccuracy, None], None, ),  # 8
    (9, TType.DOUBLE, 'altitudeMeters', None, None, ),  # 9
)
all_structs.append(GeolocationAccuracy)
GeolocationAccuracy.thrift_spec = (
    None,  # 0
    (1, TType.DOUBLE, 'radiusMeters', None, None, ),  # 1
    (2, TType.DOUBLE, 'radiusConfidence', None, None, ),  # 2
    (3, TType.DOUBLE, 'altitudeAccuracy', None, None, ),  # 3
    (4, TType.DOUBLE, 'velocityAccuracy', None, None, ),  # 4
    (5, TType.DOUBLE, 'bearingAccuracy', None, None, ),  # 5
    (6, TType.I32, 'accuracyMode', None, None, ),  # 6
)
all_structs.append(Contact)
Contact.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
    (43, TType.MAP, 'statusMessageContentMetadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 43
    (44, TType.STRUCT, 'avatarProfile', [AvatarProfile, None], None, ),  # 44
    (45, TType.STRING, 'friendRingtone', 'UTF8', None, ),  # 45
    (46, TType.STRING, 'friendRingbackTone', 'UTF8', None, ),  # 46
    (47, TType.BOOL, 'nftProfile', None, None, ),  # 47
    (48, TType.I32, 'pictureSource', None, None, ),  # 48
)
all_structs.append(GetContactsV2Request)
GetContactsV2Request.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'targetUserMids', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.SET, 'neededContactCalendarEvents', (TType.I32, None, False), None, ),  # 2
    (3, TType.BOOL, 'withUserStatus', None, None, ),  # 3
)
all_structs.append(GetContactsV2Response)
GetContactsV2Response.thrift_spec = (
    None,  # 0
    (1, TType.MAP, 'contacts', (TType.STRING, 'UTF8', TType.STRUCT, [ContactEntry, None], False), None, ),  # 1
)
all_structs.append(ContactEntry)
ContactEntry.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'userStatus', None, None, ),  # 1
    (2, TType.I64, 'snapshotTimeMillis', None, None, ),  # 2
    (3, TType.STRUCT, 'contact', [Contact, None], None, ),  # 3
    (4, TType.STRUCT, 'calendarEvents', [ContactCalendarEvents, None], None, ),  # 4
)
all_structs.append(ContactCalendarEvents)
ContactCalendarEvents.thrift_spec = (
    None,  # 0
    (1, TType.MAP, 'events', (TType.I32, None, TType.STRUCT, [ContactCalendarEvent, None], False), None, ),  # 1
)
all_structs.append(ContactCalendarEvent)
ContactCalendarEvent.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'id', 'UTF8', None, ),  # 1
    (2, TType.I32, 'state', None, None, ),  # 2
    (3, TType.I32, 'year', None, None, ),  # 3
    (4, TType.I32, 'month', None, None, ),  # 4
    (5, TType.I32, 'day', None, None, ),  # 5
)
all_structs.append(Configurations)
Configurations.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'revision', None, None, ),  # 1
    (2, TType.MAP, 'configMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 2
)
all_structs.append(E2EEPublicKey)
E2EEPublicKey.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
)
all_structs.append(RSAKey)
RSAKey.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
)
all_structs.append(Settings)
Settings.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
    (19, TType.BOOL, 'notificationPayment', None, 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
    (27, TType.BOOL, 'privacyAgreeUseLineCoinToPaidCall', None, None, ),  # 27
    (28, TType.BOOL, 'privacyAgreeUsePaidCall', None, None, ),  # 28
    (29, TType.BOOL, 'privacyAllowFriendRequest', None, 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
    (45, TType.I32, 'accountMigrationPincodeType', None, None, ),  # 45
    (46, TType.BOOL, 'enforcedInputAccountMigrationPincode', None, None, ),  # 46
    (47, TType.I32, 'securityCenterSettingsType', None, None, ),  # 47
    (48, TType.BOOL, 'allowUnregistrationSecondaryDevice', None, None, ),  # 48
    (49, TType.BOOL, 'pwlessPrimaryCredentialRegistration', None, 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
    (70, TType.I64, 'agreementShakeFunction', None, None, ),  # 70
    (71, TType.I64, 'agreementMobileContactName', None, None, ),  # 71
    (72, TType.BOOL, 'notificationThumbnail', None, None, ),  # 72
    (73, TType.I64, 'agreementSoundToText', None, None, ),  # 73
    (74, TType.STRING, 'privacyPolicyVersion', 'UTF8', None, ),  # 74
    (75, TType.I64, 'agreementAdByWebAccess', None, None, ),  # 75
    (76, TType.I64, 'agreementPhoneNumberMatching', None, None, ),  # 76
    (77, TType.I64, 'agreementCommunicationInfo', None, None, ),  # 77
    (78, TType.I32, 'privacySharePersonalInfoToFriends', None, None, ),  # 78
    (79, TType.I64, 'agreementThingsWirelessCommunication', None, None, ),  # 79
    (80, TType.I64, 'agreementGdpr', None, None, ),  # 80
    (81, TType.I32, 'privacyStatusMessageHistory', None, None, ),  # 81
    (82, TType.I64, 'agreementProvideLocation', None, None, ),  # 82
    (83, TType.I64, 'agreementBeacon', None, None, ),  # 83
    None,  # 84
    (85, TType.I32, 'privacyAllowProfileHistory', None, None, ),  # 85
    (86, TType.I64, 'agreementContentsSuggest', None, None, ),  # 86
    (87, TType.I64, 'agreementContentsSuggestDataCollection', None, None, ),  # 87
    (88, TType.I32, 'privacyAgeResult', None, None, ),  # 88
    (89, TType.BOOL, 'privacyAgeResultReceived', None, None, ),  # 89
    (90, TType.I64, 'agreementOcrImageCollection', None, None, ),  # 90
    (91, TType.BOOL, 'privacyAllowFollow', None, None, ),  # 91
    (92, TType.BOOL, 'privacyShowFollowList', None, None, ),  # 92
    (93, TType.BOOL, 'notificationBadgeTalkOnly', None, None, ),  # 93
    (94, TType.I64, 'agreementIcna', None, None, ),  # 94
    (95, TType.BOOL, 'notificationReaction', None, None, ),  # 95
    (96, TType.I64, 'agreementMid', None, None, ),  # 96
    (97, TType.BOOL, 'homeNotificationNewFriend', None, None, ),  # 97
    (98, TType.BOOL, 'homeNotificationFavoriteFriendUpdate', None, None, ),  # 98
    (99, TType.BOOL, 'homeNotificationGroupMemberUpdate', None, None, ),  # 99
    (100, TType.BOOL, 'homeNotificationBirthday', None, None, ),  # 100
    (101, TType.MAP, 'eapAllowedToConnect', (TType.I32, None, TType.BOOL, None, False), None, ),  # 101
    (102, TType.I64, 'agreementLineOutUse', None, None, ),  # 102
    (103, TType.I64, 'agreementLineOutProvideInfo', None, None, ),  # 103
    (104, TType.BOOL, 'notificationShowProfileImage', None, None, ),  # 104
    (105, TType.I64, 'agreementPdpa', None, None, ),  # 105
    (106, TType.STRING, 'agreementLocationVersion', 'UTF8', None, ),  # 106
    (107, TType.BOOL, 'zhdPageAllowedToShow', None, None, ),  # 107
)
all_structs.append(E2EENegotiationResult)
E2EENegotiationResult.thrift_spec = (
    None,  # 0
    (1, TType.SET, 'allowedTypes', (TType.I32, None, False), None, ),  # 1
    (2, TType.STRUCT, 'publicKey', [E2EEPublicKey, None], None, ),  # 2
    (3, TType.I32, 'specVersion', None, None, ),  # 3
)
all_structs.append(ContactRegistration)
ContactRegistration.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'contact', [Contact, None], 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
)
all_structs.append(E2EEGroupSharedKey)
E2EEGroupSharedKey.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'keyVersion', None, None, ),  # 1
    (2, TType.I32, 'groupKeyId', None, None, ),  # 2
    (3, TType.STRING, 'creator', 'UTF8', None, ),  # 3
    (4, TType.I32, 'creatorKeyId', None, None, ),  # 4
    (5, TType.STRING, 'receiver', 'UTF8', None, ),  # 5
    (6, TType.I32, 'receiverKeyId', None, None, ),  # 6
    (7, TType.STRING, 'encryptedSharedKey', 'BINARY', None, ),  # 7
    (8, TType.SET, 'allowedTypes', (TType.I32, None, False), None, ),  # 8
    (9, TType.I32, 'specVersion', None, None, ),  # 9
)
all_structs.append(VerificationSessionData)
VerificationSessionData.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
    (8, TType.STRING, 'callerIdMask', 'UTF8', None, ),  # 8
)
all_structs.append(FollowRequest)
FollowRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'followMid', [FollowMid, None], None, ),  # 1
)
all_structs.append(FollowMid)
FollowMid.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'mid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'eMid', 'UTF8', None, ),  # 2
)
all_structs.append(UnfollowRequest)
UnfollowRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'followMid', [FollowMid, None], None, ),  # 1
)
all_structs.append(Ticket)
Ticket.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
)
all_structs.append(GetChatsRequest)
GetChatsRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'chatMids', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.BOOL, 'withMembers', None, None, ),  # 2
    (3, TType.BOOL, 'withInvitees', None, None, ),  # 3
)
all_structs.append(GetChatsResponse)
GetChatsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'chats', (TType.STRUCT, [Chat, None], False), None, ),  # 1
)
all_structs.append(Chat)
Chat.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'type', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.I64, 'createdTime', None, None, ),  # 3
    (4, TType.BOOL, 'notificationDisabled', None, None, ),  # 4
    (5, TType.I64, 'favoriteTimestamp', None, None, ),  # 5
    (6, TType.STRING, 'chatName', 'UTF8', None, ),  # 6
    (7, TType.STRING, 'picturePath', 'UTF8', None, ),  # 7
    (8, TType.STRUCT, 'extra', [Extra, None], None, ),  # 8
)
all_structs.append(Extra)
Extra.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'groupExtra', [GroupExtra, None], None, ),  # 1
    (2, TType.STRUCT, 'peerExtra', [PeerExtra, None], None, ),  # 2
)
all_structs.append(GroupExtra)
GroupExtra.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'creator', 'UTF8', None, ),  # 1
    (2, TType.BOOL, 'preventedJoinByTicket', None, None, ),  # 2
    (3, TType.STRING, 'invitationTicket', 'UTF8', None, ),  # 3
    (4, TType.MAP, 'memberMids', (TType.STRING, 'UTF8', TType.I64, None, False), None, ),  # 4
    (5, TType.MAP, 'inviteeMids', (TType.STRING, 'UTF8', TType.I64, None, False), None, ),  # 5
    (6, TType.BOOL, 'addFriendDisabled', None, None, ),  # 6
    (7, TType.BOOL, 'ticketDisabled', None, None, ),  # 7
)
all_structs.append(PeerExtra)
PeerExtra.thrift_spec = (
)
all_structs.append(GetFollowersRequest)
GetFollowersRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'followMid', [FollowMid, None], None, ),  # 1
    (2, TType.STRING, 'cursor', 'UTF8', None, ),  # 2
)
all_structs.append(GetFollowersResponse)
GetFollowersResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'profiles', (TType.STRUCT, [FollowProfile, None], False), None, ),  # 1
    (2, TType.STRING, 'cursor', 'UTF8', None, ),  # 2
    (3, TType.I64, 'followingCount', None, None, ),  # 3
    (4, TType.I64, 'followerCount', None, None, ),  # 4
)
all_structs.append(FollowProfile)
FollowProfile.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'followMid', [FollowMid, None], None, ),  # 1
    (2, TType.STRING, 'displayName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'picturePath', 'UTF8', None, ),  # 3
    (4, TType.BOOL, 'following', None, None, ),  # 4
    (5, TType.BOOL, 'allowFollow', None, None, ),  # 5
    (6, TType.STRUCT, 'followBuddyDetail', [FollowBuddyDetail, None], None, ),  # 6
)
all_structs.append(FollowBuddyDetail)
FollowBuddyDetail.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'iconType', None, None, ),  # 1
)
all_structs.append(GetFollowingsRequest)
GetFollowingsRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'followMid', [FollowMid, None], None, ),  # 1
    (2, TType.STRING, 'cursor', 'UTF8', None, ),  # 2
)
all_structs.append(GetFollowingsResponse)
GetFollowingsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'profiles', (TType.STRUCT, [FollowProfile, None], False), None, ),  # 1
    (2, TType.STRING, 'cursor', 'UTF8', None, ),  # 2
    (3, TType.I64, 'followingCount', None, None, ),  # 3
    (4, TType.I64, 'followerCount', None, None, ),  # 4
)
all_structs.append(Room)
Room.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, None], 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
)
all_structs.append(ContactModification)
ContactModification.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
)
all_structs.append(GetE2EEKeyBackupCertificatesRequest)
GetE2EEKeyBackupCertificatesRequest.thrift_spec = (
)
all_structs.append(GetE2EEKeyBackupCertificatesResponse)
GetE2EEKeyBackupCertificatesResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'urlHashList', (TType.STRING, 'UTF8', False), None, ),  # 1
)
all_structs.append(DeleteOtherFromChatRequest)
DeleteOtherFromChatRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.SET, 'targetUserMids', (TType.STRING, 'UTF8', False), None, ),  # 3
)
all_structs.append(DeleteOtherFromChatResponse)
DeleteOtherFromChatResponse.thrift_spec = (
)
all_structs.append(InviteIntoChatRequest)
InviteIntoChatRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.SET, 'targetUserMids', (TType.STRING, 'UTF8', False), None, ),  # 3
)
all_structs.append(InviteIntoChatResponse)
InviteIntoChatResponse.thrift_spec = (
)
all_structs.append(CancelChatInvitationRequest)
CancelChatInvitationRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.SET, 'targetUserMids', (TType.STRING, 'UTF8', False), None, ),  # 3
)
all_structs.append(CancelChatInvitationResponse)
CancelChatInvitationResponse.thrift_spec = (
)
all_structs.append(DeleteSelfFromChatRequest)
DeleteSelfFromChatRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.I64, 'lastSeenMessageDeliveredTime', None, None, ),  # 3
    (4, TType.STRING, 'lastSeenMessageId', 'UTF8', None, ),  # 4
    (5, TType.I64, 'lastMessageDeliveredTime', None, None, ),  # 5
    (6, TType.STRING, 'lastMessageId', 'UTF8', None, ),  # 6
)
all_structs.append(DeleteSelfFromChatResponse)
DeleteSelfFromChatResponse.thrift_spec = (
)
all_structs.append(AcceptChatInvitationRequest)
AcceptChatInvitationRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
)
all_structs.append(AcceptChatInvitationResponse)
AcceptChatInvitationResponse.thrift_spec = (
)
all_structs.append(ReissueChatTicketRequest)
ReissueChatTicketRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'groupMid', 'UTF8', None, ),  # 2
)
all_structs.append(ReissueChatTicketResponse)
ReissueChatTicketResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'ticketId', 'UTF8', None, ),  # 1
)
all_structs.append(FindChatByTicketRequest)
FindChatByTicketRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'ticketId', 'UTF8', None, ),  # 1
)
all_structs.append(FindChatByTicketResponse)
FindChatByTicketResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'chat', [Chat, None], None, ),  # 1
)
all_structs.append(AcceptChatInvitationByTicketRequest)
AcceptChatInvitationByTicketRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'ticketId', 'UTF8', None, ),  # 3
)
all_structs.append(AcceptChatInvitationByTicketResponse)
AcceptChatInvitationByTicketResponse.thrift_spec = (
)
all_structs.append(UpdateChatRequest)
UpdateChatRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRUCT, 'chat', [Chat, None], None, ),  # 2
    (3, TType.I32, 'updatedAttribute', None, None, ),  # 3
)
all_structs.append(UpdateChatResponse)
UpdateChatResponse.thrift_spec = (
)
all_structs.append(RefreshAccessTokenRequest)
RefreshAccessTokenRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'refreshToken', 'UTF8', None, ),  # 1
)
all_structs.append(RefreshAccessTokenResponse)
RefreshAccessTokenResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'accessToken', 'UTF8', None, ),  # 1
    (2, TType.I64, 'durationUntilRefreshInSec', None, None, ),  # 2
    (3, TType.STRUCT, 'retryPolicy', [RetryPolicy, None], None, ),  # 3
    (4, TType.I64, 'tokenIssueTimeEpochSec', None, None, ),  # 4
    (5, TType.STRING, 'refreshToken', 'UTF8', None, ),  # 5
)
all_structs.append(RetryPolicy)
RetryPolicy.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'initialDelayInMillis', None, None, ),  # 1
    (2, TType.I64, 'maxDelayInMillis', None, None, ),  # 2
    (3, TType.DOUBLE, 'multiplier', None, None, ),  # 3
    (4, TType.DOUBLE, 'jitterRate', None, None, ),  # 4
)
all_structs.append(TMessageReadRange)
TMessageReadRange.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'chatId', 'UTF8', None, ),  # 1
    (2, TType.MAP, 'ranges', (TType.STRING, 'UTF8', TType.LIST, (TType.STRUCT, [TMessageReadRangeEntry, None], False), False), None, ),  # 2
)
all_structs.append(TMessageReadRangeEntry)
TMessageReadRangeEntry.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
)
all_structs.append(BuddyDetail)
BuddyDetail.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
    (8, TType.BOOL, 'freePhoneCallable', None, None, ),  # 8
    (9, TType.STRING, 'phoneNumberToDial', 'UTF8', None, ),  # 9
    (10, TType.BOOL, 'needPermissionApproval', None, None, ),  # 10
    (11, TType.STRING, 'channelId', 'UTF8', None, ),  # 11
    (12, TType.STRING, 'channelProviderName', 'UTF8', None, ),  # 12
    (13, TType.I32, 'iconType', None, None, ),  # 13
    (14, TType.I32, 'botType', None, None, ),  # 14
    (15, TType.BOOL, 'showRichMenu', None, None, ),  # 15
    (16, TType.I64, 'richMenuRevision', None, None, ),  # 16
    (17, TType.I32, 'onAirLabel', None, None, ),  # 17
    (18, TType.BOOL, 'useTheme', None, None, ),  # 18
    (19, TType.STRING, 'themeId', 'UTF8', None, ),  # 19
    (20, TType.BOOL, 'useBar', None, None, ),  # 20
    (21, TType.I64, 'barRevision', None, None, ),  # 21
    (22, TType.BOOL, 'useBackground', None, None, ),  # 22
    (23, TType.STRING, 'backgroundId', 'UTF8', None, ),  # 23
    (24, TType.BOOL, 'statusBarEnabled', None, None, ),  # 24
    (25, TType.I64, 'statusBarRevision', None, None, ),  # 25
    (26, TType.STRING, 'searchId', 'UTF8', None, ),  # 26
    (27, TType.I32, 'onAirVersion', None, None, ),  # 27
    (28, TType.BOOL, 'blockable', None, None, ),  # 28
    (29, TType.I32, 'botActiveStatus', None, None, ),  # 29
    (30, TType.BOOL, 'membershipEnabled', None, None, ),  # 30
)
all_structs.append(MessageBoxV2MessageId)
MessageBoxV2MessageId.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'deliveredTime', None, None, ),  # 1
    (2, TType.I64, 'messageId', None, None, ),  # 2
)
all_structs.append(GetPreviousMessagesV2Request)
GetPreviousMessagesV2Request.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'messageBoxId', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'endMessageId', [MessageBoxV2MessageId, None], None, ),  # 2
    (3, TType.I32, 'messagesCount', None, None, ),  # 3
    (4, TType.BOOL, 'withReadCount', None, None, ),  # 4
    (5, TType.BOOL, 'receivedOnly', None, None, ),  # 5
)
all_structs.append(ChannelToken)
ChannelToken.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
)
all_structs.append(GroupCall)
GroupCall.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
    (7, TType.I32, 'protocol', None, None, ),  # 7
)
all_structs.append(SyncResponse)
SyncResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'operationResponse', [OperationResponse, None], None, ),  # 1
    (2, TType.STRUCT, 'fullSyncResponse', [FullSyncResponse, None], None, ),  # 2
    (3, TType.STRUCT, 'partialFullSyncResponse', [PartialFullSyncResponse, None], None, ),  # 3
)
all_structs.append(OperationResponse)
OperationResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'operations', (TType.STRUCT, [Operation, None], False), None, ),  # 1
    (2, TType.BOOL, 'hasMoreOps', None, None, ),  # 2
    (3, TType.STRUCT, 'globalEvents', [TGlobalEvents, None], None, ),  # 3
    (4, TType.STRUCT, 'individualEvents', [TIndividualEvents, None], None, ),  # 4
)
all_structs.append(FullSyncResponse)
FullSyncResponse.thrift_spec = (
    None,  # 0
    (1, TType.SET, 'reasons', (TType.I32, None, False), None, ),  # 1
    (2, TType.I64, 'nextRevision', None, None, ),  # 2
)
all_structs.append(PartialFullSyncResponse)
PartialFullSyncResponse.thrift_spec = (
    None,  # 0
    (1, TType.MAP, 'targetCategories', (TType.I32, None, TType.I64, None, False), None, ),  # 1
)
all_structs.append(TGlobalEvents)
TGlobalEvents.thrift_spec = (
    None,  # 0
    (1, TType.MAP, 'events', (TType.I32, None, TType.STRUCT, [GlobalEvent, None], False), None, ),  # 1
    (2, TType.I64, 'lastRevision', None, None, ),  # 2
)
all_structs.append(TIndividualEvents)
TIndividualEvents.thrift_spec = (
    None,  # 0
    (1, TType.SET, 'events', (TType.I32, None, False), None, ),  # 1
    (2, TType.I64, 'lastRevision', None, None, ),  # 2
)
all_structs.append(GlobalEvent)
GlobalEvent.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'type', None, None, ),  # 1
    (2, TType.I32, 'minDelayInMinutes', None, None, ),  # 2
    (3, TType.I32, 'maxDelayInMinutes', None, None, ),  # 3
    (4, TType.I64, 'createTimeMillis', None, None, ),  # 4
    (5, TType.BOOL, 'maxDelayHardLimit', None, None, ),  # 5
)
all_structs.append(DetermineMediaMessageFlowResponse)
DetermineMediaMessageFlowResponse.thrift_spec = (
    None,  # 0
    (1, TType.MAP, 'flowMap', (TType.I32, None, TType.I32, None, False), None, ),  # 1
    (2, TType.I64, 'cacheTtlMillis', None, None, ),  # 2
)
all_structs.append(DisasterInfo)
DisasterInfo.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'disasterId', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'title', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'region', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'disasterDescription', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'seeMoreUrl', 'UTF8', None, ),  # 5
    None,  # 6
    (7, TType.I32, 'status', None, None, ),  # 7
)
all_structs.append(GetDisasterCasesRequest)
GetDisasterCasesRequest.thrift_spec = (
)
all_structs.append(GetDisasterCasesResponse)
GetDisasterCasesResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'disasters', (TType.STRUCT, [DisasterInfo, None], False), None, ),  # 1
    (2, TType.LIST, 'messageTemplate', (TType.STRING, 'UTF8', False), None, ),  # 2
    (3, TType.I64, 'ttlInMillis', None, None, ),  # 3
)
all_structs.append(SquareMessage)
SquareMessage.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'message', [Message, None], None, ),  # 1
    None,  # 2
    (3, TType.I32, 'fromType', None, None, ),  # 3
    (4, TType.I64, 'squareMessageRevision', None, None, ),  # 4
    (5, TType.I32, 'state', None, None, ),  # 5
)
all_structs.append(SquarePreference)
SquarePreference.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'favoriteTimestamp', None, None, ),  # 1
    (2, TType.BOOL, 'notiForNewJoinRequest', None, None, ),  # 2
)
all_structs.append(SquareMember)
SquareMember.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, None], None, ),  # 10
    (11, TType.STRING, 'joinMessage', 'UTF8', None, ),  # 11
)
all_structs.append(SquareMessageReaction)
SquareMessageReaction.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'type', None, None, ),  # 1
    (2, TType.STRUCT, 'reactor', [SquareMember, None], None, ),  # 2
    (3, TType.I64, 'createdAt', None, None, ),  # 3
    (4, TType.I64, 'updatedAt', None, None, ),  # 4
)
all_structs.append(SquareMessageReactionStatus)
SquareMessageReactionStatus.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'totalCount', None, None, ),  # 1
    (2, TType.MAP, 'countByReactionType', (TType.I32, None, TType.I32, None, False), None, ),  # 2
    (3, TType.STRUCT, 'myReaction', [SquareMessageReaction, None], None, ),  # 3
)
all_structs.append(SquareEventReceiveMessage)
SquareEventReceiveMessage.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'squareMessage', [SquareMessage, None], None, ),  # 2
    (3, TType.STRING, 'senderDisplayName', 'UTF8', None, ),  # 3
    (4, TType.STRUCT, 'messageReactionStatus', [SquareMessageReactionStatus, None], None, ),  # 4
    (5, TType.I64, 'senderRevision', None, None, ),  # 5
    (6, TType.STRING, 'squareMid', 'UTF8', None, ),  # 6
)
all_structs.append(SquareEventSendMessage)
SquareEventSendMessage.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'squareMessage', [SquareMessage, None], None, ),  # 2
    (3, TType.I32, 'reqSeq', None, None, ),  # 3
    (4, TType.STRING, 'senderDisplayName', 'UTF8', None, ),  # 4
    (5, TType.STRUCT, 'messageReactionStatus', [SquareMessageReactionStatus, None], None, ),  # 5
)
all_structs.append(SquareEventMutateMessage)
SquareEventMutateMessage.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'squareMessage', [SquareMessage, None], None, ),  # 2
    (3, TType.I32, 'reqSeq', None, None, ),  # 3
    (4, TType.STRING, 'senderDisplayName', 'UTF8', None, ),  # 4
)
all_structs.append(SquareEventNotifiedJoinSquareChat)
SquareEventNotifiedJoinSquareChat.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'joinedMember', [SquareMember, None], None, ),  # 2
)
all_structs.append(SquareMemberRelation)
SquareMemberRelation.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'state', None, None, ),  # 1
    (2, TType.I64, 'revision', None, None, ),  # 2
)
all_structs.append(SquareEventNotifiedInviteIntoSquareChat)
SquareEventNotifiedInviteIntoSquareChat.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.LIST, 'invitees', (TType.STRUCT, [SquareMember, None], False), None, ),  # 2
    (3, TType.STRUCT, 'invitor', [SquareMember, None], None, ),  # 3
    (4, TType.STRUCT, 'invitorRelation', [SquareMemberRelation, None], None, ),  # 4
)
all_structs.append(SquareEventNotifiedLeaveSquareChat)
SquareEventNotifiedLeaveSquareChat.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, None], None, ),  # 4
)
all_structs.append(SquareEventNotifiedDestroyMessage)
SquareEventNotifiedDestroyMessage.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    None,  # 2
    (3, TType.STRING, 'messageId', 'UTF8', None, ),  # 3
)
all_structs.append(SquareEventNotifiedMarkAsRead)
SquareEventNotifiedMarkAsRead.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
)
all_structs.append(SquareEventNotifiedUpdateSquareMemberProfile)
SquareEventNotifiedUpdateSquareMemberProfile.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'squareMember', [SquareMember, None], None, ),  # 2
)
all_structs.append(SquareEventNotifiedKickoutFromSquare)
SquareEventNotifiedKickoutFromSquare.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.LIST, 'kickees', (TType.STRUCT, [SquareMember, None], False), None, ),  # 2
    None,  # 3
    (4, TType.STRUCT, 'kicker', [SquareMember, None], None, ),  # 4
)
all_structs.append(ApprovalValue)
ApprovalValue.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(CodeValue)
CodeValue.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'code', 'UTF8', None, ),  # 1
)
all_structs.append(SquareJoinMethodValue)
SquareJoinMethodValue.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'approvalValue', [ApprovalValue, None], None, ),  # 1
    (2, TType.STRUCT, 'codeValue', [CodeValue, None], None, ),  # 2
)
all_structs.append(SquareJoinMethod)
SquareJoinMethod.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'type', None, None, ),  # 1
    (2, TType.STRUCT, 'value', [SquareJoinMethodValue, None], None, ),  # 2
)
all_structs.append(Square)
Square.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
    (13, TType.LIST, 'emblems', (TType.I32, None, False), None, ),  # 13
    (14, TType.STRUCT, 'joinMethod', [SquareJoinMethod, None], None, ),  # 14
    (15, TType.I32, 'adultOnly', None, None, ),  # 15
    (16, TType.LIST, 'svcTags', (TType.STRING, 'UTF8', False), None, ),  # 16
    (17, TType.I64, 'createdAt', None, None, ),  # 17
)
all_structs.append(SquareEventNotifiedShutdownSquare)
SquareEventNotifiedShutdownSquare.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'square', [Square, None], None, ),  # 2
)
all_structs.append(MessageVisibility)
MessageVisibility.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'showJoinMessage', None, None, ),  # 1
    (2, TType.BOOL, 'showLeaveMessage', None, None, ),  # 2
    (3, TType.BOOL, 'showKickoutMessage', None, None, ),  # 3
)
all_structs.append(SquareChat)
SquareChat.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
    (9, TType.STRING, 'invitationUrl', 'UTF8', None, ),  # 9
    (10, TType.STRUCT, 'messageVisibility', [MessageVisibility, None], None, ),  # 10
    (11, TType.I32, 'ableToSearchMessage', None, None, ),  # 11
)
all_structs.append(SquareEventNotifiedDeleteSquareChat)
SquareEventNotifiedDeleteSquareChat.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'squareChat', [SquareChat, None], None, ),  # 1
)
all_structs.append(SquareEventNotifiedUpdateSquareChatProfileName)
SquareEventNotifiedUpdateSquareChatProfileName.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'editor', [SquareMember, None], None, ),  # 2
    (3, TType.STRING, 'updatedChatName', 'UTF8', None, ),  # 3
)
all_structs.append(SquareEventNotifiedUpdateSquareChatProfileImage)
SquareEventNotifiedUpdateSquareChatProfileImage.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'editor', [SquareMember, None], None, ),  # 2
)
all_structs.append(SquareEventNotifiedUpdateSquareChatMaxMemberCount)
SquareEventNotifiedUpdateSquareChatMaxMemberCount.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.I32, 'maxMemberCount', None, None, ),  # 2
    (3, TType.STRUCT, 'editor', [SquareMember, None], None, ),  # 3
)
all_structs.append(SquareEventNotifiedAddBot)
SquareEventNotifiedAddBot.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'squareMember', [SquareMember, None], None, ),  # 2
    (3, TType.STRING, 'botMid', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'botDisplayName', 'UTF8', None, ),  # 4
)
all_structs.append(SquareEventNotifiedRemoveBot)
SquareEventNotifiedRemoveBot.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'squareMember', [SquareMember, None], None, ),  # 2
    (3, TType.STRING, 'botMid', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'botDisplayName', 'UTF8', None, ),  # 4
)
all_structs.append(SquareEventNotifiedUpdateReadonlyChat)
SquareEventNotifiedUpdateReadonlyChat.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.BOOL, 'readonly', None, None, ),  # 2
)
all_structs.append(MessageStatusContents)
MessageStatusContents.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'messageReactionStatus', [SquareMessageReactionStatus, None], None, ),  # 1
)
all_structs.append(SquareMessageStatus)
SquareMessageStatus.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'globalMessageId', 'UTF8', None, ),  # 2
    (3, TType.I32, 'type', None, None, ),  # 3
    (4, TType.STRUCT, 'contents', [MessageStatusContents, None], None, ),  # 4
    (5, TType.I64, 'publishedAt', None, None, ),  # 5
)
all_structs.append(SquareEventNotifiedUpdateMessageStatus)
SquareEventNotifiedUpdateMessageStatus.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'messageId', 'UTF8', None, ),  # 2
    (3, TType.STRUCT, 'messageStatus', [SquareMessageStatus, None], None, ),  # 3
)
all_structs.append(UrlButton)
UrlButton.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'text', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'url', 'UTF8', None, ),  # 2
)
all_structs.append(TextButton)
TextButton.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'text', 'UTF8', None, ),  # 1
)
all_structs.append(OkButton)
OkButton.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'text', 'UTF8', None, ),  # 1
)
all_structs.append(ButtonContent)
ButtonContent.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'urlButton', [UrlButton, None], None, ),  # 1
    (2, TType.STRUCT, 'textButton', [TextButton, None], None, ),  # 2
    (3, TType.STRUCT, 'okButton', [OkButton, None], None, ),  # 3
)
all_structs.append(SquareEventChatPopup)
SquareEventChatPopup.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.I64, 'popupId', None, None, ),  # 2
    (3, TType.STRING, 'flexJson', 'UTF8', None, ),  # 3
    (4, TType.STRUCT, 'button', [ButtonContent, None], None, ),  # 4
)
all_structs.append(SquareEventNotifiedSystemMessage)
SquareEventNotifiedSystemMessage.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'text', 'UTF8', None, ),  # 2
)
all_structs.append(SquareEventNotifiedUpdateSquare)
SquareEventNotifiedUpdateSquare.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'square', [Square, None], None, ),  # 2
)
all_structs.append(SquareStatus)
SquareStatus.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
)
all_structs.append(SquareEventNotifiedUpdateSquareStatus)
SquareEventNotifiedUpdateSquareStatus.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'squareStatus', [SquareStatus, None], None, ),  # 2
)
all_structs.append(SquareEventNotifiedUpdateSquareMember)
SquareEventNotifiedUpdateSquareMember.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'squareMemberMid', 'UTF8', None, ),  # 2
    (3, TType.STRUCT, 'squareMember', [SquareMember, None], None, ),  # 3
)
all_structs.append(SquareEventNotifiedUpdateSquareChat)
SquareEventNotifiedUpdateSquareChat.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 2
    (3, TType.STRUCT, 'squareChat', [SquareChat, None], None, ),  # 3
)
all_structs.append(SquareChatStatusWithoutMessage)
SquareChatStatusWithoutMessage.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'memberCount', None, None, ),  # 1
    (2, TType.I32, 'unreadMessageCount', None, None, ),  # 2
    (3, TType.STRING, 'markedAsReadMessageId', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'mentionedMessageId', 'UTF8', None, ),  # 4
    (5, TType.I32, 'notifiedMessageType', None, None, ),  # 5
)
all_structs.append(SquareEventNotifiedUpdateSquareChatStatus)
SquareEventNotifiedUpdateSquareChatStatus.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'statusWithoutMessage', [SquareChatStatusWithoutMessage, None], None, ),  # 2
)
all_structs.append(SquareChatMember)
SquareChatMember.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
    (6, TType.BOOL, 'notificationForNewMember', None, None, ),  # 6
)
all_structs.append(SquareEventNotifiedUpdateSquareChatMember)
SquareEventNotifiedUpdateSquareChatMember.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'squareChatMember', [SquareChatMember, None], None, ),  # 2
)
all_structs.append(SquareAuthority)
SquareAuthority.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
    (12, TType.I32, 'createSquareChatAnnouncement', None, None, ),  # 12
    (13, TType.I32, 'updateMaxChatMemberCount', None, None, ),  # 13
    (14, TType.I32, 'useReadonlyDefaultChat', None, None, ),  # 14
)
all_structs.append(SquareEventNotifiedUpdateSquareAuthority)
SquareEventNotifiedUpdateSquareAuthority.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'squareAuthority', [SquareAuthority, None], None, ),  # 2
)
all_structs.append(SquareFeature)
SquareFeature.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'controlState', None, None, ),  # 1
    (2, TType.I32, 'booleanValue', None, None, ),  # 2
)
all_structs.append(SquareFeatureSet)
SquareFeatureSet.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, None], None, ),  # 11
    (12, TType.STRUCT, 'invitingIntoOpenSquareChat', [SquareFeature, None], None, ),  # 12
    (13, TType.STRUCT, 'creatingSquareChat', [SquareFeature, None], None, ),  # 13
    (14, TType.STRUCT, 'readonlyDefaultChat', [SquareFeature, None], None, ),  # 14
    (15, TType.STRUCT, 'showingAdvertisement', [SquareFeature, None], None, ),  # 15
    (16, TType.STRUCT, 'delegateJoinToPlug', [SquareFeature, None], None, ),  # 16
    (17, TType.STRUCT, 'delegateKickOutToPlug', [SquareFeature, None], None, ),  # 17
    (18, TType.STRUCT, 'disableUpdateJoinMethod', [SquareFeature, None], None, ),  # 18
    (19, TType.STRUCT, 'disableTransferAdmin', [SquareFeature, None], None, ),  # 19
    (20, TType.STRUCT, 'creatingLiveTalk', [SquareFeature, None], None, ),  # 20
    (21, TType.STRUCT, '_notSure', [SquareFeature, None], None, ),  # 21
)
all_structs.append(NoteStatus)
NoteStatus.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'noteCount', None, None, ),  # 1
    (2, TType.I64, 'latestCreatedAt', None, None, ),  # 2
)
all_structs.append(SquareEventNotifiedCreateSquareMember)
SquareEventNotifiedCreateSquareMember.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'square', [Square, None], None, ),  # 1
    (2, TType.STRUCT, 'squareAuthority', [SquareAuthority, None], None, ),  # 2
    (3, TType.STRUCT, 'squareStatus', [SquareStatus, None], None, ),  # 3
    (4, TType.STRUCT, 'squareMember', [SquareMember, None], None, ),  # 4
    (5, TType.STRUCT, 'squareFeatureSet', [SquareFeatureSet, None], None, ),  # 5
    (6, TType.STRUCT, 'noteStatus', [NoteStatus, None], None, ),  # 6
)
all_structs.append(SquareChatStatus)
SquareChatStatus.thrift_spec = (
    None,  # 0
    None,  # 1
    None,  # 2
    (3, TType.STRUCT, 'lastMessage', [SquareMessage, None], None, ),  # 3
    (4, TType.STRING, 'senderDisplayName', 'UTF8', None, ),  # 4
    (5, TType.STRUCT, 'otherStatus', [SquareChatStatusWithoutMessage, None], None, ),  # 5
)
all_structs.append(SquareChatFeature)
SquareChatFeature.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'controlState', None, None, ),  # 1
    (2, TType.I32, 'booleanValue', None, None, ),  # 2
)
all_structs.append(SquareChatFeatureSet)
SquareChatFeatureSet.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', '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, 'disableUpdateMaxChatMemberCount', [SquareChatFeature, None], None, ),  # 11
    (12, TType.STRUCT, 'disableMarkAsReadEvent', [SquareChatFeature, None], None, ),  # 12
)
all_structs.append(SquareEventNotifiedCreateSquareChatMember)
SquareEventNotifiedCreateSquareChatMember.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'chat', [SquareChat, None], None, ),  # 1
    (2, TType.STRUCT, 'chatStatus', [SquareChatStatus, None], None, ),  # 2
    (3, TType.STRUCT, 'chatMember', [SquareChatMember, None], None, ),  # 3
    (4, TType.I64, 'joinedAt', None, None, ),  # 4
    (5, TType.STRUCT, 'peerSquareMember', [SquareMember, None], None, ),  # 5
    (6, TType.STRUCT, 'squareChatFeatureSet', [SquareChatFeatureSet, None], None, ),  # 6
)
all_structs.append(SquareEventNotifiedUpdateSquareMemberRelation)
SquareEventNotifiedUpdateSquareMemberRelation.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, None], None, ),  # 4
)
all_structs.append(SquareEventNotifiedUpdateSquareFeatureSet)
SquareEventNotifiedUpdateSquareFeatureSet.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'squareFeatureSet', [SquareFeatureSet, None], None, ),  # 1
)
all_structs.append(SquareEventNotifiedUpdateSquareChatFeatureSet)
SquareEventNotifiedUpdateSquareChatFeatureSet.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'squareChatFeatureSet', [SquareChatFeatureSet, None], None, ),  # 1
)
all_structs.append(SquareEventNotifiedUpdateSquareNoteStatus)
SquareEventNotifiedUpdateSquareNoteStatus.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'noteStatus', [NoteStatus, None], None, ),  # 2
)
all_structs.append(SquareEventNotifiedUpdateSquareChatAnnouncement)
SquareEventNotifiedUpdateSquareChatAnnouncement.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.I64, 'announcementSeq', None, None, ),  # 2
)
all_structs.append(SquareEventNotificationJoinRequest)
SquareEventNotificationJoinRequest.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
)
all_structs.append(SquareEventNotificationMemberUpdate)
SquareEventNotificationMemberUpdate.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
)
all_structs.append(SquareEventNotificationSquareDelete)
SquareEventNotificationSquareDelete.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
)
all_structs.append(SquareEventNotificationSquareChatDelete)
SquareEventNotificationSquareChatDelete.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
)
all_structs.append(SquareEventNotificationMessage)
SquareEventNotificationMessage.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'squareMessage', [SquareMessage, None], None, ),  # 2
    (3, TType.STRING, 'senderDisplayName', 'UTF8', None, ),  # 3
    (4, TType.I32, 'unreadCount', None, None, ),  # 4
    (5, TType.BOOL, 'requiredToFetchChatEvents', None, None, ),  # 5
    (6, TType.STRING, 'mentionedMessageId', 'UTF8', None, ),  # 6
    (7, TType.I32, 'notifiedMessageType', None, None, ),  # 7
    (8, TType.I32, 'reqSeq', None, None, ),  # 8
)
all_structs.append(SquareEventNotificationPostAnnouncement)
SquareEventNotificationPostAnnouncement.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'squareName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'squareProfileImageObsHash', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'actionUri', 'UTF8', None, ),  # 4
)
all_structs.append(SquareEventNotificationPost)
SquareEventNotificationPost.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareMid', 'UTF8', None, ),  # 1
    (2, TType.I32, 'notificationPostType', None, None, ),  # 2
    (3, TType.STRING, 'thumbnailObsHash', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'text', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'actionUri', 'UTF8', None, ),  # 5
)
all_structs.append(SquareEventNotificationNewChatMember)
SquareEventNotificationNewChatMember.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'squareChatName', 'UTF8', None, ),  # 2
)
all_structs.append(SquareEventNotificationMessageReaction)
SquareEventNotificationMessageReaction.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'messageId', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'squareChatName', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'reactorName', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'thumbnailObsHash', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'messageText', 'UTF8', None, ),  # 6
    (7, TType.I32, 'type', None, None, ),  # 7
)
all_structs.append(SquareEventPayload)
SquareEventPayload.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'receiveMessage', [SquareEventReceiveMessage, None], None, ),  # 1
    (2, TType.STRUCT, 'sendMessage', [SquareEventSendMessage, None], None, ),  # 2
    (3, TType.STRUCT, 'notifiedJoinSquareChat', [SquareEventNotifiedJoinSquareChat, None], None, ),  # 3
    (4, TType.STRUCT, 'notifiedInviteIntoSquareChat', [SquareEventNotifiedInviteIntoSquareChat, None], None, ),  # 4
    (5, TType.STRUCT, 'notifiedLeaveSquareChat', [SquareEventNotifiedLeaveSquareChat, None], None, ),  # 5
    (6, TType.STRUCT, 'notifiedDestroyMessage', [SquareEventNotifiedDestroyMessage, None], None, ),  # 6
    (7, TType.STRUCT, 'notifiedMarkAsRead', [SquareEventNotifiedMarkAsRead, None], None, ),  # 7
    (8, TType.STRUCT, 'notifiedUpdateSquareMemberProfile', [SquareEventNotifiedUpdateSquareMemberProfile, None], None, ),  # 8
    (9, TType.STRUCT, 'notifiedUpdateSquare', [SquareEventNotifiedUpdateSquare, None], None, ),  # 9
    (10, TType.STRUCT, 'notifiedUpdateSquareMember', [SquareEventNotifiedUpdateSquareMember, None], None, ),  # 10
    (11, TType.STRUCT, 'notifiedUpdateSquareChat', [SquareEventNotifiedUpdateSquareChat, None], None, ),  # 11
    (12, TType.STRUCT, 'notifiedUpdateSquareChatMember', [SquareEventNotifiedUpdateSquareChatMember, None], None, ),  # 12
    (13, TType.STRUCT, 'notifiedUpdateSquareAuthority', [SquareEventNotifiedUpdateSquareAuthority, None], None, ),  # 13
    (14, TType.STRUCT, 'notifiedUpdateSquareStatus', [SquareEventNotifiedUpdateSquareStatus, None], None, ),  # 14
    (15, TType.STRUCT, 'notifiedUpdateSquareChatStatus', [SquareEventNotifiedUpdateSquareChatStatus, None], None, ),  # 15
    (16, TType.STRUCT, 'notifiedCreateSquareMember', [SquareEventNotifiedCreateSquareMember, None], None, ),  # 16
    (17, TType.STRUCT, 'notifiedCreateSquareChatMember', [SquareEventNotifiedCreateSquareChatMember, None], None, ),  # 17
    (18, TType.STRUCT, 'notifiedUpdateSquareMemberRelation', [SquareEventNotifiedUpdateSquareMemberRelation, None], None, ),  # 18
    (19, TType.STRUCT, 'notifiedShutdownSquare', [SquareEventNotifiedShutdownSquare, None], None, ),  # 19
    (20, TType.STRUCT, 'notifiedKickoutFromSquare', [SquareEventNotifiedKickoutFromSquare, None], None, ),  # 20
    (21, TType.STRUCT, 'notifiedDeleteSquareChat', [SquareEventNotifiedDeleteSquareChat, None], None, ),  # 21
    (22, TType.STRUCT, 'notificationJoinRequest', [SquareEventNotificationJoinRequest, None], None, ),  # 22
    (23, TType.STRUCT, 'notificationJoined', [SquareEventNotificationMemberUpdate, None], None, ),  # 23
    (24, TType.STRUCT, 'notificationPromoteCoadmin', [SquareEventNotificationMemberUpdate, None], None, ),  # 24
    (25, TType.STRUCT, 'notificationPromoteAdmin', [SquareEventNotificationMemberUpdate, None], None, ),  # 25
    (26, TType.STRUCT, 'notificationDemoteMember', [SquareEventNotificationMemberUpdate, None], None, ),  # 26
    (27, TType.STRUCT, 'notificationKickedOut', [SquareEventNotificationMemberUpdate, None], None, ),  # 27
    (28, TType.STRUCT, 'notificationSquareDelete', [SquareEventNotificationSquareDelete, None], None, ),  # 28
    (29, TType.STRUCT, 'notificationSquareChatDelete', [SquareEventNotificationSquareChatDelete, None], None, ),  # 29
    (30, TType.STRUCT, 'notificationMessage', [SquareEventNotificationMessage, None], None, ),  # 30
    (31, TType.STRUCT, 'notifiedUpdateSquareChatProfileName', [SquareEventNotifiedUpdateSquareChatProfileName, None], None, ),  # 31
    (32, TType.STRUCT, 'notifiedUpdateSquareChatProfileImage', [SquareEventNotifiedUpdateSquareChatProfileImage, None], None, ),  # 32
    (33, TType.STRUCT, 'notifiedUpdateSquareFeatureSet', [SquareEventNotifiedUpdateSquareFeatureSet, None], None, ),  # 33
    (34, TType.STRUCT, 'notifiedAddBot', [SquareEventNotifiedAddBot, None], None, ),  # 34
    (35, TType.STRUCT, 'notifiedRemoveBot', [SquareEventNotifiedRemoveBot, None], None, ),  # 35
    (36, TType.STRUCT, 'notifiedUpdateSquareNoteStatus', [SquareEventNotifiedUpdateSquareNoteStatus, None], None, ),  # 36
    (37, TType.STRUCT, 'notifiedUpdateSquareChatAnnouncement', [SquareEventNotifiedUpdateSquareChatAnnouncement, None], None, ),  # 37
    (38, TType.STRUCT, 'notifiedUpdateSquareChatMaxMemberCount', [SquareEventNotifiedUpdateSquareChatMaxMemberCount, None], None, ),  # 38
    (39, TType.STRUCT, 'notificationPostAnnouncement', [SquareEventNotificationPostAnnouncement, None], None, ),  # 39
    (40, TType.STRUCT, 'notificationPost', [SquareEventNotificationPost, None], None, ),  # 40
    (41, TType.STRUCT, 'mutateMessage', [SquareEventMutateMessage, None], None, ),  # 41
    (42, TType.STRUCT, 'notificationNewChatMember', [SquareEventNotificationNewChatMember, None], None, ),  # 42
    (43, TType.STRUCT, 'notifiedUpdateReadonlyChat', [SquareEventNotifiedUpdateReadonlyChat, None], None, ),  # 43
    (44, TType.STRUCT, 'notifiedUpdateMessageStatus', [SquareEventNotifiedUpdateMessageStatus, None], None, ),  # 44
    (45, TType.STRUCT, 'notificationMessageReaction', [SquareEventNotificationMessageReaction, None], None, ),  # 45
    (46, TType.STRUCT, 'chatPopup', [SquareEventChatPopup, None], None, ),  # 46
    (47, TType.STRUCT, 'notifiedSystemMessage', [SquareEventNotifiedSystemMessage, None], None, ),  # 47
    (48, TType.STRUCT, 'notifiedUpdateSquareChatFeatureSet', [SquareEventNotifiedUpdateSquareChatFeatureSet, None], None, ),  # 48
)
all_structs.append(SquareEvent)
SquareEvent.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, None], None, ),  # 4
    (5, TType.STRING, 'syncToken', 'UTF8', None, ),  # 5
    (6, TType.I32, 'eventStatus', None, None, ),  # 6
)
all_structs.append(SendMessageResponse)
SendMessageResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'createdSquareMessage', [SquareMessage, None], None, ),  # 1
)
all_structs.append(UnsendMessageResponse)
UnsendMessageResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'unsentMessage', [SquareMessage, None], None, ),  # 1
)
all_structs.append(FetchMyEventsResponse)
FetchMyEventsResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'subscription', [SubscriptionState, None], None, ),  # 1
    (2, TType.LIST, 'events', (TType.STRUCT, [SquareEvent, None], False), None, ),  # 2
    (3, TType.STRING, 'syncToken', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'continuationToken', 'UTF8', None, ),  # 4
)
all_structs.append(GetSquareEmidResponse)
GetSquareEmidResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareEmid', 'UTF8', None, ),  # 1
)
all_structs.append(GetSquareMembersBySquareResponse)
GetSquareMembersBySquareResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'members', (TType.STRUCT, [SquareMember, None], False), None, ),  # 1
)
all_structs.append(ManualRepairResponse)
ManualRepairResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'events', (TType.STRUCT, [SquareEvent, None], False), None, ),  # 1
    (2, TType.STRING, 'syncToken', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'continuationToken', 'UTF8', None, ),  # 3
)
all_structs.append(InviteIntoSquareChatResponse)
InviteIntoSquareChatResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'inviteeMids', (TType.STRING, 'UTF8', False), None, ),  # 1
)
all_structs.append(InviteToSquareResponse)
InviteToSquareResponse.thrift_spec = (
)
all_structs.append(GetJoinedSquaresResponse)
GetJoinedSquaresResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'squares', (TType.STRUCT, [Square, None], False), None, ),  # 1
    (2, TType.MAP, 'members', (TType.STRING, 'UTF8', TType.STRUCT, [SquareMember, None], False), None, ),  # 2
    (3, TType.MAP, 'authorities', (TType.STRING, 'UTF8', TType.STRUCT, [SquareAuthority, None], False), None, ),  # 3
    (4, TType.MAP, 'statuses', (TType.STRING, 'UTF8', TType.STRUCT, [SquareStatus, None], False), None, ),  # 4
    (5, TType.STRING, 'continuationToken', 'UTF8', None, ),  # 5
    (6, TType.MAP, 'noteStatuses', (TType.STRING, 'UTF8', TType.STRUCT, [NoteStatus, None], False), None, ),  # 6
)
all_structs.append(MarkAsReadResponse)
MarkAsReadResponse.thrift_spec = (
)
all_structs.append(ReactToMessageResponse)
ReactToMessageResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'reaction', [SquareMessageReaction, None], None, ),  # 1
    (2, TType.STRUCT, 'status', [SquareMessageReactionStatus, None], None, ),  # 2
)
all_structs.append(FindSquareByInvitationTicketResponse)
FindSquareByInvitationTicketResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'square', [Square, None], None, ),  # 1
    (2, TType.STRUCT, 'myMembership', [SquareMember, None], None, ),  # 2
    (3, TType.STRUCT, 'squareAuthority', [SquareAuthority, None], None, ),  # 3
    (4, TType.STRUCT, 'squareStatus', [SquareStatus, None], None, ),  # 4
    (5, TType.STRUCT, 'squareFeatureSet', [SquareFeatureSet, None], None, ),  # 5
    (6, TType.STRUCT, 'noteStatus', [NoteStatus, None], None, ),  # 6
    (7, TType.STRUCT, 'chat', [SquareChat, None], None, ),  # 7
    (8, TType.STRUCT, 'chatStatus', [SquareChatStatus, None], None, ),  # 8
)
all_structs.append(SubscriptionState)
SubscriptionState.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'subscriptionId', None, None, ),  # 1
    (2, TType.I64, 'ttlMillis', None, None, ),  # 2
)
all_structs.append(FetchSquareChatEventsResponse)
FetchSquareChatEventsResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'subscription', [SubscriptionState, None], None, ),  # 1
    (2, TType.LIST, 'events', (TType.STRUCT, [SquareEvent, None], False), None, ),  # 2
    (3, TType.STRING, 'syncToken', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'continuationToken', 'UTF8', None, ),  # 4
)
all_structs.append(GetSquareResponse)
GetSquareResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'square', [Square, None], None, ),  # 1
    (2, TType.STRUCT, 'myMembership', [SquareMember, None], None, ),  # 2
    (3, TType.STRUCT, 'squareAuthority', [SquareAuthority, None], None, ),  # 3
    (4, TType.STRUCT, 'squareStatus', [SquareStatus, None], None, ),  # 4
    (5, TType.STRUCT, 'squareFeatureSet', [SquareFeatureSet, None], None, ),  # 5
    (6, TType.STRUCT, 'noteStatus', [NoteStatus, None], None, ),  # 6
)
all_structs.append(GetJoinableSquareChatsResponse)
GetJoinableSquareChatsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'squareChats', (TType.STRUCT, [SquareChat, None], 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, None], False), None, ),  # 4
)
all_structs.append(CreateSquareResponse)
CreateSquareResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'square', [Square, None], None, ),  # 1
    (2, TType.STRUCT, 'creator', [SquareMember, None], None, ),  # 2
    (3, TType.STRUCT, 'authority', [SquareAuthority, None], None, ),  # 3
    (4, TType.STRUCT, 'status', [SquareStatus, None], None, ),  # 4
    (5, TType.STRUCT, 'featureSet', [SquareFeatureSet, None], None, ),  # 5
    (6, TType.STRUCT, 'noteStatus', [NoteStatus, None], None, ),  # 6
    (7, TType.STRUCT, 'squareChat', [SquareChat, None], None, ),  # 7
    (8, TType.STRUCT, 'squareChatStatus', [SquareChatStatus, None], None, ),  # 8
    (9, TType.STRUCT, 'squareChatMember', [SquareChatMember, None], None, ),  # 9
    (10, TType.STRUCT, 'squareChatFeatureSet', [SquareChatFeatureSet, None], None, ),  # 10
)
all_structs.append(TextMessageAnnouncementContents)
TextMessageAnnouncementContents.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
    (5, TType.STRING, 'senderMid', 'UTF8', None, ),  # 5
)
all_structs.append(SquareChatAnnouncementContents)
SquareChatAnnouncementContents.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'textMessageAnnouncementContents', [TextMessageAnnouncementContents, None], None, ),  # 1
)
all_structs.append(SquareChatAnnouncement)
SquareChatAnnouncement.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'announcementSeq', None, None, ),  # 1
    (2, TType.I32, 'type', None, None, ),  # 2
    (3, TType.STRUCT, 'contents', [SquareChatAnnouncementContents, None], None, ),  # 3
    (4, TType.I64, 'createdAt', None, None, ),  # 4
    (5, TType.STRING, 'creator', 'UTF8', None, ),  # 5
)
all_structs.append(GetSquareChatAnnouncementsResponse)
GetSquareChatAnnouncementsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'announcements', (TType.STRUCT, [SquareChatAnnouncement, None], False), None, ),  # 1
)
all_structs.append(GetSquareFeatureSetResponse)
GetSquareFeatureSetResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'squareFeatureSet', [SquareFeatureSet, None], None, ),  # 1
)
all_structs.append(GetSquareChatFeatureSetResponse)
GetSquareChatFeatureSetResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'squareChatFeatureSet', [SquareChatFeatureSet, None], None, ),  # 1
)
all_structs.append(AcceptSpeakersResponse)
AcceptSpeakersResponse.thrift_spec = (
)
all_structs.append(AcceptToChangeRoleResponse)
AcceptToChangeRoleResponse.thrift_spec = (
)
all_structs.append(AcceptToListenResponse)
AcceptToListenResponse.thrift_spec = (
)
all_structs.append(AcceptToSpeakResponse)
AcceptToSpeakResponse.thrift_spec = (
)
all_structs.append(CancelToSpeakResponse)
CancelToSpeakResponse.thrift_spec = (
)
all_structs.append(EndLiveTalkResponse)
EndLiveTalkResponse.thrift_spec = (
)
all_structs.append(LiveTalkEventNotifiedUpdateLiveTalkTitle)
LiveTalkEventNotifiedUpdateLiveTalkTitle.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'title', 'UTF8', None, ),  # 1
)
all_structs.append(LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting)
LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'speakerSetting', None, None, ),  # 1
)
all_structs.append(LiveTalkEventNotifiedUpdateLiveTalkAnnouncement)
LiveTalkEventNotifiedUpdateLiveTalkAnnouncement.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'announcement', 'UTF8', None, ),  # 1
)
all_structs.append(LiveTalkEventNotifiedUpdateSquareMemberRole)
LiveTalkEventNotifiedUpdateSquareMemberRole.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareMemberMid', 'UTF8', None, ),  # 1
    (2, TType.I32, 'role', None, None, ),  # 2
)
all_structs.append(LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak)
LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'allowRequestToSpeak', None, None, ),  # 1
)
all_structs.append(LiveTalkEventPayload)
LiveTalkEventPayload.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'notifiedUpdateLiveTalkTitle', [LiveTalkEventNotifiedUpdateLiveTalkTitle, None], None, ),  # 1
    (2, TType.STRUCT, 'notifiedUpdateLiveTalkSpeakerSetting', [LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting, None], None, ),  # 2
    (3, TType.STRUCT, 'notifiedUpdateLiveTalkAnnouncement', [LiveTalkEventNotifiedUpdateLiveTalkAnnouncement, None], None, ),  # 3
    (4, TType.STRUCT, 'notifiedUpdateSquareMemberRole', [LiveTalkEventNotifiedUpdateSquareMemberRole, None], None, ),  # 4
    (5, TType.STRUCT, 'notifiedUpdateLiveTalkAllowRequestToSpeak', [LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak, None], None, ),  # 5
)
all_structs.append(LiveTalkEvent)
LiveTalkEvent.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'type', None, None, ),  # 1
    (2, TType.STRUCT, 'payload', [LiveTalkEventPayload, None], None, ),  # 2
    (3, TType.STRING, 'syncToken', 'UTF8', None, ),  # 3
)
all_structs.append(FetchLiveTalkEventsResponse)
FetchLiveTalkEventsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'events', (TType.STRUCT, [LiveTalkEvent, None], False), None, ),  # 1
    (2, TType.STRING, 'syncToken', 'UTF8', None, ),  # 2
    (3, TType.BOOL, 'hasMore', None, None, ),  # 3
)
all_structs.append(LiveTalk)
LiveTalk.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'squareChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'sessionId', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'title', 'UTF8', None, ),  # 3
    (4, TType.I32, 'type', None, None, ),  # 4
    (5, TType.I32, 'speakerSetting', None, None, ),  # 5
    (6, TType.BOOL, 'allowRequestToSpeak', None, None, ),  # 6
    (7, TType.STRING, 'announcement', 'UTF8', None, ),  # 7
    (8, TType.I32, 'participantCount', None, None, ),  # 8
    (9, TType.I64, 'revision', None, None, ),  # 9
    (10, TType.I64, 'startedAt', None, None, ),  # 10
)
all_structs.append(FindLiveTalkByInvitationTicketResponse)
FindLiveTalkByInvitationTicketResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'chatInvitationTicket', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'liveTalk', [LiveTalk, None], None, ),  # 2
    (3, TType.STRUCT, 'chat', [SquareChat, None], None, ),  # 3
    (4, TType.STRUCT, 'squareMember', [SquareMember, None], None, ),  # 4
    (5, TType.I32, 'chatMembershipState', None, None, ),  # 5
)
all_structs.append(ForceEndLiveTalkResponse)
ForceEndLiveTalkResponse.thrift_spec = (
)
all_structs.append(LiveTalkSpeaker)
LiveTalkSpeaker.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'displayName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'profileImageObsHash', 'UTF8', None, ),  # 2
    (3, TType.I32, 'role', None, None, ),  # 3
)
all_structs.append(GetLiveTalkInfoForNonMemberResponse)
GetLiveTalkInfoForNonMemberResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'chatName', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'liveTalk', [LiveTalk, None], None, ),  # 2
    (3, TType.LIST, 'speakers', (TType.STRUCT, [LiveTalkSpeaker, None], False), None, ),  # 3
    (4, TType.STRING, 'chatInvitationUrl', 'UTF8', None, ),  # 4
)
all_structs.append(GetLiveTalkInvitationUrlResponse)
GetLiveTalkInvitationUrlResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'invitationUrl', 'UTF8', None, ),  # 1
)
all_structs.append(GetLiveTalkSpeakersForNonMemberResponse)
GetLiveTalkSpeakersForNonMemberResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'speakers', (TType.STRUCT, [LiveTalkSpeaker, None], False), None, ),  # 1
)
all_structs.append(GetSquareInfoByChatMidResponse)
GetSquareInfoByChatMidResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'defaultChatMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'squareName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'squareDesc', 'UTF8', None, ),  # 3
)
all_structs.append(InviteToChangeRoleResponse)
InviteToChangeRoleResponse.thrift_spec = (
)
all_structs.append(InviteToListenResponse)
InviteToListenResponse.thrift_spec = (
)
all_structs.append(InviteToLiveTalkResponse)
InviteToLiveTalkResponse.thrift_spec = (
)
all_structs.append(InviteToSpeakResponse)
InviteToSpeakResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'inviteRequestId', 'UTF8', None, ),  # 1
)
all_structs.append(JoinLiveTalkResponse)
JoinLiveTalkResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'hostMemberMid', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'memberSessionId', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'token', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'proto', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'voipAddress', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'voipAddress6', 'UTF8', None, ),  # 6
    (7, TType.I32, 'voipUdpPort', None, None, ),  # 7
    (8, TType.I32, 'voipTcpPort', None, None, ),  # 8
    (9, TType.STRING, 'fromZone', 'UTF8', None, ),  # 9
    (10, TType.STRING, 'commParam', 'UTF8', None, ),  # 10
    (11, TType.STRING, 'orionAddress', 'UTF8', None, ),  # 11
    (12, TType.STRING, 'polarisAddress', 'UTF8', None, ),  # 12
    (13, TType.STRING, 'polarisZone', 'UTF8', None, ),  # 13
    (14, TType.I32, 'polarisUdpPort', None, None, ),  # 14
)
all_structs.append(KickOutLiveTalkParticipantsResponse)
KickOutLiveTalkParticipantsResponse.thrift_spec = (
)
all_structs.append(RejectSpeakersResponse)
RejectSpeakersResponse.thrift_spec = (
)
all_structs.append(RejectToSpeakResponse)
RejectToSpeakResponse.thrift_spec = (
)
all_structs.append(ReportLiveTalkResponse)
ReportLiveTalkResponse.thrift_spec = (
)
all_structs.append(ReportLiveTalkSpeakerResponse)
ReportLiveTalkSpeakerResponse.thrift_spec = (
)
all_structs.append(RequestToListenResponse)
RequestToListenResponse.thrift_spec = (
)
all_structs.append(RequestToSpeakResponse)
RequestToSpeakResponse.thrift_spec = (
)
all_structs.append(StartLiveTalkResponse)
StartLiveTalkResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'liveTalk', [LiveTalk, None], None, ),  # 1
)
all_structs.append(UpdateLiveTalkAttrsResponse)
UpdateLiveTalkAttrsResponse.thrift_spec = (
)
all_structs.append(CreateQrCodeForSecureResponse)
CreateQrCodeForSecureResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'callbackUrl', 'UTF8', None, ),  # 1
    (2, TType.I32, 'longPollingMaxCount', None, None, ),  # 2
    (3, TType.I32, 'longPollingIntervalSec', None, None, ),  # 3
    (4, TType.STRING, 'nonce', 'UTF8', None, ),  # 4
)
all_structs.append(RefreshApiRetryPolicy)
RefreshApiRetryPolicy.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'initialDelayInMillis', None, None, ),  # 1
    (2, TType.I64, 'maxDelayInMillis', None, None, ),  # 2
    (3, TType.DOUBLE, 'multiplier', None, None, ),  # 3
    (4, TType.DOUBLE, 'jitterRate', None, None, ),  # 4
)
all_structs.append(TokenV3IssueResult)
TokenV3IssueResult.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'accessToken', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'refreshToken', 'UTF8', None, ),  # 2
    (3, TType.I64, 'durationUntilRefreshInSec', None, None, ),  # 3
    (4, TType.STRUCT, 'refreshApiRetryPolicy', [RefreshApiRetryPolicy, None], None, ),  # 4
    (5, TType.STRING, 'loginSessionId', 'UTF8', None, ),  # 5
    (6, TType.I64, 'tokenIssueTimeEpochSec', None, None, ),  # 6
)
all_structs.append(QrCodeLoginV2Response)
QrCodeLoginV2Response.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'certificate', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'accessTokenV2', 'UTF8', None, ),  # 2
    (3, TType.STRUCT, 'tokenV3IssueResult', [TokenV3IssueResult, None], None, ),  # 3
    (4, TType.STRING, 'mid', 'UTF8', None, ),  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    (9, TType.I64, 'lastBindTimestamp', None, None, ),  # 9
    (10, TType.MAP, 'metaData', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 10
)
fix_spec(all_structs)
del all_structs
