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

import sys

from thrift.protocol.TProtocol import TProtocolException
from thrift.Thrift import TApplicationException
from thrift.Thrift import TException
from thrift.Thrift import TFrozenDict
from thrift.Thrift import TMessageType
from thrift.Thrift import TType
from thrift.transport import TTransport
from thrift.TRecursive import fix_spec


all_structs = []


class ApplicationType(object):
    """
    **LINE_THRIFT****
    | Author : GoogleX & FadhilRachman & Alin
    | Edited : By Tanysz
    |
    |
    | Copyright (c) 2019

    """

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

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

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


class ExtendedProfileAttribute(object):
    BIRTHDAY = 0

    _VALUES_TO_NAMES = {
        0: "BIRTHDAY",
    }

    _NAMES_TO_VALUES = {
        "BIRTHDAY": 0,
    }


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

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

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


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

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

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


class PaidCallProductType(object):
    COIN = 0
    CREDIT = 1
    MONTHLY = 2

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

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


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

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

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


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

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

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


class BuddyOnAirLabel(object):
    ON_AIR = 0
    LIVE = 1

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

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


class BuddyBannerLinkType(object):
    BUDDY_BANNER_LINK_HIDDEN = 0
    BUDDY_BANNER_LINK_MID = 1
    BUDDY_BANNER_LINK_URL = 2

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

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


class BuddyOnAirType(object):
    NORMAL = 0
    LIVE = 1
    VOIP = 2

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

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


class Diff(object):
    ADDED = 0
    UPDATED = 1
    REMOVED = 2

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

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


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

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

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


class SyncTriggerReason(object):
    OTHER = 0
    REVISION_GAP_TOO_LARGE = 1
    OPERATION_EXPIRED = 2

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

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


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

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

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


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

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

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


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

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

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


class LiffViewFeatures(object):
    ADVERTISING_ID = 2
    BLUETOOTH_LE = 3
    GEOLOCATION = 1

    _VALUES_TO_NAMES = {
        2: "ADVERTISING_ID",
        3: "BLUETOOTH_LE",
        1: "GEOLOCATION",
    }

    _NAMES_TO_VALUES = {
        "ADVERTISING_ID": 2,
        "BLUETOOTH_LE": 3,
        "GEOLOCATION": 1,
    }


class BuddySearchRequestSource(object):
    NA = 0
    FRIEND_VIEW = 1
    OFFICIAL_ACCOUNT_VIEW = 2

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

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


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

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

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


class ChannelConfiguration(object):
    MESSAGE = 0
    MESSAGE_NOTIFICATION = 1
    NOTIFICATION_CENTER = 2

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

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


class ChannelPermission(object):
    PROFILE = 0
    FRIENDS = 1
    GROUP = 2

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

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


class ChannelFeatureLicense(object):
    BLE_LCS_API_USABLE = 26
    PROHIBIT_MINIMIZE_CHANNEL_BROWSER = 27
    ALLOW_IOS_WEBKIT = 28

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

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


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

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

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


class ChannelSyncType(object):
    SYNC = 0
    REMOVE = 1
    REMOVE_ALL = 2

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

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


class LoginType(object):
    ID_CREDENTIAL = 0
    QRCODE = 1
    ID_CREDENTIAL_WITH_E2EE = 2

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

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


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

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

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


class ContactCategory(object):
    NORMAL = 0
    RECOMMEND = 1

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

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


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

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

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


class AsymmetricKeyAlgorithm(object):
    ASYMMETRIC_KEY_ALGORITHM_RSA = 1
    ASYMMETRIC_KEY_ALGORITHM_ECDH = 2

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

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


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

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

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


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

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

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


class ContactType(object):
    MID = 0
    PHONE = 1
    EMAIL = 2
    USERID = 3
    PROXIMITY = 4
    GROUP = 5
    USER = 6
    QRCODE = 7
    PROMOTION_BOT = 8
    CONTACT_MESSAGE = 9
    FRIEND_REQUEST = 10
    REPAIR = 128
    FACEBOOK = 2305
    SINA = 2306
    RENREN = 2307
    FEIXIN = 2308
    BBM = 2309
    BEACON = 11

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

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


class GroupPreferenceAttribute(object):
    INVITATION_TICKET = 1
    FAVORITE_TIMESTAMP = 2

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

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


class ContentType(object):
    NONE = 0
    IMAGE = 1
    VIDEO = 2
    AUDIO = 3
    HTML = 4
    PDF = 5
    CALL = 6
    STICKER = 7
    PRESENCE = 8
    GIFT = 9
    GROUPBOARD = 10
    APPLINK = 11
    LINK = 12
    CONTACT = 13
    FILE = 14
    LOCATION = 15
    POSTNOTIFICATION = 16
    RICH = 17
    CHATEVENT = 18
    MUSIC = 19
    PAYMENT = 20
    EXTIMAGE = 21
    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 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 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 NotifiedMessageType(object):
    MENTION = 1
    REPLY = 2

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

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


class RoomAttribute(object):
    ALL = 255
    NOTIFICATION_SETTING = 1

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

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


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

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

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


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

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

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


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

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

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


class AccountMigrationCheckType(object):
    SKIP = 0
    PINCODE = 1
    SECURITY_CENTER = 2

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

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


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

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

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


class EmailConfirmationType(object):
    SERVER_SIDE_EMAIL = 0
    CLIENT_SIDE_EMAIL = 1

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

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


class SquareChatAnnouncementType(object):
    TEXT_MESSAGE = 0

    _VALUES_TO_NAMES = {
        0: "TEXT_MESSAGE",
    }

    _NAMES_TO_VALUES = {
        "TEXT_MESSAGE": 0,
    }


class SquareChatAttribute(object):
    NAME = 2
    SQUARE_CHAT_IMAGE = 3
    STATE = 4
    TYPE = 5
    MAX_MEMBER_COUNT = 6

    _VALUES_TO_NAMES = {
        2: "NAME",
        3: "SQUARE_CHAT_IMAGE",
        4: "STATE",
        5: "TYPE",
        6: "MAX_MEMBER_COUNT",
    }

    _NAMES_TO_VALUES = {
        "NAME": 2,
        "SQUARE_CHAT_IMAGE": 3,
        "STATE": 4,
        "TYPE": 5,
        "MAX_MEMBER_COUNT": 6,
    }


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

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

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


class SquareMemberRelationAttribute(object):
    BLOCKED = 1

    _VALUES_TO_NAMES = {
        1: "BLOCKED",
    }

    _NAMES_TO_VALUES = {
        "BLOCKED": 1,
    }


class SquarePreferenceAttribute(object):
    FAVORITE = 1
    NOTI_FOR_NEW_JOIN_REQUEST = 2

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

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


class SquareState(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 CommitMessageResultCode(object):
    DELIVERED = 0
    DELIVERY_SKIPPED = 1
    DELIVERY_RESTRICTED = 2

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

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


class ErrorCode(object):
    ILLEGAL_ARGUMENT = 0
    AUTHENTICATION_FAILED = 1
    DB_FAILED = 2
    INVALID_STATE = 3
    EXCESSIVE_ACCESS = 4
    NOT_FOUND = 5
    INVALID_MID = 9
    NOT_A_MEMBER = 10
    INVALID_LENGTH = 6
    NOT_AVAILABLE_USER = 7
    NOT_AUTHORIZED_DEVICE = 8
    NOT_AUTHORIZED_SESSION = 14
    INCOMPATIBLE_APP_VERSION = 11
    NOT_READY = 12
    NOT_AVAILABLE_SESSION = 13
    SYSTEM_ERROR = 15
    NO_AVAILABLE_VERIFICATION_METHOD = 16
    NOT_AUTHENTICATED = 17
    INVALID_IDENTITY_CREDENTIAL = 18
    NOT_AVAILABLE_IDENTITY_IDENTIFIER = 19
    INTERNAL_ERROR = 20
    NO_SUCH_IDENTITY_IDENFIER = 21
    DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY = 22
    ILLEGAL_IDENTITY_CREDENTIAL = 23
    UNKNOWN_CHANNEL = 24
    NO_SUCH_MESSAGE_BOX = 25
    NOT_AVAILABLE_MESSAGE_BOX = 26
    CHANNEL_DOES_NOT_MATCH = 27
    NOT_YOUR_MESSAGE = 28
    MESSAGE_DEFINED_ERROR = 29
    USER_CANNOT_ACCEPT_PRESENTS = 30
    USER_NOT_STICKER_OWNER = 32
    MAINTENANCE_ERROR = 33
    ACCOUNT_NOT_MATCHED = 34
    ABUSE_BLOCK = 35
    NOT_FRIEND = 36
    NOT_ALLOWED_CALL = 37
    BLOCK_FRIEND = 38
    INCOMPATIBLE_VOIP_VERSION = 39
    INVALID_SNS_ACCESS_TOKEN = 40
    EXTERNAL_SERVICE_NOT_AVAILABLE = 41
    NOT_ALLOWED_ADD_CONTACT = 42
    NOT_CERTIFICATED = 43
    NOT_ALLOWED_SECONDARY_DEVICE = 44
    INVALID_PIN_CODE = 45
    NOT_FOUND_IDENTITY_CREDENTIAL = 46
    EXCEED_FILE_MAX_SIZE = 47
    EXCEED_DAILY_QUOTA = 48
    NOT_SUPPORT_SEND_FILE = 49
    MUST_UPGRADE = 50
    NOT_AVAILABLE_PIN_CODE_SESSION = 51
    EXPIRED_REVISION = 52
    NOT_YET_PHONE_NUMBER = 54
    BAD_CALL_NUMBER = 55
    UNAVAILABLE_CALL_NUMBER = 56
    NOT_SUPPORT_CALL_SERVICE = 57
    CONGESTION_CONTROL = 58
    NO_BALANCE = 59
    NOT_PERMITTED_CALLER_ID = 60
    NO_CALLER_ID_LIMIT_EXCEEDED = 61
    CALLER_ID_VERIFICATION_REQUIRED = 62
    NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED = 63
    MESSAGE_NOT_FOUND = 64
    INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT = 65
    ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED = 66
    ACCOUNT_MIGRATION_PINCODE_BLOCKED = 67
    INVALID_PASSWORD_FORMAT = 69
    FEATURE_RESTRICTED = 70
    MESSAGE_NOT_DESTRUCTIBLE = 71
    PAID_CALL_REDEEM_FAILED = 72
    PREVENTED_JOIN_BY_TICKET = 73
    SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT = 75
    SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY = 76
    SECURITY_CENTER_NOT_VERIFIED = 77
    SECURITY_CENTER_BLOCKED_BY_SETTING = 78
    SECURITY_CENTER_BLOCKED = 79
    TALK_PROXY_EXCEPTION = 80
    E2EE_INVALID_PROTOCOL = 81
    E2EE_RETRY_ENCRYPT = 82
    E2EE_UPDATE_SENDER_KEY = 83
    E2EE_UPDATE_RECEIVER_KEY = 84
    E2EE_INVALID_ARGUMENT = 85
    E2EE_INVALID_VERSION = 86
    E2EE_SENDER_DISABLED = 87
    E2EE_RECEIVER_DISABLED = 88
    E2EE_SENDER_NOT_ALLOWED = 89
    E2EE_RECEIVER_NOT_ALLOWED = 90
    E2EE_RESEND_FAIL = 91
    E2EE_RESEND_OK = 92
    HITOKOTO_BACKUP_NO_AVAILABLE_DATA = 93
    E2EE_UPDATE_PRIMARY_DEVICE = 94
    SUCCESS = 95
    CANCEL = 96
    E2EE_PRIMARY_NOT_SUPPORT = 97
    E2EE_RETRY_PLAIN = 98
    E2EE_RECREATE_GROUP_KEY = 99
    E2EE_GROUP_TOO_MANY_MEMBERS = 100
    SERVER_BUSY = 101
    NOT_ALLOWED_ADD_FOLLOW = 102
    INCOMING_FRIEND_REQUEST_LIMIT = 103
    OUTGOING_FRIEND_REQUEST_LIMIT = 104
    OUTGOING_FRIEND_REQUEST_QUOTA = 105
    DUPLICATED = 106
    BANNED = 107

    _VALUES_TO_NAMES = {
        0: "ILLEGAL_ARGUMENT",
        1: "AUTHENTICATION_FAILED",
        2: "DB_FAILED",
        3: "INVALID_STATE",
        4: "EXCESSIVE_ACCESS",
        5: "NOT_FOUND",
        9: "INVALID_MID",
        10: "NOT_A_MEMBER",
        6: "INVALID_LENGTH",
        7: "NOT_AVAILABLE_USER",
        8: "NOT_AUTHORIZED_DEVICE",
        14: "NOT_AUTHORIZED_SESSION",
        11: "INCOMPATIBLE_APP_VERSION",
        12: "NOT_READY",
        13: "NOT_AVAILABLE_SESSION",
        15: "SYSTEM_ERROR",
        16: "NO_AVAILABLE_VERIFICATION_METHOD",
        17: "NOT_AUTHENTICATED",
        18: "INVALID_IDENTITY_CREDENTIAL",
        19: "NOT_AVAILABLE_IDENTITY_IDENTIFIER",
        20: "INTERNAL_ERROR",
        21: "NO_SUCH_IDENTITY_IDENFIER",
        22: "DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY",
        23: "ILLEGAL_IDENTITY_CREDENTIAL",
        24: "UNKNOWN_CHANNEL",
        25: "NO_SUCH_MESSAGE_BOX",
        26: "NOT_AVAILABLE_MESSAGE_BOX",
        27: "CHANNEL_DOES_NOT_MATCH",
        28: "NOT_YOUR_MESSAGE",
        29: "MESSAGE_DEFINED_ERROR",
        30: "USER_CANNOT_ACCEPT_PRESENTS",
        32: "USER_NOT_STICKER_OWNER",
        33: "MAINTENANCE_ERROR",
        34: "ACCOUNT_NOT_MATCHED",
        35: "ABUSE_BLOCK",
        36: "NOT_FRIEND",
        37: "NOT_ALLOWED_CALL",
        38: "BLOCK_FRIEND",
        39: "INCOMPATIBLE_VOIP_VERSION",
        40: "INVALID_SNS_ACCESS_TOKEN",
        41: "EXTERNAL_SERVICE_NOT_AVAILABLE",
        42: "NOT_ALLOWED_ADD_CONTACT",
        43: "NOT_CERTIFICATED",
        44: "NOT_ALLOWED_SECONDARY_DEVICE",
        45: "INVALID_PIN_CODE",
        46: "NOT_FOUND_IDENTITY_CREDENTIAL",
        47: "EXCEED_FILE_MAX_SIZE",
        48: "EXCEED_DAILY_QUOTA",
        49: "NOT_SUPPORT_SEND_FILE",
        50: "MUST_UPGRADE",
        51: "NOT_AVAILABLE_PIN_CODE_SESSION",
        52: "EXPIRED_REVISION",
        54: "NOT_YET_PHONE_NUMBER",
        55: "BAD_CALL_NUMBER",
        56: "UNAVAILABLE_CALL_NUMBER",
        57: "NOT_SUPPORT_CALL_SERVICE",
        58: "CONGESTION_CONTROL",
        59: "NO_BALANCE",
        60: "NOT_PERMITTED_CALLER_ID",
        61: "NO_CALLER_ID_LIMIT_EXCEEDED",
        62: "CALLER_ID_VERIFICATION_REQUIRED",
        63: "NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED",
        64: "MESSAGE_NOT_FOUND",
        65: "INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT",
        66: "ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED",
        67: "ACCOUNT_MIGRATION_PINCODE_BLOCKED",
        69: "INVALID_PASSWORD_FORMAT",
        70: "FEATURE_RESTRICTED",
        71: "MESSAGE_NOT_DESTRUCTIBLE",
        72: "PAID_CALL_REDEEM_FAILED",
        73: "PREVENTED_JOIN_BY_TICKET",
        75: "SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT",
        76: "SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY",
        77: "SECURITY_CENTER_NOT_VERIFIED",
        78: "SECURITY_CENTER_BLOCKED_BY_SETTING",
        79: "SECURITY_CENTER_BLOCKED",
        80: "TALK_PROXY_EXCEPTION",
        81: "E2EE_INVALID_PROTOCOL",
        82: "E2EE_RETRY_ENCRYPT",
        83: "E2EE_UPDATE_SENDER_KEY",
        84: "E2EE_UPDATE_RECEIVER_KEY",
        85: "E2EE_INVALID_ARGUMENT",
        86: "E2EE_INVALID_VERSION",
        87: "E2EE_SENDER_DISABLED",
        88: "E2EE_RECEIVER_DISABLED",
        89: "E2EE_SENDER_NOT_ALLOWED",
        90: "E2EE_RECEIVER_NOT_ALLOWED",
        91: "E2EE_RESEND_FAIL",
        92: "E2EE_RESEND_OK",
        93: "HITOKOTO_BACKUP_NO_AVAILABLE_DATA",
        94: "E2EE_UPDATE_PRIMARY_DEVICE",
        95: "SUCCESS",
        96: "CANCEL",
        97: "E2EE_PRIMARY_NOT_SUPPORT",
        98: "E2EE_RETRY_PLAIN",
        99: "E2EE_RECREATE_GROUP_KEY",
        100: "E2EE_GROUP_TOO_MANY_MEMBERS",
        101: "SERVER_BUSY",
        102: "NOT_ALLOWED_ADD_FOLLOW",
        103: "INCOMING_FRIEND_REQUEST_LIMIT",
        104: "OUTGOING_FRIEND_REQUEST_LIMIT",
        105: "OUTGOING_FRIEND_REQUEST_QUOTA",
        106: "DUPLICATED",
        107: "BANNED",
    }

    _NAMES_TO_VALUES = {
        "ILLEGAL_ARGUMENT": 0,
        "AUTHENTICATION_FAILED": 1,
        "DB_FAILED": 2,
        "INVALID_STATE": 3,
        "EXCESSIVE_ACCESS": 4,
        "NOT_FOUND": 5,
        "INVALID_MID": 9,
        "NOT_A_MEMBER": 10,
        "INVALID_LENGTH": 6,
        "NOT_AVAILABLE_USER": 7,
        "NOT_AUTHORIZED_DEVICE": 8,
        "NOT_AUTHORIZED_SESSION": 14,
        "INCOMPATIBLE_APP_VERSION": 11,
        "NOT_READY": 12,
        "NOT_AVAILABLE_SESSION": 13,
        "SYSTEM_ERROR": 15,
        "NO_AVAILABLE_VERIFICATION_METHOD": 16,
        "NOT_AUTHENTICATED": 17,
        "INVALID_IDENTITY_CREDENTIAL": 18,
        "NOT_AVAILABLE_IDENTITY_IDENTIFIER": 19,
        "INTERNAL_ERROR": 20,
        "NO_SUCH_IDENTITY_IDENFIER": 21,
        "DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY": 22,
        "ILLEGAL_IDENTITY_CREDENTIAL": 23,
        "UNKNOWN_CHANNEL": 24,
        "NO_SUCH_MESSAGE_BOX": 25,
        "NOT_AVAILABLE_MESSAGE_BOX": 26,
        "CHANNEL_DOES_NOT_MATCH": 27,
        "NOT_YOUR_MESSAGE": 28,
        "MESSAGE_DEFINED_ERROR": 29,
        "USER_CANNOT_ACCEPT_PRESENTS": 30,
        "USER_NOT_STICKER_OWNER": 32,
        "MAINTENANCE_ERROR": 33,
        "ACCOUNT_NOT_MATCHED": 34,
        "ABUSE_BLOCK": 35,
        "NOT_FRIEND": 36,
        "NOT_ALLOWED_CALL": 37,
        "BLOCK_FRIEND": 38,
        "INCOMPATIBLE_VOIP_VERSION": 39,
        "INVALID_SNS_ACCESS_TOKEN": 40,
        "EXTERNAL_SERVICE_NOT_AVAILABLE": 41,
        "NOT_ALLOWED_ADD_CONTACT": 42,
        "NOT_CERTIFICATED": 43,
        "NOT_ALLOWED_SECONDARY_DEVICE": 44,
        "INVALID_PIN_CODE": 45,
        "NOT_FOUND_IDENTITY_CREDENTIAL": 46,
        "EXCEED_FILE_MAX_SIZE": 47,
        "EXCEED_DAILY_QUOTA": 48,
        "NOT_SUPPORT_SEND_FILE": 49,
        "MUST_UPGRADE": 50,
        "NOT_AVAILABLE_PIN_CODE_SESSION": 51,
        "EXPIRED_REVISION": 52,
        "NOT_YET_PHONE_NUMBER": 54,
        "BAD_CALL_NUMBER": 55,
        "UNAVAILABLE_CALL_NUMBER": 56,
        "NOT_SUPPORT_CALL_SERVICE": 57,
        "CONGESTION_CONTROL": 58,
        "NO_BALANCE": 59,
        "NOT_PERMITTED_CALLER_ID": 60,
        "NO_CALLER_ID_LIMIT_EXCEEDED": 61,
        "CALLER_ID_VERIFICATION_REQUIRED": 62,
        "NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED": 63,
        "MESSAGE_NOT_FOUND": 64,
        "INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT": 65,
        "ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED": 66,
        "ACCOUNT_MIGRATION_PINCODE_BLOCKED": 67,
        "INVALID_PASSWORD_FORMAT": 69,
        "FEATURE_RESTRICTED": 70,
        "MESSAGE_NOT_DESTRUCTIBLE": 71,
        "PAID_CALL_REDEEM_FAILED": 72,
        "PREVENTED_JOIN_BY_TICKET": 73,
        "SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT": 75,
        "SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY": 76,
        "SECURITY_CENTER_NOT_VERIFIED": 77,
        "SECURITY_CENTER_BLOCKED_BY_SETTING": 78,
        "SECURITY_CENTER_BLOCKED": 79,
        "TALK_PROXY_EXCEPTION": 80,
        "E2EE_INVALID_PROTOCOL": 81,
        "E2EE_RETRY_ENCRYPT": 82,
        "E2EE_UPDATE_SENDER_KEY": 83,
        "E2EE_UPDATE_RECEIVER_KEY": 84,
        "E2EE_INVALID_ARGUMENT": 85,
        "E2EE_INVALID_VERSION": 86,
        "E2EE_SENDER_DISABLED": 87,
        "E2EE_RECEIVER_DISABLED": 88,
        "E2EE_SENDER_NOT_ALLOWED": 89,
        "E2EE_RECEIVER_NOT_ALLOWED": 90,
        "E2EE_RESEND_FAIL": 91,
        "E2EE_RESEND_OK": 92,
        "HITOKOTO_BACKUP_NO_AVAILABLE_DATA": 93,
        "E2EE_UPDATE_PRIMARY_DEVICE": 94,
        "SUCCESS": 95,
        "CANCEL": 96,
        "E2EE_PRIMARY_NOT_SUPPORT": 97,
        "E2EE_RETRY_PLAIN": 98,
        "E2EE_RECREATE_GROUP_KEY": 99,
        "E2EE_GROUP_TOO_MANY_MEMBERS": 100,
        "SERVER_BUSY": 101,
        "NOT_ALLOWED_ADD_FOLLOW": 102,
        "INCOMING_FRIEND_REQUEST_LIMIT": 103,
        "OUTGOING_FRIEND_REQUEST_LIMIT": 104,
        "OUTGOING_FRIEND_REQUEST_QUOTA": 105,
        "DUPLICATED": 106,
        "BANNED": 107,
    }


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


class ServiceCode(object):
    UNKNOWN = 0
    TALK = 1
    SQUARE = 2

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

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


class FriendRequestDirection(object):
    INCOMING = 1
    OUTGOING = 2

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

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


class FriendRequestMethod(object):
    TIMELINE = 1
    NEARBY = 2
    SQUARE = 3

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

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


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

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

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


class ModificationType(object):
    ADD = 0
    REMOVE = 1
    MODIFY = 2

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

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


class NotificationItemFetchMode(object):
    ALL = 0
    APPEND = 1

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

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


class NotificationQueueType(object):
    GLOBAL = 1
    MESSAGE = 2
    PRIMARY = 3

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

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


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

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

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


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

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

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


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

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

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


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

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

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


class OpStatus(object):
    NORMAL = 0
    ALERT_DISABLED = 1
    ALWAYS = 2

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

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


class OpType(object):
    END_OF_OPERATION = 0
    UPDATE_PROFILE = 1
    UPDATE_SETTINGS = 36
    NOTIFIED_UPDATE_PROFILE = 2
    REGISTER_USERID = 3
    ADD_CONTACT = 4
    NOTIFIED_ADD_CONTACT = 5
    BLOCK_CONTACT = 6
    UNBLOCK_CONTACT = 7
    NOTIFIED_RECOMMEND_CONTACT = 8
    CREATE_GROUP = 9
    UPDATE_GROUP = 10
    NOTIFIED_UPDATE_GROUP = 11
    INVITE_INTO_GROUP = 12
    NOTIFIED_INVITE_INTO_GROUP = 13
    CANCEL_INVITATION_GROUP = 31
    NOTIFIED_CANCEL_INVITATION_GROUP = 32
    LEAVE_GROUP = 14
    NOTIFIED_LEAVE_GROUP = 15
    ACCEPT_GROUP_INVITATION = 16
    NOTIFIED_ACCEPT_GROUP_INVITATION = 17
    REJECT_GROUP_INVITATION = 34
    NOTIFIED_REJECT_GROUP_INVITATION = 35
    KICKOUT_FROM_GROUP = 18
    NOTIFIED_KICKOUT_FROM_GROUP = 19
    CREATE_ROOM = 20
    INVITE_INTO_ROOM = 21
    NOTIFIED_INVITE_INTO_ROOM = 22
    LEAVE_ROOM = 23
    NOTIFIED_LEAVE_ROOM = 24
    SEND_MESSAGE = 25
    RECEIVE_MESSAGE = 26
    SEND_MESSAGE_RECEIPT = 27
    RECEIVE_MESSAGE_RECEIPT = 28
    SEND_CONTENT_RECEIPT = 29
    RECEIVE_ANNOUNCEMENT = 30
    NOTIFIED_UNREGISTER_USER = 33
    INVITE_VIA_EMAIL = 38
    NOTIFIED_REGISTER_USER = 37
    NOTIFIED_REQUEST_RECOVERY = 39
    SEND_CHAT_CHECKED = 40
    SEND_CHAT_REMOVED = 41
    NOTIFIED_FORCE_SYNC = 42
    SEND_CONTENT = 43
    SEND_MESSAGE_MYHOME = 44
    NOTIFIED_UPDATE_CONTENT_PREVIEW = 45
    REMOVE_ALL_MESSAGES = 46
    NOTIFIED_UPDATE_PURCHASES = 47
    DUMMY = 48
    UPDATE_CONTACT = 49
    NOTIFIED_RECEIVED_CALL = 50
    CANCEL_CALL = 51
    NOTIFIED_REDIRECT = 52
    NOTIFIED_CHANNEL_SYNC = 53
    FAILED_SEND_MESSAGE = 54
    NOTIFIED_READ_MESSAGE = 55
    FAILED_EMAIL_CONFIRMATION = 56
    NOTIFIED_CHAT_CONTENT = 58
    NOTIFIED_PUSH_NOTICENTER_ITEM = 59
    NOTIFIED_JOIN_CHAT = 60
    NOTIFIED_LEAVE_CHAT = 61
    NOTIFIED_TYPING = 62
    FRIEND_REQUEST_ACCEPTED = 63
    DESTROY_MESSAGE = 64
    NOTIFIED_DESTROY_MESSAGE = 65
    UPDATE_PUBLICKEYCHAIN = 66
    NOTIFIED_UPDATE_PUBLICKEYCHAIN = 67
    NOTIFIED_BLOCK_CONTACT = 68
    NOTIFIED_UNBLOCK_CONTACT = 69
    UPDATE_GROUPPREFERENCE = 70
    NOTIFIED_PAYMENT_EVENT = 71
    REGISTER_E2EE_PUBLICKEY = 72
    NOTIFIED_E2EE_KEY_EXCHANGE_REQ = 73
    NOTIFIED_E2EE_KEY_EXCHANGE_RESP = 74
    NOTIFIED_E2EE_MESSAGE_RESEND_REQ = 75
    NOTIFIED_E2EE_MESSAGE_RESEND_RESP = 76
    NOTIFIED_E2EE_KEY_UPDATE = 77
    NOTIFIED_BUDDY_UPDATE_PROFILE = 78
    NOTIFIED_UPDATE_LINEAT_TABS = 79
    UPDATE_ROOM = 80
    NOTIFIED_BEACON_DETECTED = 81
    UPDATE_EXTENDED_PROFILE = 82
    ADD_FOLLOW = 83
    NOTIFIED_ADD_FOLLOW = 84
    DELETE_FOLLOW = 85
    NOTIFIED_DELETE_FOLLOW = 86
    UPDATE_TIMELINE_SETTINGS = 87
    NOTIFIED_FRIEND_REQUEST = 88
    UPDATE_RINGBACK_TONE = 89
    NOTIFIED_POSTBACK = 90
    RECEIVE_READ_WATERMARK = 91
    NOTIFIED_MESSAGE_DELIVERED = 92
    NOTIFIED_UPDATE_CHAT_BAR = 93
    NOTIFIED_CHATAPP_INSTALLED = 94
    NOTIFIED_CHATAPP_UPDATED = 95
    NOTIFIED_CHATAPP_NEW_MARK = 96
    NOTIFIED_CHATAPP_DELETED = 97
    NOTIFIED_CHATAPP_SYNC = 98
    NOTIFIED_UPDATE_MESSAGE = 99
    UPDATE_CHATROOMBGM = 100
    NOTIFIED_UPDATE_CHATROOMBGM = 101

    _VALUES_TO_NAMES = {
        0: "END_OF_OPERATION",
        1: "UPDATE_PROFILE",
        36: "UPDATE_SETTINGS",
        2: "NOTIFIED_UPDATE_PROFILE",
        3: "REGISTER_USERID",
        4: "ADD_CONTACT",
        5: "NOTIFIED_ADD_CONTACT",
        6: "BLOCK_CONTACT",
        7: "UNBLOCK_CONTACT",
        8: "NOTIFIED_RECOMMEND_CONTACT",
        9: "CREATE_GROUP",
        10: "UPDATE_GROUP",
        11: "NOTIFIED_UPDATE_GROUP",
        12: "INVITE_INTO_GROUP",
        13: "NOTIFIED_INVITE_INTO_GROUP",
        31: "CANCEL_INVITATION_GROUP",
        32: "NOTIFIED_CANCEL_INVITATION_GROUP",
        14: "LEAVE_GROUP",
        15: "NOTIFIED_LEAVE_GROUP",
        16: "ACCEPT_GROUP_INVITATION",
        17: "NOTIFIED_ACCEPT_GROUP_INVITATION",
        34: "REJECT_GROUP_INVITATION",
        35: "NOTIFIED_REJECT_GROUP_INVITATION",
        18: "KICKOUT_FROM_GROUP",
        19: "NOTIFIED_KICKOUT_FROM_GROUP",
        20: "CREATE_ROOM",
        21: "INVITE_INTO_ROOM",
        22: "NOTIFIED_INVITE_INTO_ROOM",
        23: "LEAVE_ROOM",
        24: "NOTIFIED_LEAVE_ROOM",
        25: "SEND_MESSAGE",
        26: "RECEIVE_MESSAGE",
        27: "SEND_MESSAGE_RECEIPT",
        28: "RECEIVE_MESSAGE_RECEIPT",
        29: "SEND_CONTENT_RECEIPT",
        30: "RECEIVE_ANNOUNCEMENT",
        33: "NOTIFIED_UNREGISTER_USER",
        38: "INVITE_VIA_EMAIL",
        37: "NOTIFIED_REGISTER_USER",
        39: "NOTIFIED_REQUEST_RECOVERY",
        40: "SEND_CHAT_CHECKED",
        41: "SEND_CHAT_REMOVED",
        42: "NOTIFIED_FORCE_SYNC",
        43: "SEND_CONTENT",
        44: "SEND_MESSAGE_MYHOME",
        45: "NOTIFIED_UPDATE_CONTENT_PREVIEW",
        46: "REMOVE_ALL_MESSAGES",
        47: "NOTIFIED_UPDATE_PURCHASES",
        48: "DUMMY",
        49: "UPDATE_CONTACT",
        50: "NOTIFIED_RECEIVED_CALL",
        51: "CANCEL_CALL",
        52: "NOTIFIED_REDIRECT",
        53: "NOTIFIED_CHANNEL_SYNC",
        54: "FAILED_SEND_MESSAGE",
        55: "NOTIFIED_READ_MESSAGE",
        56: "FAILED_EMAIL_CONFIRMATION",
        58: "NOTIFIED_CHAT_CONTENT",
        59: "NOTIFIED_PUSH_NOTICENTER_ITEM",
        60: "NOTIFIED_JOIN_CHAT",
        61: "NOTIFIED_LEAVE_CHAT",
        62: "NOTIFIED_TYPING",
        63: "FRIEND_REQUEST_ACCEPTED",
        64: "DESTROY_MESSAGE",
        65: "NOTIFIED_DESTROY_MESSAGE",
        66: "UPDATE_PUBLICKEYCHAIN",
        67: "NOTIFIED_UPDATE_PUBLICKEYCHAIN",
        68: "NOTIFIED_BLOCK_CONTACT",
        69: "NOTIFIED_UNBLOCK_CONTACT",
        70: "UPDATE_GROUPPREFERENCE",
        71: "NOTIFIED_PAYMENT_EVENT",
        72: "REGISTER_E2EE_PUBLICKEY",
        73: "NOTIFIED_E2EE_KEY_EXCHANGE_REQ",
        74: "NOTIFIED_E2EE_KEY_EXCHANGE_RESP",
        75: "NOTIFIED_E2EE_MESSAGE_RESEND_REQ",
        76: "NOTIFIED_E2EE_MESSAGE_RESEND_RESP",
        77: "NOTIFIED_E2EE_KEY_UPDATE",
        78: "NOTIFIED_BUDDY_UPDATE_PROFILE",
        79: "NOTIFIED_UPDATE_LINEAT_TABS",
        80: "UPDATE_ROOM",
        81: "NOTIFIED_BEACON_DETECTED",
        82: "UPDATE_EXTENDED_PROFILE",
        83: "ADD_FOLLOW",
        84: "NOTIFIED_ADD_FOLLOW",
        85: "DELETE_FOLLOW",
        86: "NOTIFIED_DELETE_FOLLOW",
        87: "UPDATE_TIMELINE_SETTINGS",
        88: "NOTIFIED_FRIEND_REQUEST",
        89: "UPDATE_RINGBACK_TONE",
        90: "NOTIFIED_POSTBACK",
        91: "RECEIVE_READ_WATERMARK",
        92: "NOTIFIED_MESSAGE_DELIVERED",
        93: "NOTIFIED_UPDATE_CHAT_BAR",
        94: "NOTIFIED_CHATAPP_INSTALLED",
        95: "NOTIFIED_CHATAPP_UPDATED",
        96: "NOTIFIED_CHATAPP_NEW_MARK",
        97: "NOTIFIED_CHATAPP_DELETED",
        98: "NOTIFIED_CHATAPP_SYNC",
        99: "NOTIFIED_UPDATE_MESSAGE",
        100: "UPDATE_CHATROOMBGM",
        101: "NOTIFIED_UPDATE_CHATROOMBGM",
    }

    _NAMES_TO_VALUES = {
        "END_OF_OPERATION": 0,
        "UPDATE_PROFILE": 1,
        "UPDATE_SETTINGS": 36,
        "NOTIFIED_UPDATE_PROFILE": 2,
        "REGISTER_USERID": 3,
        "ADD_CONTACT": 4,
        "NOTIFIED_ADD_CONTACT": 5,
        "BLOCK_CONTACT": 6,
        "UNBLOCK_CONTACT": 7,
        "NOTIFIED_RECOMMEND_CONTACT": 8,
        "CREATE_GROUP": 9,
        "UPDATE_GROUP": 10,
        "NOTIFIED_UPDATE_GROUP": 11,
        "INVITE_INTO_GROUP": 12,
        "NOTIFIED_INVITE_INTO_GROUP": 13,
        "CANCEL_INVITATION_GROUP": 31,
        "NOTIFIED_CANCEL_INVITATION_GROUP": 32,
        "LEAVE_GROUP": 14,
        "NOTIFIED_LEAVE_GROUP": 15,
        "ACCEPT_GROUP_INVITATION": 16,
        "NOTIFIED_ACCEPT_GROUP_INVITATION": 17,
        "REJECT_GROUP_INVITATION": 34,
        "NOTIFIED_REJECT_GROUP_INVITATION": 35,
        "KICKOUT_FROM_GROUP": 18,
        "NOTIFIED_KICKOUT_FROM_GROUP": 19,
        "CREATE_ROOM": 20,
        "INVITE_INTO_ROOM": 21,
        "NOTIFIED_INVITE_INTO_ROOM": 22,
        "LEAVE_ROOM": 23,
        "NOTIFIED_LEAVE_ROOM": 24,
        "SEND_MESSAGE": 25,
        "RECEIVE_MESSAGE": 26,
        "SEND_MESSAGE_RECEIPT": 27,
        "RECEIVE_MESSAGE_RECEIPT": 28,
        "SEND_CONTENT_RECEIPT": 29,
        "RECEIVE_ANNOUNCEMENT": 30,
        "NOTIFIED_UNREGISTER_USER": 33,
        "INVITE_VIA_EMAIL": 38,
        "NOTIFIED_REGISTER_USER": 37,
        "NOTIFIED_REQUEST_RECOVERY": 39,
        "SEND_CHAT_CHECKED": 40,
        "SEND_CHAT_REMOVED": 41,
        "NOTIFIED_FORCE_SYNC": 42,
        "SEND_CONTENT": 43,
        "SEND_MESSAGE_MYHOME": 44,
        "NOTIFIED_UPDATE_CONTENT_PREVIEW": 45,
        "REMOVE_ALL_MESSAGES": 46,
        "NOTIFIED_UPDATE_PURCHASES": 47,
        "DUMMY": 48,
        "UPDATE_CONTACT": 49,
        "NOTIFIED_RECEIVED_CALL": 50,
        "CANCEL_CALL": 51,
        "NOTIFIED_REDIRECT": 52,
        "NOTIFIED_CHANNEL_SYNC": 53,
        "FAILED_SEND_MESSAGE": 54,
        "NOTIFIED_READ_MESSAGE": 55,
        "FAILED_EMAIL_CONFIRMATION": 56,
        "NOTIFIED_CHAT_CONTENT": 58,
        "NOTIFIED_PUSH_NOTICENTER_ITEM": 59,
        "NOTIFIED_JOIN_CHAT": 60,
        "NOTIFIED_LEAVE_CHAT": 61,
        "NOTIFIED_TYPING": 62,
        "FRIEND_REQUEST_ACCEPTED": 63,
        "DESTROY_MESSAGE": 64,
        "NOTIFIED_DESTROY_MESSAGE": 65,
        "UPDATE_PUBLICKEYCHAIN": 66,
        "NOTIFIED_UPDATE_PUBLICKEYCHAIN": 67,
        "NOTIFIED_BLOCK_CONTACT": 68,
        "NOTIFIED_UNBLOCK_CONTACT": 69,
        "UPDATE_GROUPPREFERENCE": 70,
        "NOTIFIED_PAYMENT_EVENT": 71,
        "REGISTER_E2EE_PUBLICKEY": 72,
        "NOTIFIED_E2EE_KEY_EXCHANGE_REQ": 73,
        "NOTIFIED_E2EE_KEY_EXCHANGE_RESP": 74,
        "NOTIFIED_E2EE_MESSAGE_RESEND_REQ": 75,
        "NOTIFIED_E2EE_MESSAGE_RESEND_RESP": 76,
        "NOTIFIED_E2EE_KEY_UPDATE": 77,
        "NOTIFIED_BUDDY_UPDATE_PROFILE": 78,
        "NOTIFIED_UPDATE_LINEAT_TABS": 79,
        "UPDATE_ROOM": 80,
        "NOTIFIED_BEACON_DETECTED": 81,
        "UPDATE_EXTENDED_PROFILE": 82,
        "ADD_FOLLOW": 83,
        "NOTIFIED_ADD_FOLLOW": 84,
        "DELETE_FOLLOW": 85,
        "NOTIFIED_DELETE_FOLLOW": 86,
        "UPDATE_TIMELINE_SETTINGS": 87,
        "NOTIFIED_FRIEND_REQUEST": 88,
        "UPDATE_RINGBACK_TONE": 89,
        "NOTIFIED_POSTBACK": 90,
        "RECEIVE_READ_WATERMARK": 91,
        "NOTIFIED_MESSAGE_DELIVERED": 92,
        "NOTIFIED_UPDATE_CHAT_BAR": 93,
        "NOTIFIED_CHATAPP_INSTALLED": 94,
        "NOTIFIED_CHATAPP_UPDATED": 95,
        "NOTIFIED_CHATAPP_NEW_MARK": 96,
        "NOTIFIED_CHATAPP_DELETED": 97,
        "NOTIFIED_CHATAPP_SYNC": 98,
        "NOTIFIED_UPDATE_MESSAGE": 99,
        "UPDATE_CHATROOMBGM": 100,
        "NOTIFIED_UPDATE_CHATROOMBGM": 101,
    }


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

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

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


class PaymentPgType(object):
    PAYMENT_PG_NONE = 0
    PAYMENT_PG_AU = 1
    PAYMENT_PG_AL = 2

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

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


class PaymentType(object):
    PAYMENT_APPLE = 1
    PAYMENT_GOOGLE = 2

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


class PublicType(object):
    HIDDEN = 0
    PUBLIC = 1000

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

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


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

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

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


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

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

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


class ChatRoomAnnouncementType(object):
    MESSAGE = 0
    NOTE = 1

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

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


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

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

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


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

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

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


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

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

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


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

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

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


class SyncActionType(object):
    SYNC = 0
    REPORT = 1

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

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


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

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

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


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

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

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


class TMessageBoxStatus(object):
    ACTIVATED = 1
    UNREAD = 2

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

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


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

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

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


class UnregistrationReason(object):
    UNREGISTRATION_REASON_UNREGISTER_USER = 1
    UNREGISTRATION_REASON_UNBIND_DEVICE = 2

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

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


class UserAgeType(object):
    OVER = 1
    UNDER = 2
    UNDEFINED = 3

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

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


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

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

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


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

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

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


class WapInvitationType(object):
    REGISTRATION = 1
    CHAT = 2

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

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


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

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

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


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

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

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


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

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

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


class SquareMemberRelationState(object):
    NONE = 1
    BLOCKED = 2

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

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


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

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

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


class BooleanState(object):
    NONE = 0
    OFF = 1
    ON = 2

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

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


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

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

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


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

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

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


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

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

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


class SquareChatState(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 SquareFeatureSetAttribute(object):
    CREATING_SECRET_SQUARE_CHAT = 1
    INVITING_INTO_OPEN_SQUARE_CHAT = 2

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

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


class SquareMembershipState(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 SquareChatMemberAttribute(object):
    MEMBERSHIP_STATE = 4
    NOTIFICATION_MESSAGE = 6

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

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


class SquareMemberRole(object):
    ADMIN = 1
    CO_ADMIN = 2
    MEMBER = 10

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

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


class PreconditionFailedExtraInfo(object):
    DUPLICATED_DISPLAY_NAME = 0

    _VALUES_TO_NAMES = {
        0: "DUPLICATED_DISPLAY_NAME",
    }

    _NAMES_TO_VALUES = {
        "DUPLICATED_DISPLAY_NAME": 0,
    }


class RelatedMessageServiceCode(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 SquareChatMembershipState(object):
    JOINED = 1
    LEFT = 2

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

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


class GeolocationProvider(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 FetchDirection(object):
    FORWARD = 1
    BACKWARD = 2

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

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


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

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

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


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

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

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


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 EntryCheckMethod(object):
    BUTTON = 0
    QR = 1

    _VALUES_TO_NAMES = {
        0: "BUTTON",
        1: "QR",
    }

    _NAMES_TO_VALUES = {
        "BUTTON": 0,
        "QR": 1,
    }


class TicketErrorCode(object):
    UNKNOWN_ERROR = 0
    CHANNEL_TOKEN_EXPIRED = 1
    CHANNEL_TOKEN_INVALID = 2
    TICKET_ALREADY_USED_ERROR = 3
    INTERNAL_SERVER_ERROR = 4
    OLDER_LINE_VERSION_ERROR = 5

    _VALUES_TO_NAMES = {
        0: "UNKNOWN_ERROR",
        1: "CHANNEL_TOKEN_EXPIRED",
        2: "CHANNEL_TOKEN_INVALID",
        3: "TICKET_ALREADY_USED_ERROR",
        4: "INTERNAL_SERVER_ERROR",
        5: "OLDER_LINE_VERSION_ERROR",
    }

    _NAMES_TO_VALUES = {
        "UNKNOWN_ERROR": 0,
        "CHANNEL_TOKEN_EXPIRED": 1,
        "CHANNEL_TOKEN_INVALID": 2,
        "TICKET_ALREADY_USED_ERROR": 3,
        "INTERNAL_SERVER_ERROR": 4,
        "OLDER_LINE_VERSION_ERROR": 5,
    }


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

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

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


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

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

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


class ProductType(object):
    STICKER = 1
    THEME = 2
    STICON = 3

    _VALUES_TO_NAMES = {
        1: "STICKER",
        2: "THEME",
        3: "STICON",
    }

    _NAMES_TO_VALUES = {
        "STICKER": 1,
        "THEME": 2,
        "STICON": 3,
    }


class PromotionMissionType(object):
    DEFAULT = 1
    VIEW_VIDEO = 2

    _VALUES_TO_NAMES = {
        1: "DEFAULT",
        2: "VIEW_VIDEO",
    }

    _NAMES_TO_VALUES = {
        "DEFAULT": 1,
        "VIEW_VIDEO": 2,
    }


class PromotionType(object):
    NONE = 0
    CARRIER = 1
    BUDDY = 2
    INSTALL = 3
    MISSION = 4
    MUSTBUY = 5

    _VALUES_TO_NAMES = {
        0: "NONE",
        1: "CARRIER",
        2: "BUDDY",
        3: "INSTALL",
        4: "MISSION",
        5: "MUSTBUY",
    }

    _NAMES_TO_VALUES = {
        "NONE": 0,
        "CARRIER": 1,
        "BUDDY": 2,
        "INSTALL": 3,
        "MISSION": 4,
        "MUSTBUY": 5,
    }


class ProductSalesState(object):
    ON_SALE = 0
    OUTDATED_VERSION = 1
    NOT_ON_SALE = 2

    _VALUES_TO_NAMES = {
        0: "ON_SALE",
        1: "OUTDATED_VERSION",
        2: "NOT_ON_SALE",
    }

    _NAMES_TO_VALUES = {
        "ON_SALE": 0,
        "OUTDATED_VERSION": 1,
        "NOT_ON_SALE": 2,
    }


class RecommendationType(object):
    UNKNOWN = 0
    PRODUCT = 1
    USER = 2

    _VALUES_TO_NAMES = {
        0: "UNKNOWN",
        1: "PRODUCT",
        2: "USER",
    }

    _NAMES_TO_VALUES = {
        "UNKNOWN": 0,
        "PRODUCT": 1,
        "USER": 2,
    }


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

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

    _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,
    }


class ShowcaseType(object):
    POPULAR = 0
    NEW_RELEASE = 1
    EVENT = 2
    RECOMMENDED = 3
    POPULAR_WEEKLY = 4
    POPULAR_MONTHLY = 5
    POPULAR_RECENTLY_PUBLISHED = 6
    BUDDY = 7
    EXTRA_EVENT = 8
    BROWSING_HISTORY = 9

    _VALUES_TO_NAMES = {
        0: "POPULAR",
        1: "NEW_RELEASE",
        2: "EVENT",
        3: "RECOMMENDED",
        4: "POPULAR_WEEKLY",
        5: "POPULAR_MONTHLY",
        6: "POPULAR_RECENTLY_PUBLISHED",
        7: "BUDDY",
        8: "EXTRA_EVENT",
        9: "BROWSING_HISTORY",
    }

    _NAMES_TO_VALUES = {
        "POPULAR": 0,
        "NEW_RELEASE": 1,
        "EVENT": 2,
        "RECOMMENDED": 3,
        "POPULAR_WEEKLY": 4,
        "POPULAR_MONTHLY": 5,
        "POPULAR_RECENTLY_PUBLISHED": 6,
        "BUDDY": 7,
        "EXTRA_EVENT": 8,
        "BROWSING_HISTORY": 9,
    }


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

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

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


class SubType(object):
    GENERAL = 0
    CREATORS = 1
    STICON = 2

    _VALUES_TO_NAMES = {
        0: "GENERAL",
        1: "CREATORS",
        2: "STICON",
    }

    _NAMES_TO_VALUES = {
        "GENERAL": 0,
        "CREATORS": 1,
        "STICON": 2,
    }


class ThemeResourceType(object):
    STATIC = 1
    ANIMATION = 2

    _VALUES_TO_NAMES = {
        1: "STATIC",
        2: "ANIMATION",
    }

    _NAMES_TO_VALUES = {
        "STATIC": 1,
        "ANIMATION": 2,
    }


class GetSquareBotRequest(object):
    """
    Attributes:
     - botMid

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.botMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareBotRequest')
        if self.botMid is not None:
            oprot.writeFieldBegin('botMid', TType.STRING, 1)
            oprot.writeString(
                self.botMid.encode('utf-8') if sys.version_info[0] == 2 else self.botMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

    """

    def __init__(
        self,
        title=None,
        address=None,
        latitude=None,
        longitude=None,
        phone=None,
        categoryId=None,
        provider=None,
        accuracy=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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.title = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.address = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.DOUBLE:
                    self.latitude = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.DOUBLE:
                    self.longitude = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.phone = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.categoryId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.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)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is 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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class RevokeTokenRequest(object):
    """
    Attributes:
     - accessToken

    """

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

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

    def validate(self):
        return

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

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

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


class SquareBot(object):
    """
    Attributes:
     - botMid
     - active
     - displayName
     - profileImageObsHash
     - iconType
     - lastModifiedAt
     - expiredIn

    """

    def __init__(
        self,
        botMid=None,
        active=None,
        displayName=None,
        profileImageObsHash=None,
        iconType=None,
        lastModifiedAt=None,
        expiredIn=None,
    ):
        self.botMid = botMid
        self.active = active
        self.displayName = displayName
        self.profileImageObsHash = profileImageObsHash
        self.iconType = iconType
        self.lastModifiedAt = lastModifiedAt
        self.expiredIn = expiredIn

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.botMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.active = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.profileImageObsHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.iconType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.lastModifiedAt = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.expiredIn = 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('SquareBot')
        if self.botMid is not None:
            oprot.writeFieldBegin('botMid', TType.STRING, 1)
            oprot.writeString(
                self.botMid.encode('utf-8') if sys.version_info[0] == 2 else self.botMid
            )
            oprot.writeFieldEnd()
        if self.active is not None:
            oprot.writeFieldBegin('active', TType.BOOL, 2)
            oprot.writeBool(self.active)
            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.iconType is not None:
            oprot.writeFieldBegin('iconType', TType.I32, 5)
            oprot.writeI32(self.iconType)
            oprot.writeFieldEnd()
        if self.lastModifiedAt is not None:
            oprot.writeFieldBegin('lastModifiedAt', TType.I64, 6)
            oprot.writeI64(self.lastModifiedAt)
            oprot.writeFieldEnd()
        if self.expiredIn is not None:
            oprot.writeFieldBegin('expiredIn', TType.I64, 7)
            oprot.writeI64(self.expiredIn)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

    """

    def __init__(
        self,
        messageId=None,
        ImagesContractUrl=None,
        chatMID=None,
        originMID=None,
    ):
        self.messageId = messageId
        self.ImagesContractUrl = ImagesContractUrl
        self.chatMID = chatMID
        self.originMID = originMID

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.messageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.ImagesContractUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.chatMID = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.originMID = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

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

    def validate(self):
        return

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

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

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


class MessageCommitResult(object):
    """
    Attributes:
     - requestId
     - state
     - messageStoreRequestId
     - messageIds
     - receiverCount
     - successCount
     - failCount
     - blockCount
     - unregisteredCount
     - unrelatedCount
     - errorDescription

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.requestId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.messageStoreRequestId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.messageIds = []
                    (_etype3, _size0) = iprot.readListBegin()
                    for _i4 in range(_size0):
                        _elem5 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.messageIds.append(_elem5)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.receiverCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I64:
                    self.successCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I64:
                    self.failCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.I64:
                    self.blockCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I64:
                    self.unregisteredCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.I64:
                    self.unrelatedCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRING:
                    self.errorDescription = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('MessageCommitResult')
        if self.requestId is not None:
            oprot.writeFieldBegin('requestId', TType.STRING, 1)
            oprot.writeString(
                self.requestId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.requestId
            )
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 2)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.messageStoreRequestId is not None:
            oprot.writeFieldBegin('messageStoreRequestId', TType.STRING, 3)
            oprot.writeString(
                self.messageStoreRequestId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.messageStoreRequestId
            )
            oprot.writeFieldEnd()
        if self.messageIds is not None:
            oprot.writeFieldBegin('messageIds', TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.messageIds))
            for iter6 in self.messageIds:
                oprot.writeString(
                    iter6.encode('utf-8') if sys.version_info[0] == 2 else iter6
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.receiverCount is not None:
            oprot.writeFieldBegin('receiverCount', TType.I64, 11)
            oprot.writeI64(self.receiverCount)
            oprot.writeFieldEnd()
        if self.successCount is not None:
            oprot.writeFieldBegin('successCount', TType.I64, 12)
            oprot.writeI64(self.successCount)
            oprot.writeFieldEnd()
        if self.failCount is not None:
            oprot.writeFieldBegin('failCount', TType.I64, 13)
            oprot.writeI64(self.failCount)
            oprot.writeFieldEnd()
        if self.blockCount is not None:
            oprot.writeFieldBegin('blockCount', TType.I64, 14)
            oprot.writeI64(self.blockCount)
            oprot.writeFieldEnd()
        if self.unregisteredCount is not None:
            oprot.writeFieldBegin('unregisteredCount', TType.I64, 15)
            oprot.writeI64(self.unregisteredCount)
            oprot.writeFieldEnd()
        if self.unrelatedCount is not None:
            oprot.writeFieldBegin('unrelatedCount', TType.I64, 16)
            oprot.writeI64(self.unrelatedCount)
            oprot.writeFieldEnd()
        if self.errorDescription is not None:
            oprot.writeFieldBegin('errorDescription', TType.STRING, 21)
            oprot.writeString(
                self.errorDescription.encode('utf-8')
                if sys.version_info[0] == 2
                else self.errorDescription
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CallHost(object):
    """
    Attributes:
     - host
     - port
     - zone

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CallHost')
        if self.host is not None:
            oprot.writeFieldBegin('host', TType.STRING, 1)
            oprot.writeString(
                self.host.encode('utf-8') if sys.version_info[0] == 2 else self.host
            )
            oprot.writeFieldEnd()
        if self.port is not None:
            oprot.writeFieldBegin('port', TType.I32, 2)
            oprot.writeI32(self.port)
            oprot.writeFieldEnd()
        if self.zone is not None:
            oprot.writeFieldBegin('zone', TType.STRING, 3)
            oprot.writeString(
                self.zone.encode('utf-8') if sys.version_info[0] == 2 else self.zone
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class AgeCheckDocomoResult(object):
    """
    Attributes:
     - authUrl
     - userAgeType

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('AgeCheckDocomoResult')
        if self.authUrl is not None:
            oprot.writeFieldBegin('authUrl', TType.STRING, 1)
            oprot.writeString(
                self.authUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authUrl
            )
            oprot.writeFieldEnd()
        if self.userAgeType is not None:
            oprot.writeFieldBegin('userAgeType', TType.I32, 2)
            oprot.writeI32(self.userAgeType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class AgeCheckRequestResult(object):
    """
    Attributes:
     - authUrl
     - sessionId

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.authUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.sessionId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('AgeCheckRequestResult')
        if self.authUrl is not None:
            oprot.writeFieldBegin('authUrl', TType.STRING, 1)
            oprot.writeString(
                self.authUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authUrl
            )
            oprot.writeFieldEnd()
        if self.sessionId is not None:
            oprot.writeFieldBegin('sessionId', TType.STRING, 2)
            oprot.writeString(
                self.sessionId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.sessionId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class TextMessageAnnouncementContents(object):
    """
    Attributes:
     - messageId
     - text
     - senderSquareMemberMid
     - createdAt

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.messageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.text = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.senderSquareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.createdAt = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('TextMessageAnnouncementContents')
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.STRING, 1)
            oprot.writeString(
                self.messageId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.messageId
            )
            oprot.writeFieldEnd()
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 2)
            oprot.writeString(
                self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text
            )
            oprot.writeFieldEnd()
        if self.senderSquareMemberMid is not None:
            oprot.writeFieldBegin('senderSquareMemberMid', TType.STRING, 3)
            oprot.writeString(
                self.senderSquareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.senderSquareMemberMid
            )
            oprot.writeFieldEnd()
        if self.createdAt is not None:
            oprot.writeFieldBegin('createdAt', TType.I64, 4)
            oprot.writeI64(self.createdAt)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SquareChatAnnouncement(object):
    """
    Attributes:
     - announcementSeq
     - type
     - contents

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.announcementSeq = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.contents = SquareChatAnnouncementContents()
                    self.contents.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareChatAnnouncement')
        if self.announcementSeq is not None:
            oprot.writeFieldBegin('announcementSeq', TType.I64, 1)
            oprot.writeI64(self.announcementSeq)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 2)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.contents is not None:
            oprot.writeFieldBegin('contents', TType.STRUCT, 3)
            self.contents.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class 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')
                        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')
                        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 DestroyMessagesRequest(object):
    """
    Attributes:
     - squareChatMid
     - messageIds

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.SET:
                    self.messageIds = set()
                    (_etype10, _size7) = iprot.readSetBegin()
                    for _i11 in range(_size7):
                        _elem12 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.messageIds.add(_elem12)
                    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('DestroyMessagesRequest')
        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.messageIds is not None:
            oprot.writeFieldBegin('messageIds', TType.SET, 4)
            oprot.writeSetBegin(TType.STRING, len(self.messageIds))
            for iter13 in self.messageIds:
                oprot.writeString(
                    iter13.encode('utf-8') if sys.version_info[0] == 2 else iter13
                )
            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 FindSquareByEmidRequest(object):
    """
    Attributes:
     - emid

    """

    def __init__(
        self,
        emid=None,
    ):
        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.emid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FindSquareByEmidRequest')
        if self.emid is not None:
            oprot.writeFieldBegin('emid', TType.STRING, 1)
            oprot.writeString(
                self.emid.encode('utf-8') if sys.version_info[0] == 2 else self.emid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class FindSquareByEmidResponse(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('FindSquareByEmidResponse')
        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 DestroyMessagesResponse(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('DestroyMessagesResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.index = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.BOOL:
                    self.forceUpdate = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.title = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.text = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRING:
                    self.pictureUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.STRING:
                    self.thumbnailUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Announcement')
        if self.index is not None:
            oprot.writeFieldBegin('index', TType.I32, 1)
            oprot.writeI32(self.index)
            oprot.writeFieldEnd()
        if self.forceUpdate is not None:
            oprot.writeFieldBegin('forceUpdate', TType.BOOL, 10)
            oprot.writeBool(self.forceUpdate)
            oprot.writeFieldEnd()
        if self.title is not None:
            oprot.writeFieldBegin('title', TType.STRING, 11)
            oprot.writeString(
                self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title
            )
            oprot.writeFieldEnd()
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 12)
            oprot.writeString(
                self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text
            )
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 13)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.pictureUrl is not None:
            oprot.writeFieldBegin('pictureUrl', TType.STRING, 14)
            oprot.writeString(
                self.pictureUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.pictureUrl
            )
            oprot.writeFieldEnd()
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 15)
            oprot.writeString(
                self.thumbnailUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.thumbnailUrl
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ChannelProvider(object):
    """
    Attributes:
     - name

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelProvider')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class E2EEPublicKey(object):
    """
    Attributes:
     - version
     - keyId
     - keyData
     - createdTime

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.version = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.keyId = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.keyData = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('E2EEPublicKey')
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.I32, 1)
            oprot.writeI32(self.version)
            oprot.writeFieldEnd()
        if self.keyId is not None:
            oprot.writeFieldBegin('keyId', TType.I32, 2)
            oprot.writeI32(self.keyId)
            oprot.writeFieldEnd()
        if self.keyData is not None:
            oprot.writeFieldBegin('keyData', TType.STRING, 4)
            oprot.writeBinary(self.keyData)
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 5)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ChannelDomain(object):
    """
    Attributes:
     - host
     - removed

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.host = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.removed = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelDomain')
        if self.host is not None:
            oprot.writeFieldBegin('host', TType.STRING, 1)
            oprot.writeString(
                self.host.encode('utf-8') if sys.version_info[0] == 2 else self.host
            )
            oprot.writeFieldEnd()
        if self.removed is not None:
            oprot.writeFieldBegin('removed', TType.BOOL, 2)
            oprot.writeBool(self.removed)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class E2EENegotiationResult(object):
    """
    Attributes:
     - allowedTypes
     - publicKey

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.SET:
                    self.allowedTypes = set()
                    (_etype17, _size14) = iprot.readSetBegin()
                    for _i18 in range(_size14):
                        _elem19 = iprot.readI32()
                        self.allowedTypes.add(_elem19)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.publicKey = E2EEPublicKey()
                    self.publicKey.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('E2EENegotiationResult')
        if self.allowedTypes is not None:
            oprot.writeFieldBegin('allowedTypes', TType.SET, 1)
            oprot.writeSetBegin(TType.I32, len(self.allowedTypes))
            for iter20 in self.allowedTypes:
                oprot.writeI32(iter20)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.publicKey is not None:
            oprot.writeFieldBegin('publicKey', TType.STRUCT, 2)
            self.publicKey.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class OTPResult(object):
    """
    Attributes:
     - otpId
     - otp

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.otpId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.otp = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('OTPResult')
        if self.otpId is not None:
            oprot.writeFieldBegin('otpId', TType.STRING, 1)
            oprot.writeString(
                self.otpId.encode('utf-8') if sys.version_info[0] == 2 else self.otpId
            )
            oprot.writeFieldEnd()
        if self.otp is not None:
            oprot.writeFieldBegin('otp', TType.STRING, 2)
            oprot.writeString(
                self.otp.encode('utf-8') if sys.version_info[0] == 2 else self.otp
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class Square(object):
    """
    Attributes:
     - mid
     - name
     - welcomeMessage
     - profileImageObsHash
     - desc
     - searchable
     - type
     - categoryID
     - invitationURL
     - revision
     - ableToUseInvitationTicket
     - state

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.welcomeMessage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.profileImageObsHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.desc = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.searchable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.categoryID = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.invitationURL = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.BOOL:
                    self.ableToUseInvitationTicket = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Square')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.welcomeMessage is not None:
            oprot.writeFieldBegin('welcomeMessage', TType.STRING, 3)
            oprot.writeString(
                self.welcomeMessage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.welcomeMessage
            )
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 4)
            oprot.writeString(
                self.profileImageObsHash.encode('utf-8')
                if sys.version_info[0] == 2
                else self.profileImageObsHash
            )
            oprot.writeFieldEnd()
        if self.desc is not None:
            oprot.writeFieldBegin('desc', TType.STRING, 5)
            oprot.writeString(
                self.desc.encode('utf-8') if sys.version_info[0] == 2 else self.desc
            )
            oprot.writeFieldEnd()
        if self.searchable is not None:
            oprot.writeFieldBegin('searchable', TType.BOOL, 6)
            oprot.writeBool(self.searchable)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 7)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.categoryID is not None:
            oprot.writeFieldBegin('categoryID', TType.I32, 8)
            oprot.writeI32(self.categoryID)
            oprot.writeFieldEnd()
        if self.invitationURL is not None:
            oprot.writeFieldBegin('invitationURL', TType.STRING, 9)
            oprot.writeString(
                self.invitationURL.encode('utf-8')
                if sys.version_info[0] == 2
                else self.invitationURL
            )
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 10)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.ableToUseInvitationTicket is not None:
            oprot.writeFieldBegin('ableToUseInvitationTicket', TType.BOOL, 11)
            oprot.writeBool(self.ableToUseInvitationTicket)
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 12)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SquareAuthority(object):
    """
    Attributes:
     - squareMid
     - updateSquareProfile
     - inviteNewMember
     - approveJoinRequest
     - createPost
     - createOpenSquareChat
     - deleteSquareChatOrPost
     - removeSquareMember
     - grantRole
     - enableInvitationTicket
     - revision
     - createSquareChatAnnouncement
     - updateMaxChatMemberCount

    """

    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,
    ):
        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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.updateSquareProfile = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.inviteNewMember = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.approveJoinRequest = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.createPost = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.createOpenSquareChat = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.deleteSquareChatOrPost = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.removeSquareMember = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I32:
                    self.grantRole = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I32:
                    self.enableInvitationTicket = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            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)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is 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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.profileImageObsHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.ableToReceiveMessage = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.membershipState = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.role = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRUCT:
                    self.preference = SquarePreference()
                    self.preference.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.joinMessage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareMember')
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMemberMid
            )
            oprot.writeFieldEnd()
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 3)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 4)
            oprot.writeString(
                self.profileImageObsHash.encode('utf-8')
                if sys.version_info[0] == 2
                else self.profileImageObsHash
            )
            oprot.writeFieldEnd()
        if self.ableToReceiveMessage is not None:
            oprot.writeFieldBegin('ableToReceiveMessage', TType.BOOL, 5)
            oprot.writeBool(self.ableToReceiveMessage)
            oprot.writeFieldEnd()
        if self.membershipState is not None:
            oprot.writeFieldBegin('membershipState', TType.I32, 7)
            oprot.writeI32(self.membershipState)
            oprot.writeFieldEnd()
        if self.role is not None:
            oprot.writeFieldBegin('role', TType.I32, 8)
            oprot.writeI32(self.role)
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 9)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.preference is not None:
            oprot.writeFieldBegin('preference', TType.STRUCT, 10)
            self.preference.write(oprot)
            oprot.writeFieldEnd()
        if self.joinMessage is not None:
            oprot.writeFieldBegin('joinMessage', TType.STRING, 11)
            oprot.writeString(
                self.joinMessage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.joinMessage
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SquareMemberRelation(object):
    """
    Attributes:
     - state
     - revision

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareMemberRelation')
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 1)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 2)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SquareFeature(object):
    """
    Attributes:
     - controlState
     - booleanValue

    """

    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

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRUCT:
                    self.creatingSecretSquareChat = SquareFeature()
                    self.creatingSecretSquareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRUCT:
                    self.invitingIntoOpenSquareChat = SquareFeature()
                    self.invitingIntoOpenSquareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareFeatureSet')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 2)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.creatingSecretSquareChat is not None:
            oprot.writeFieldBegin('creatingSecretSquareChat', TType.STRUCT, 11)
            self.creatingSecretSquareChat.write(oprot)
            oprot.writeFieldEnd()
        if self.invitingIntoOpenSquareChat is not None:
            oprot.writeFieldBegin('invitingIntoOpenSquareChat', TType.STRUCT, 12)
            self.invitingIntoOpenSquareChat.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SquareStatus(object):
    """
    Attributes:
     - memberCount
     - joinRequestCount
     - lastJoinRequestAt
     - openChatCount

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.memberCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.joinRequestCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.lastJoinRequestAt = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.openChatCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareStatus')
        if self.memberCount is not None:
            oprot.writeFieldBegin('memberCount', TType.I32, 1)
            oprot.writeI32(self.memberCount)
            oprot.writeFieldEnd()
        if self.joinRequestCount is not None:
            oprot.writeFieldBegin('joinRequestCount', TType.I32, 2)
            oprot.writeI32(self.joinRequestCount)
            oprot.writeFieldEnd()
        if self.lastJoinRequestAt is not None:
            oprot.writeFieldBegin('lastJoinRequestAt', TType.I64, 3)
            oprot.writeI64(self.lastJoinRequestAt)
            oprot.writeFieldEnd()
        if self.openChatCount is not None:
            oprot.writeFieldBegin('openChatCount', TType.I32, 4)
            oprot.writeI32(self.openChatCount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SquareChat(object):
    """
    Attributes:
     - squareChatMid
     - squareMid
     - type
     - name
     - chatImageObsHash
     - squareChatRevision
     - maxMemberCount
     - state

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.chatImageObsHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.squareChatRevision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.maxMemberCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareChat')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 3)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 4)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.chatImageObsHash is not None:
            oprot.writeFieldBegin('chatImageObsHash', TType.STRING, 5)
            oprot.writeString(
                self.chatImageObsHash.encode('utf-8')
                if sys.version_info[0] == 2
                else self.chatImageObsHash
            )
            oprot.writeFieldEnd()
        if self.squareChatRevision is not None:
            oprot.writeFieldBegin('squareChatRevision', TType.I64, 6)
            oprot.writeI64(self.squareChatRevision)
            oprot.writeFieldEnd()
        if self.maxMemberCount is not None:
            oprot.writeFieldBegin('maxMemberCount', TType.I32, 7)
            oprot.writeI32(self.maxMemberCount)
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 8)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class NoteStatus(object):
    """
    Attributes:
     - noteCount
     - latestCreatedAt

    """

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

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareStatus = SquareStatus()
                    self.squareStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareNoteStatus = NoteStatus()
                    self.squareNoteStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareInfo')
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 1)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        if self.squareStatus is not None:
            oprot.writeFieldBegin('squareStatus', TType.STRUCT, 2)
            self.squareStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.squareNoteStatus is not None:
            oprot.writeFieldBegin('squareNoteStatus', TType.STRUCT, 3)
            self.squareNoteStatus.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class BotUseInfo(object):
    """
    Attributes:
     - botUseAgreementAccepted
     - botInFriends
     - primaryApplication
     - locale

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.botUseAgreementAccepted = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.botInFriends = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.primaryApplication = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.locale = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('BotUseInfo')
        if self.botUseAgreementAccepted is not None:
            oprot.writeFieldBegin('botUseAgreementAccepted', TType.BOOL, 1)
            oprot.writeBool(self.botUseAgreementAccepted)
            oprot.writeFieldEnd()
        if self.botInFriends is not None:
            oprot.writeFieldBegin('botInFriends', TType.BOOL, 2)
            oprot.writeBool(self.botInFriends)
            oprot.writeFieldEnd()
        if self.primaryApplication is not None:
            oprot.writeFieldBegin('primaryApplication', TType.STRING, 3)
            oprot.writeString(
                self.primaryApplication.encode('utf-8')
                if sys.version_info[0] == 2
                else self.primaryApplication
            )
            oprot.writeFieldEnd()
        if self.locale is not None:
            oprot.writeFieldBegin('locale', TType.STRING, 4)
            oprot.writeString(
                self.locale.encode('utf-8') if sys.version_info[0] == 2 else self.locale
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallAdCountry(object):
    """
    Attributes:
     - countryCode
     - rateDivision

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.countryCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.rateDivision = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallAdCountry')
        if self.countryCode is not None:
            oprot.writeFieldBegin('countryCode', TType.STRING, 1)
            oprot.writeString(
                self.countryCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.countryCode
            )
            oprot.writeFieldEnd()
        if self.rateDivision is not None:
            oprot.writeFieldBegin('rateDivision', TType.STRING, 2)
            oprot.writeString(
                self.rateDivision.encode('utf-8')
                if sys.version_info[0] == 2
                else self.rateDivision
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallAdResult(object):
    """
    Attributes:
     - adRemains

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallAdResult')
        if self.adRemains is not None:
            oprot.writeFieldBegin('adRemains', TType.I32, 1)
            oprot.writeI32(self.adRemains)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallBalance(object):
    """
    Attributes:
     - productType
     - productName
     - unit
     - limitedPaidBalance
     - limitedFreeBalance
     - unlimitedPaidBalance
     - unlimitedFreeBalance
     - startTime
     - endTime
     - autopayEnabled

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.productName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.unit = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.limitedPaidBalance = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.limitedFreeBalance = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.unlimitedPaidBalance = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.unlimitedFreeBalance = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I64:
                    self.startTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I64:
                    self.endTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.BOOL:
                    self.autopayEnabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallBalance')
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 1)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        if self.productName is not None:
            oprot.writeFieldBegin('productName', TType.STRING, 2)
            oprot.writeString(
                self.productName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productName
            )
            oprot.writeFieldEnd()
        if self.unit is not None:
            oprot.writeFieldBegin('unit', TType.STRING, 3)
            oprot.writeString(
                self.unit.encode('utf-8') if sys.version_info[0] == 2 else self.unit
            )
            oprot.writeFieldEnd()
        if self.limitedPaidBalance is not None:
            oprot.writeFieldBegin('limitedPaidBalance', TType.I32, 4)
            oprot.writeI32(self.limitedPaidBalance)
            oprot.writeFieldEnd()
        if self.limitedFreeBalance is not None:
            oprot.writeFieldBegin('limitedFreeBalance', TType.I32, 5)
            oprot.writeI32(self.limitedFreeBalance)
            oprot.writeFieldEnd()
        if self.unlimitedPaidBalance is not None:
            oprot.writeFieldBegin('unlimitedPaidBalance', TType.I32, 6)
            oprot.writeI32(self.unlimitedPaidBalance)
            oprot.writeFieldEnd()
        if self.unlimitedFreeBalance is not None:
            oprot.writeFieldBegin('unlimitedFreeBalance', TType.I32, 7)
            oprot.writeI32(self.unlimitedFreeBalance)
            oprot.writeFieldEnd()
        if self.startTime is not None:
            oprot.writeFieldBegin('startTime', TType.I64, 8)
            oprot.writeI64(self.startTime)
            oprot.writeFieldEnd()
        if self.endTime is not None:
            oprot.writeFieldBegin('endTime', TType.I64, 9)
            oprot.writeI64(self.endTime)
            oprot.writeFieldEnd()
        if self.autopayEnabled is not None:
            oprot.writeFieldBegin('autopayEnabled', TType.BOOL, 10)
            oprot.writeBool(self.autopayEnabled)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallCurrencyExchangeRate(object):
    """
    Attributes:
     - currencyCode
     - currencyName
     - currencySign
     - preferred
     - coinRate
     - creditRate

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.currencyCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.currencyName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.currencySign = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.preferred = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.coinRate = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.creditRate = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallCurrencyExchangeRate')
        if self.currencyCode is not None:
            oprot.writeFieldBegin('currencyCode', TType.STRING, 1)
            oprot.writeString(
                self.currencyCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currencyCode
            )
            oprot.writeFieldEnd()
        if self.currencyName is not None:
            oprot.writeFieldBegin('currencyName', TType.STRING, 2)
            oprot.writeString(
                self.currencyName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currencyName
            )
            oprot.writeFieldEnd()
        if self.currencySign is not None:
            oprot.writeFieldBegin('currencySign', TType.STRING, 3)
            oprot.writeString(
                self.currencySign.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currencySign
            )
            oprot.writeFieldEnd()
        if self.preferred is not None:
            oprot.writeFieldBegin('preferred', TType.BOOL, 4)
            oprot.writeBool(self.preferred)
            oprot.writeFieldEnd()
        if self.coinRate is not None:
            oprot.writeFieldBegin('coinRate', TType.STRING, 5)
            oprot.writeString(
                self.coinRate.encode('utf-8')
                if sys.version_info[0] == 2
                else self.coinRate
            )
            oprot.writeFieldEnd()
        if self.creditRate is not None:
            oprot.writeFieldBegin('creditRate', TType.STRING, 6)
            oprot.writeString(
                self.creditRate.encode('utf-8')
                if sys.version_info[0] == 2
                else self.creditRate
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ExtendedProfileBirthday(object):
    """
    Attributes:
     - year
     - yearPrivacyLevelType
     - yearEnabled
     - day
     - dayPrivacyLevelType
     - dayEnabled

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.year = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.yearPrivacyLevelType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.yearEnabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.day = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.dayPrivacyLevelType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.dayEnabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ExtendedProfileBirthday')
        if self.year is not None:
            oprot.writeFieldBegin('year', TType.STRING, 1)
            oprot.writeString(
                self.year.encode('utf-8') if sys.version_info[0] == 2 else self.year
            )
            oprot.writeFieldEnd()
        if self.yearPrivacyLevelType is not None:
            oprot.writeFieldBegin('yearPrivacyLevelType', TType.I32, 2)
            oprot.writeI32(self.yearPrivacyLevelType)
            oprot.writeFieldEnd()
        if self.yearEnabled is not None:
            oprot.writeFieldBegin('yearEnabled', TType.BOOL, 3)
            oprot.writeBool(self.yearEnabled)
            oprot.writeFieldEnd()
        if self.day is not None:
            oprot.writeFieldBegin('day', TType.STRING, 5)
            oprot.writeString(
                self.day.encode('utf-8') if sys.version_info[0] == 2 else self.day
            )
            oprot.writeFieldEnd()
        if self.dayPrivacyLevelType is not None:
            oprot.writeFieldBegin('dayPrivacyLevelType', TType.I32, 6)
            oprot.writeI32(self.dayPrivacyLevelType)
            oprot.writeFieldEnd()
        if self.dayEnabled is not None:
            oprot.writeFieldBegin('dayEnabled', TType.BOOL, 7)
            oprot.writeBool(self.dayEnabled)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ExtendedProfile(object):
    """
    Attributes:
     - birthday

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.birthday = ExtendedProfileBirthday()
                    self.birthday.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ExtendedProfile')
        if self.birthday is not None:
            oprot.writeFieldBegin('birthday', TType.STRUCT, 1)
            self.birthday.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallDialing(object):
    """
    Attributes:
     - type
     - dialedNumber
     - serviceDomain
     - productType
     - productName
     - multipleProduct
     - callerIdStatus
     - balance
     - unit
     - rate
     - displayCode
     - calledNumber
     - calleeNationalNumber
     - calleeCallingCode
     - rateDivision
     - adMaxMin
     - adRemains
     - adSessionId

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.dialedNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.serviceDomain = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.productName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.multipleProduct = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.callerIdStatus = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I32:
                    self.balance = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.unit = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I32:
                    self.rate = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRING:
                    self.displayCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRING:
                    self.calledNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.STRING:
                    self.calleeNationalNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.STRING:
                    self.calleeCallingCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRING:
                    self.rateDivision = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.I32:
                    self.adMaxMin = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.I32:
                    self.adRemains = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.adSessionId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallDialing')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.dialedNumber is not None:
            oprot.writeFieldBegin('dialedNumber', TType.STRING, 2)
            oprot.writeString(
                self.dialedNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.dialedNumber
            )
            oprot.writeFieldEnd()
        if self.serviceDomain is not None:
            oprot.writeFieldBegin('serviceDomain', TType.STRING, 3)
            oprot.writeString(
                self.serviceDomain.encode('utf-8')
                if sys.version_info[0] == 2
                else self.serviceDomain
            )
            oprot.writeFieldEnd()
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 4)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        if self.productName is not None:
            oprot.writeFieldBegin('productName', TType.STRING, 5)
            oprot.writeString(
                self.productName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productName
            )
            oprot.writeFieldEnd()
        if self.multipleProduct is not None:
            oprot.writeFieldBegin('multipleProduct', TType.BOOL, 6)
            oprot.writeBool(self.multipleProduct)
            oprot.writeFieldEnd()
        if self.callerIdStatus is not None:
            oprot.writeFieldBegin('callerIdStatus', TType.I32, 7)
            oprot.writeI32(self.callerIdStatus)
            oprot.writeFieldEnd()
        if self.balance is not None:
            oprot.writeFieldBegin('balance', TType.I32, 10)
            oprot.writeI32(self.balance)
            oprot.writeFieldEnd()
        if self.unit is not None:
            oprot.writeFieldBegin('unit', TType.STRING, 11)
            oprot.writeString(
                self.unit.encode('utf-8') if sys.version_info[0] == 2 else self.unit
            )
            oprot.writeFieldEnd()
        if self.rate is not None:
            oprot.writeFieldBegin('rate', TType.I32, 12)
            oprot.writeI32(self.rate)
            oprot.writeFieldEnd()
        if self.displayCode is not None:
            oprot.writeFieldBegin('displayCode', TType.STRING, 13)
            oprot.writeString(
                self.displayCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayCode
            )
            oprot.writeFieldEnd()
        if self.calledNumber is not None:
            oprot.writeFieldBegin('calledNumber', TType.STRING, 14)
            oprot.writeString(
                self.calledNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.calledNumber
            )
            oprot.writeFieldEnd()
        if self.calleeNationalNumber is not None:
            oprot.writeFieldBegin('calleeNationalNumber', TType.STRING, 15)
            oprot.writeString(
                self.calleeNationalNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.calleeNationalNumber
            )
            oprot.writeFieldEnd()
        if self.calleeCallingCode is not None:
            oprot.writeFieldBegin('calleeCallingCode', TType.STRING, 16)
            oprot.writeString(
                self.calleeCallingCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.calleeCallingCode
            )
            oprot.writeFieldEnd()
        if self.rateDivision is not None:
            oprot.writeFieldBegin('rateDivision', TType.STRING, 17)
            oprot.writeString(
                self.rateDivision.encode('utf-8')
                if sys.version_info[0] == 2
                else self.rateDivision
            )
            oprot.writeFieldEnd()
        if self.adMaxMin is not None:
            oprot.writeFieldBegin('adMaxMin', TType.I32, 20)
            oprot.writeI32(self.adMaxMin)
            oprot.writeFieldEnd()
        if self.adRemains is not None:
            oprot.writeFieldBegin('adRemains', TType.I32, 21)
            oprot.writeI32(self.adRemains)
            oprot.writeFieldEnd()
        if self.adSessionId is not None:
            oprot.writeFieldBegin('adSessionId', TType.STRING, 22)
            oprot.writeString(
                self.adSessionId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.adSessionId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SpotItem(object):
    """
    Attributes:
     - name
     - phone
     - category
     - mid
     - countryAreaCode
     - freePhoneCallable

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.phone = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.category = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.countryAreaCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.BOOL:
                    self.freePhoneCallable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SpotItem')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.phone is not None:
            oprot.writeFieldBegin('phone', TType.STRING, 3)
            oprot.writeString(
                self.phone.encode('utf-8') if sys.version_info[0] == 2 else self.phone
            )
            oprot.writeFieldEnd()
        if self.category is not None:
            oprot.writeFieldBegin('category', TType.I32, 4)
            oprot.writeI32(self.category)
            oprot.writeFieldEnd()
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 5)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.countryAreaCode is not None:
            oprot.writeFieldBegin('countryAreaCode', TType.STRING, 6)
            oprot.writeString(
                self.countryAreaCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.countryAreaCode
            )
            oprot.writeFieldEnd()
        if self.freePhoneCallable is not None:
            oprot.writeFieldBegin('freePhoneCallable', TType.BOOL, 10)
            oprot.writeBool(self.freePhoneCallable)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SpotNearbyItem(object):
    """
    Attributes:
     - spotItem
     - location

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRUCT:
                    self.spotItem = SpotItem()
                    self.spotItem.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRUCT:
                    self.location = Location()
                    self.location.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SpotNearbyItem')
        if self.spotItem is not None:
            oprot.writeFieldBegin('spotItem', TType.STRUCT, 2)
            self.spotItem.write(oprot)
            oprot.writeFieldEnd()
        if self.location is not None:
            oprot.writeFieldBegin('location', TType.STRUCT, 11)
            self.location.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SpotNearbyResponse(object):
    """
    Attributes:
     - spotNearbyItems

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.spotNearbyItems = []
                    (_etype24, _size21) = iprot.readListBegin()
                    for _i25 in range(_size21):
                        _elem26 = SpotNearbyItem()
                        _elem26.read(iprot)
                        self.spotNearbyItems.append(_elem26)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SpotNearbyResponse')
        if self.spotNearbyItems is not None:
            oprot.writeFieldBegin('spotNearbyItems', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.spotNearbyItems))
            for iter27 in self.spotNearbyItems:
                iter27.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SpotPhoneNumberResponse(object):
    """
    Attributes:
     - spotItems

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.spotItems = []
                    (_etype31, _size28) = iprot.readListBegin()
                    for _i32 in range(_size28):
                        _elem33 = SpotItem()
                        _elem33.read(iprot)
                        self.spotItems.append(_elem33)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SpotPhoneNumberResponse')
        if self.spotItems is not None:
            oprot.writeFieldBegin('spotItems', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.spotItems))
            for iter34 in self.spotItems:
                iter34.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallHistory(object):
    """
    Attributes:
     - seq
     - type
     - dialedNumber
     - calledNumber
     - toMid
     - toName
     - setupTime
     - startTime
     - endTime
     - duration
     - terminate
     - productType
     - charge
     - unit
     - result

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.seq = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.dialedNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.calledNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.toMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.toName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.setupTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I64:
                    self.startTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I64:
                    self.endTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I64:
                    self.duration = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I32:
                    self.terminate = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I32:
                    self.charge = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRING:
                    self.unit = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.STRING:
                    self.result = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallHistory')
        if self.seq is not None:
            oprot.writeFieldBegin('seq', TType.I64, 1)
            oprot.writeI64(self.seq)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 2)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.dialedNumber is not None:
            oprot.writeFieldBegin('dialedNumber', TType.STRING, 3)
            oprot.writeString(
                self.dialedNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.dialedNumber
            )
            oprot.writeFieldEnd()
        if self.calledNumber is not None:
            oprot.writeFieldBegin('calledNumber', TType.STRING, 4)
            oprot.writeString(
                self.calledNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.calledNumber
            )
            oprot.writeFieldEnd()
        if self.toMid is not None:
            oprot.writeFieldBegin('toMid', TType.STRING, 5)
            oprot.writeString(
                self.toMid.encode('utf-8') if sys.version_info[0] == 2 else self.toMid
            )
            oprot.writeFieldEnd()
        if self.toName is not None:
            oprot.writeFieldBegin('toName', TType.STRING, 6)
            oprot.writeString(
                self.toName.encode('utf-8') if sys.version_info[0] == 2 else self.toName
            )
            oprot.writeFieldEnd()
        if self.setupTime is not None:
            oprot.writeFieldBegin('setupTime', TType.I64, 7)
            oprot.writeI64(self.setupTime)
            oprot.writeFieldEnd()
        if self.startTime is not None:
            oprot.writeFieldBegin('startTime', TType.I64, 8)
            oprot.writeI64(self.startTime)
            oprot.writeFieldEnd()
        if self.endTime is not None:
            oprot.writeFieldBegin('endTime', TType.I64, 9)
            oprot.writeI64(self.endTime)
            oprot.writeFieldEnd()
        if self.duration is not None:
            oprot.writeFieldBegin('duration', TType.I64, 10)
            oprot.writeI64(self.duration)
            oprot.writeFieldEnd()
        if self.terminate is not None:
            oprot.writeFieldBegin('terminate', TType.I32, 11)
            oprot.writeI32(self.terminate)
            oprot.writeFieldEnd()
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 12)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        if self.charge is not None:
            oprot.writeFieldBegin('charge', TType.I32, 13)
            oprot.writeI32(self.charge)
            oprot.writeFieldEnd()
        if self.unit is not None:
            oprot.writeFieldBegin('unit', TType.STRING, 14)
            oprot.writeString(
                self.unit.encode('utf-8') if sys.version_info[0] == 2 else self.unit
            )
            oprot.writeFieldEnd()
        if self.result is not None:
            oprot.writeFieldBegin('result', TType.STRING, 15)
            oprot.writeString(
                self.result.encode('utf-8') if sys.version_info[0] == 2 else self.result
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallHistoryResult(object):
    """
    Attributes:
     - historys
     - hasNext

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.historys = []
                    (_etype38, _size35) = iprot.readListBegin()
                    for _i39 in range(_size35):
                        _elem40 = PaidCallHistory()
                        _elem40.read(iprot)
                        self.historys.append(_elem40)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.hasNext = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallHistoryResult')
        if self.historys is not None:
            oprot.writeFieldBegin('historys', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.historys))
            for iter41 in self.historys:
                iter41.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.hasNext is not None:
            oprot.writeFieldBegin('hasNext', TType.BOOL, 2)
            oprot.writeBool(self.hasNext)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallMetadataResult(object):
    """
    Attributes:
     - currencyExchangeRates
     - recommendedCountryCodes
     - adCountries

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.currencyExchangeRates = []
                    (_etype45, _size42) = iprot.readListBegin()
                    for _i46 in range(_size42):
                        _elem47 = PaidCallCurrencyExchangeRate()
                        _elem47.read(iprot)
                        self.currencyExchangeRates.append(_elem47)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.recommendedCountryCodes = []
                    (_etype51, _size48) = iprot.readListBegin()
                    for _i52 in range(_size48):
                        _elem53 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.recommendedCountryCodes.append(_elem53)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.adCountries = []
                    (_etype57, _size54) = iprot.readListBegin()
                    for _i58 in range(_size54):
                        _elem59 = PaidCallAdCountry()
                        _elem59.read(iprot)
                        self.adCountries.append(_elem59)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallMetadataResult')
        if self.currencyExchangeRates is not None:
            oprot.writeFieldBegin('currencyExchangeRates', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.currencyExchangeRates))
            for iter60 in self.currencyExchangeRates:
                iter60.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.recommendedCountryCodes is not None:
            oprot.writeFieldBegin('recommendedCountryCodes', TType.LIST, 2)
            oprot.writeListBegin(TType.STRING, len(self.recommendedCountryCodes))
            for iter61 in self.recommendedCountryCodes:
                oprot.writeString(
                    iter61.encode('utf-8') if sys.version_info[0] == 2 else iter61
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.adCountries is not None:
            oprot.writeFieldBegin('adCountries', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.adCountries))
            for iter62 in self.adCountries:
                iter62.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallRedeemResult(object):
    """
    Attributes:
     - eventName
     - eventAmount

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallRedeemResult')
        if self.eventName is not None:
            oprot.writeFieldBegin('eventName', TType.STRING, 1)
            oprot.writeString(
                self.eventName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.eventName
            )
            oprot.writeFieldEnd()
        if self.eventAmount is not None:
            oprot.writeFieldBegin('eventAmount', TType.I32, 2)
            oprot.writeI32(self.eventAmount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallResponse(object):
    """
    Attributes:
     - host
     - dialing
     - token
     - spotItems

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.host = CallHost()
                    self.host.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.dialing = PaidCallDialing()
                    self.dialing.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.token = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.spotItems = []
                    (_etype66, _size63) = iprot.readListBegin()
                    for _i67 in range(_size63):
                        _elem68 = SpotItem()
                        _elem68.read(iprot)
                        self.spotItems.append(_elem68)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallResponse')
        if self.host is not None:
            oprot.writeFieldBegin('host', TType.STRUCT, 1)
            self.host.write(oprot)
            oprot.writeFieldEnd()
        if self.dialing is not None:
            oprot.writeFieldBegin('dialing', TType.STRUCT, 2)
            self.dialing.write(oprot)
            oprot.writeFieldEnd()
        if self.token is not None:
            oprot.writeFieldBegin('token', TType.STRING, 3)
            oprot.writeString(
                self.token.encode('utf-8') if sys.version_info[0] == 2 else self.token
            )
            oprot.writeFieldEnd()
        if self.spotItems is not None:
            oprot.writeFieldBegin('spotItems', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.spotItems))
            for iter69 in self.spotItems:
                iter69.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaidCallUserRate(object):
    """
    Attributes:
     - countryCode
     - rate
     - rateDivision
     - rateName

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.countryCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.rate = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.rateDivision = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.rateName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaidCallUserRate')
        if self.countryCode is not None:
            oprot.writeFieldBegin('countryCode', TType.STRING, 1)
            oprot.writeString(
                self.countryCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.countryCode
            )
            oprot.writeFieldEnd()
        if self.rate is not None:
            oprot.writeFieldBegin('rate', TType.I32, 2)
            oprot.writeI32(self.rate)
            oprot.writeFieldEnd()
        if self.rateDivision is not None:
            oprot.writeFieldBegin('rateDivision', TType.STRING, 3)
            oprot.writeString(
                self.rateDivision.encode('utf-8')
                if sys.version_info[0] == 2
                else self.rateDivision
            )
            oprot.writeFieldEnd()
        if self.rateName is not None:
            oprot.writeFieldBegin('rateName', TType.STRING, 4)
            oprot.writeString(
                self.rateName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.rateName
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ChannelInfo(object):
    """
    Attributes:
     - channelId
     - name
     - entryPageUrl
     - descriptionText
     - provider
     - publicType
     - iconImage
     - permissions
     - iconThumbnailImage
     - channelConfigurations
     - lcsAllApiUsable
     - allowedPermissions
     - channelDomains
     - updatedTimestamp

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.channelId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.entryPageUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.descriptionText = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.provider = ChannelProvider()
                    self.provider.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.publicType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.iconImage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.LIST:
                    self.permissions = []
                    (_etype73, _size70) = iprot.readListBegin()
                    for _i74 in range(_size70):
                        _elem75 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.permissions.append(_elem75)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.iconThumbnailImage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.LIST:
                    self.channelConfigurations = []
                    (_etype79, _size76) = iprot.readListBegin()
                    for _i80 in range(_size76):
                        _elem81 = iprot.readI32()
                        self.channelConfigurations.append(_elem81)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.BOOL:
                    self.lcsAllApiUsable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.SET:
                    self.allowedPermissions = set()
                    (_etype85, _size82) = iprot.readSetBegin()
                    for _i86 in range(_size82):
                        _elem87 = iprot.readI32()
                        self.allowedPermissions.add(_elem87)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.LIST:
                    self.channelDomains = []
                    (_etype91, _size88) = iprot.readListBegin()
                    for _i92 in range(_size88):
                        _elem93 = ChannelDomain()
                        _elem93.read(iprot)
                        self.channelDomains.append(_elem93)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.I64:
                    self.updatedTimestamp = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelInfo')
        if self.channelId is not None:
            oprot.writeFieldBegin('channelId', TType.STRING, 1)
            oprot.writeString(
                self.channelId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.channelId
            )
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 3)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.entryPageUrl is not None:
            oprot.writeFieldBegin('entryPageUrl', TType.STRING, 4)
            oprot.writeString(
                self.entryPageUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.entryPageUrl
            )
            oprot.writeFieldEnd()
        if self.descriptionText is not None:
            oprot.writeFieldBegin('descriptionText', TType.STRING, 5)
            oprot.writeString(
                self.descriptionText.encode('utf-8')
                if sys.version_info[0] == 2
                else self.descriptionText
            )
            oprot.writeFieldEnd()
        if self.provider is not None:
            oprot.writeFieldBegin('provider', TType.STRUCT, 6)
            self.provider.write(oprot)
            oprot.writeFieldEnd()
        if self.publicType is not None:
            oprot.writeFieldBegin('publicType', TType.I32, 7)
            oprot.writeI32(self.publicType)
            oprot.writeFieldEnd()
        if self.iconImage is not None:
            oprot.writeFieldBegin('iconImage', TType.STRING, 8)
            oprot.writeString(
                self.iconImage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.iconImage
            )
            oprot.writeFieldEnd()
        if self.permissions is not None:
            oprot.writeFieldBegin('permissions', TType.LIST, 9)
            oprot.writeListBegin(TType.STRING, len(self.permissions))
            for iter94 in self.permissions:
                oprot.writeString(
                    iter94.encode('utf-8') if sys.version_info[0] == 2 else iter94
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.iconThumbnailImage is not None:
            oprot.writeFieldBegin('iconThumbnailImage', TType.STRING, 11)
            oprot.writeString(
                self.iconThumbnailImage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.iconThumbnailImage
            )
            oprot.writeFieldEnd()
        if self.channelConfigurations is not None:
            oprot.writeFieldBegin('channelConfigurations', TType.LIST, 12)
            oprot.writeListBegin(TType.I32, len(self.channelConfigurations))
            for iter95 in self.channelConfigurations:
                oprot.writeI32(iter95)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.lcsAllApiUsable is not None:
            oprot.writeFieldBegin('lcsAllApiUsable', TType.BOOL, 13)
            oprot.writeBool(self.lcsAllApiUsable)
            oprot.writeFieldEnd()
        if self.allowedPermissions is not None:
            oprot.writeFieldBegin('allowedPermissions', TType.SET, 14)
            oprot.writeSetBegin(TType.I32, len(self.allowedPermissions))
            for iter96 in self.allowedPermissions:
                oprot.writeI32(iter96)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.channelDomains is not None:
            oprot.writeFieldBegin('channelDomains', TType.LIST, 15)
            oprot.writeListBegin(TType.STRUCT, len(self.channelDomains))
            for iter97 in self.channelDomains:
                iter97.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.updatedTimestamp is not None:
            oprot.writeFieldBegin('updatedTimestamp', TType.I64, 16)
            oprot.writeI64(self.updatedTimestamp)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ApprovedChannelInfo(object):
    """
    Attributes:
     - channelInfo
     - approvedAt

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.channelInfo = ChannelInfo()
                    self.channelInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.approvedAt = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ApprovedChannelInfo')
        if self.channelInfo is not None:
            oprot.writeFieldBegin('channelInfo', TType.STRUCT, 1)
            self.channelInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.approvedAt is not None:
            oprot.writeFieldBegin('approvedAt', TType.I64, 2)
            oprot.writeI64(self.approvedAt)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ApprovedChannelInfos(object):
    """
    Attributes:
     - approvedChannelInfos
     - revision

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.approvedChannelInfos = []
                    (_etype101, _size98) = iprot.readListBegin()
                    for _i102 in range(_size98):
                        _elem103 = ApprovedChannelInfo()
                        _elem103.read(iprot)
                        self.approvedChannelInfos.append(_elem103)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ApprovedChannelInfos')
        if self.approvedChannelInfos is not None:
            oprot.writeFieldBegin('approvedChannelInfos', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.approvedChannelInfos))
            for iter104 in self.approvedChannelInfos:
                iter104.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 2)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class AuthQrcode(object):
    """
    Attributes:
     - qrcode
     - verifier
     - callbackUrl

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.qrcode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.verifier = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.callbackUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('AuthQrcode')
        if self.qrcode is not None:
            oprot.writeFieldBegin('qrcode', TType.STRING, 1)
            oprot.writeString(
                self.qrcode.encode('utf-8') if sys.version_info[0] == 2 else self.qrcode
            )
            oprot.writeFieldEnd()
        if self.verifier is not None:
            oprot.writeFieldBegin('verifier', TType.STRING, 2)
            oprot.writeString(
                self.verifier.encode('utf-8')
                if sys.version_info[0] == 2
                else self.verifier
            )
            oprot.writeFieldEnd()
        if self.callbackUrl is not None:
            oprot.writeFieldBegin('callbackUrl', TType.STRING, 3)
            oprot.writeString(
                self.callbackUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.callbackUrl
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class E2EEKey(object):
    """
    Attributes:
     - version
     - keyId
     - publicKey
     - privateKey
     - createdTime

    """

    def __init__(
        self,
        version=None,
        keyId=None,
        publicKey=None,
        privateKey=None,
        createdTime=None,
    ):
        self.version = version
        self.keyId = keyId
        self.publicKey = publicKey
        self.privateKey = privateKey
        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.publicKey = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.privateKey = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                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('E2EEKey')
        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.publicKey is not None:
            oprot.writeFieldBegin('publicKey', TType.STRING, 4)
            oprot.writeBinary(self.publicKey)
            oprot.writeFieldEnd()
        if self.privateKey is not None:
            oprot.writeFieldBegin('privateKey', TType.STRING, 5)
            oprot.writeBinary(self.privateKey)
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 6)
            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 E2EEKeyChain(object):
    """
    Attributes:
     - keychain

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.keychain = []
                    (_etype108, _size105) = iprot.readListBegin()
                    for _i109 in range(_size105):
                        _elem110 = E2EEKey()
                        _elem110.read(iprot)
                        self.keychain.append(_elem110)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('E2EEKeyChain')
        if self.keychain is not None:
            oprot.writeFieldBegin('keychain', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.keychain))
            for iter111 in self.keychain:
                iter111.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class AnalyticsInfo(object):
    """
    Attributes:
     - gaSamplingRate
     - tmid

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.DOUBLE:
                    self.gaSamplingRate = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tmid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('AnalyticsInfo')
        if self.gaSamplingRate is not None:
            oprot.writeFieldBegin('gaSamplingRate', TType.DOUBLE, 1)
            oprot.writeDouble(self.gaSamplingRate)
            oprot.writeFieldEnd()
        if self.tmid is not None:
            oprot.writeFieldBegin('tmid', TType.STRING, 2)
            oprot.writeString(
                self.tmid.encode('utf-8') if sys.version_info[0] == 2 else self.tmid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ContactTransition(object):
    """
    Attributes:
     - ownerMid
     - targetMid
     - previousStatus
     - resultStatus

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.ownerMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.targetMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.previousStatus = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.resultStatus = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ContactTransition')
        if self.ownerMid is not None:
            oprot.writeFieldBegin('ownerMid', TType.STRING, 1)
            oprot.writeString(
                self.ownerMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.ownerMid
            )
            oprot.writeFieldEnd()
        if self.targetMid is not None:
            oprot.writeFieldBegin('targetMid', TType.STRING, 2)
            oprot.writeString(
                self.targetMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.targetMid
            )
            oprot.writeFieldEnd()
        if self.previousStatus is not None:
            oprot.writeFieldBegin('previousStatus', TType.I32, 3)
            oprot.writeI32(self.previousStatus)
            oprot.writeFieldEnd()
        if self.resultStatus is not None:
            oprot.writeFieldBegin('resultStatus', TType.I32, 4)
            oprot.writeI32(self.resultStatus)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class UserTicketResponse(object):
    """
    Attributes:
     - mid
     - userTicket

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.userTicket = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UserTicketResponse')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.userTicket is not None:
            oprot.writeFieldBegin('userTicket', TType.STRING, 2)
            oprot.writeString(
                self.userTicket.encode('utf-8')
                if sys.version_info[0] == 2
                else self.userTicket
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class BuddyBanner(object):
    """
    Attributes:
     - buddyBannerLinkType
     - buddyBannerLink
     - buddyBannerImageUrl

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('BuddyBanner')
        if self.buddyBannerLinkType is not None:
            oprot.writeFieldBegin('buddyBannerLinkType', TType.I32, 1)
            oprot.writeI32(self.buddyBannerLinkType)
            oprot.writeFieldEnd()
        if self.buddyBannerLink is not None:
            oprot.writeFieldBegin('buddyBannerLink', TType.STRING, 2)
            oprot.writeString(
                self.buddyBannerLink.encode('utf-8')
                if sys.version_info[0] == 2
                else self.buddyBannerLink
            )
            oprot.writeFieldEnd()
        if self.buddyBannerImageUrl is not None:
            oprot.writeFieldBegin('buddyBannerImageUrl', TType.STRING, 3)
            oprot.writeString(
                self.buddyBannerImageUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.buddyBannerImageUrl
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class BuddyDetail(object):
    """
    Attributes:
     - mid
     - memberCount
     - onAir
     - businessAccount
     - addable
     - acceptableContentTypes
     - capableMyhome

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.memberCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.onAir = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.businessAccount = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.addable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.SET:
                    self.acceptableContentTypes = set()
                    (_etype108, _size105) = iprot.readSetBegin()
                    for _i109 in range(_size105):
                        _elem110 = iprot.readI32()
                        self.acceptableContentTypes.add(_elem110)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.capableMyhome = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('BuddyDetail')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.memberCount is not None:
            oprot.writeFieldBegin('memberCount', TType.I64, 2)
            oprot.writeI64(self.memberCount)
            oprot.writeFieldEnd()
        if self.onAir is not None:
            oprot.writeFieldBegin('onAir', TType.BOOL, 3)
            oprot.writeBool(self.onAir)
            oprot.writeFieldEnd()
        if self.businessAccount is not None:
            oprot.writeFieldBegin('businessAccount', TType.BOOL, 4)
            oprot.writeBool(self.businessAccount)
            oprot.writeFieldEnd()
        if self.addable is not None:
            oprot.writeFieldBegin('addable', TType.BOOL, 5)
            oprot.writeBool(self.addable)
            oprot.writeFieldEnd()
        if self.acceptableContentTypes is not None:
            oprot.writeFieldBegin('acceptableContentTypes', TType.SET, 6)
            oprot.writeSetBegin(TType.I32, len(self.acceptableContentTypes))
            for iter111 in self.acceptableContentTypes:
                oprot.writeI32(iter111)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.capableMyhome is not None:
            oprot.writeFieldBegin('capableMyhome', TType.BOOL, 7)
            oprot.writeBool(self.capableMyhome)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """

    def __init__(
        self,
        mid=None,
        createdTime=None,
        type=None,
        status=None,
        relation=None,
        displayName=None,
        phoneticName=None,
        pictureStatus=None,
        thumbnailUrl=None,
        statusMessage=None,
        displayNameOverridden=None,
        favoriteTime=None,
        capableVoiceCall=None,
        capableVideoCall=None,
        capableMyhome=None,
        capableBuddy=None,
        attributes=None,
        settings=None,
        picturePath=None,
        recommendParams=None,
        friendRequestStatus=None,
        musicProfile=None,
        videoProfile=None,
    ):
        self.mid = mid
        self.createdTime = createdTime
        self.type = type
        self.status = status
        self.relation = relation
        self.displayName = displayName
        self.phoneticName = phoneticName
        self.pictureStatus = pictureStatus
        self.thumbnailUrl = thumbnailUrl
        self.statusMessage = statusMessage
        self.displayNameOverridden = displayNameOverridden
        self.favoriteTime = favoriteTime
        self.capableVoiceCall = capableVoiceCall
        self.capableVideoCall = capableVideoCall
        self.capableMyhome = capableMyhome
        self.capableBuddy = capableBuddy
        self.attributes = attributes
        self.settings = settings
        self.picturePath = picturePath
        self.recommendParams = recommendParams
        self.friendRequestStatus = friendRequestStatus
        self.musicProfile = musicProfile
        self.videoProfile = videoProfile

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I32:
                    self.status = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.I32:
                    self.relation = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.STRING:
                    self.phoneticName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.STRING:
                    self.pictureStatus = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 25:
                if ftype == TType.STRING:
                    self.thumbnailUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 26:
                if ftype == TType.STRING:
                    self.statusMessage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 27:
                if ftype == TType.STRING:
                    self.displayNameOverridden = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 28:
                if ftype == TType.I64:
                    self.favoriteTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 31:
                if ftype == TType.BOOL:
                    self.capableVoiceCall = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 32:
                if ftype == TType.BOOL:
                    self.capableVideoCall = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 33:
                if ftype == TType.BOOL:
                    self.capableMyhome = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 34:
                if ftype == TType.BOOL:
                    self.capableBuddy = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 35:
                if ftype == TType.I32:
                    self.attributes = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 36:
                if ftype == TType.I64:
                    self.settings = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 37:
                if ftype == TType.STRING:
                    self.picturePath = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 38:
                if ftype == TType.STRING:
                    self.recommendParams = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 39:
                if ftype == TType.I32:
                    self.friendRequestStatus = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 40:
                if ftype == TType.STRING:
                    self.musicProfile = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 42:
                if ftype == TType.STRING:
                    self.videoProfile = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Contact')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 2)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 10)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 11)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.relation is not None:
            oprot.writeFieldBegin('relation', TType.I32, 21)
            oprot.writeI32(self.relation)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 22)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        if self.phoneticName is not None:
            oprot.writeFieldBegin('phoneticName', TType.STRING, 23)
            oprot.writeString(
                self.phoneticName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.phoneticName
            )
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 24)
            oprot.writeString(
                self.pictureStatus.encode('utf-8')
                if sys.version_info[0] == 2
                else self.pictureStatus
            )
            oprot.writeFieldEnd()
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 25)
            oprot.writeString(
                self.thumbnailUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.thumbnailUrl
            )
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 26)
            oprot.writeString(
                self.statusMessage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.statusMessage
            )
            oprot.writeFieldEnd()
        if self.displayNameOverridden is not None:
            oprot.writeFieldBegin('displayNameOverridden', TType.STRING, 27)
            oprot.writeString(
                self.displayNameOverridden.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayNameOverridden
            )
            oprot.writeFieldEnd()
        if self.favoriteTime is not None:
            oprot.writeFieldBegin('favoriteTime', TType.I64, 28)
            oprot.writeI64(self.favoriteTime)
            oprot.writeFieldEnd()
        if self.capableVoiceCall is not None:
            oprot.writeFieldBegin('capableVoiceCall', TType.BOOL, 31)
            oprot.writeBool(self.capableVoiceCall)
            oprot.writeFieldEnd()
        if self.capableVideoCall is not None:
            oprot.writeFieldBegin('capableVideoCall', TType.BOOL, 32)
            oprot.writeBool(self.capableVideoCall)
            oprot.writeFieldEnd()
        if self.capableMyhome is not None:
            oprot.writeFieldBegin('capableMyhome', TType.BOOL, 33)
            oprot.writeBool(self.capableMyhome)
            oprot.writeFieldEnd()
        if self.capableBuddy is not None:
            oprot.writeFieldBegin('capableBuddy', TType.BOOL, 34)
            oprot.writeBool(self.capableBuddy)
            oprot.writeFieldEnd()
        if self.attributes is not None:
            oprot.writeFieldBegin('attributes', TType.I32, 35)
            oprot.writeI32(self.attributes)
            oprot.writeFieldEnd()
        if self.settings is not None:
            oprot.writeFieldBegin('settings', TType.I64, 36)
            oprot.writeI64(self.settings)
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 37)
            oprot.writeString(
                self.picturePath.encode('utf-8')
                if sys.version_info[0] == 2
                else self.picturePath
            )
            oprot.writeFieldEnd()
        if self.recommendParams is not None:
            oprot.writeFieldBegin('recommendParams', TType.STRING, 38)
            oprot.writeString(
                self.recommendParams.encode('utf-8')
                if sys.version_info[0] == 2
                else self.recommendParams
            )
            oprot.writeFieldEnd()
        if self.friendRequestStatus is not None:
            oprot.writeFieldBegin('friendRequestStatus', TType.I32, 39)
            oprot.writeI32(self.friendRequestStatus)
            oprot.writeFieldEnd()
        if self.musicProfile is not None:
            oprot.writeFieldBegin('musicProfile', TType.STRING, 40)
            oprot.writeString(
                self.musicProfile.encode('utf-8')
                if sys.version_info[0] == 2
                else self.musicProfile
            )
            oprot.writeFieldEnd()
        if self.videoProfile is not None:
            oprot.writeFieldBegin('videoProfile', TType.STRING, 42)
            oprot.writeString(
                self.videoProfile.encode('utf-8')
                if sys.version_info[0] == 2
                else self.videoProfile
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class BuddyList(object):
    """
    Attributes:
     - classification
     - displayName
     - totalBuddyCount
     - popularContacts

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.classification = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.totalBuddyCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.popularContacts = []
                    (_etype115, _size112) = iprot.readListBegin()
                    for _i116 in range(_size112):
                        _elem117 = Contact()
                        _elem117.read(iprot)
                        self.popularContacts.append(_elem117)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('BuddyList')
        if self.classification is not None:
            oprot.writeFieldBegin('classification', TType.STRING, 1)
            oprot.writeString(
                self.classification.encode('utf-8')
                if sys.version_info[0] == 2
                else self.classification
            )
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 2)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        if self.totalBuddyCount is not None:
            oprot.writeFieldBegin('totalBuddyCount', TType.I32, 3)
            oprot.writeI32(self.totalBuddyCount)
            oprot.writeFieldEnd()
        if self.popularContacts is not None:
            oprot.writeFieldBegin('popularContacts', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.popularContacts))
            for iter118 in self.popularContacts:
                iter118.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class RegisterWithPhoneNumberResult(object):
    """
    Attributes:
     - authToken
     - recommendEmailRegistration
     - certificate

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.authToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.recommendEmailRegistration = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.certificate = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('RegisterWithPhoneNumberResult')
        if self.authToken is not None:
            oprot.writeFieldBegin('authToken', TType.STRING, 1)
            oprot.writeString(
                self.authToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authToken
            )
            oprot.writeFieldEnd()
        if self.recommendEmailRegistration is not None:
            oprot.writeFieldBegin('recommendEmailRegistration', TType.BOOL, 2)
            oprot.writeBool(self.recommendEmailRegistration)
            oprot.writeFieldEnd()
        if self.certificate is not None:
            oprot.writeFieldBegin('certificate', TType.STRING, 3)
            oprot.writeString(
                self.certificate.encode('utf-8')
                if sys.version_info[0] == 2
                else self.certificate
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class BuddyMessageRequest(object):
    """
    Attributes:
     - contentType
     - text
     - location
     - content
     - contentMetadata

    """

    def __init__(
        self,
        contentType=None,
        text=None,
        location=None,
        content=None,
        contentMetadata=None,
    ):
        self.contentType = contentType
        self.text = text
        self.location = location
        self.content = content
        self.contentMetadata = contentMetadata

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.contentType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.text = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.location = Location()
                    self.location.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.content = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.MAP:
                    self.contentMetadata = {}
                    (_ktype120, _vtype121, _size119) = iprot.readMapBegin()
                    for _i123 in range(_size119):
                        _key124 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val125 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.contentMetadata[_key124] = _val125
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('BuddyMessageRequest')
        if self.contentType is not None:
            oprot.writeFieldBegin('contentType', TType.I32, 1)
            oprot.writeI32(self.contentType)
            oprot.writeFieldEnd()
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 2)
            oprot.writeString(
                self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text
            )
            oprot.writeFieldEnd()
        if self.location is not None:
            oprot.writeFieldBegin('location', TType.STRUCT, 3)
            self.location.write(oprot)
            oprot.writeFieldEnd()
        if self.content is not None:
            oprot.writeFieldBegin('content', TType.STRING, 4)
            oprot.writeBinary(self.content)
            oprot.writeFieldEnd()
        if self.contentMetadata is not None:
            oprot.writeFieldBegin('contentMetadata', TType.MAP, 5)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.contentMetadata))
            for kiter126, viter127 in self.contentMetadata.items():
                oprot.writeString(
                    kiter126.encode('utf-8') if sys.version_info[0] == 2 else kiter126
                )
                oprot.writeString(
                    viter127.encode('utf-8') if sys.version_info[0] == 2 else viter127
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class BuddyOnAirUrls(object):
    """
    Attributes:
     - hls
     - smoothStreaming

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.MAP:
                    self.hls = {}
                    (_ktype129, _vtype130, _size128) = iprot.readMapBegin()
                    for _i132 in range(_size128):
                        _key133 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val134 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.hls[_key133] = _val134
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.smoothStreaming = {}
                    (_ktype136, _vtype137, _size135) = iprot.readMapBegin()
                    for _i139 in range(_size135):
                        _key140 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val141 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.smoothStreaming[_key140] = _val141
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('BuddyOnAirUrls')
        if self.hls is not None:
            oprot.writeFieldBegin('hls', TType.MAP, 1)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.hls))
            for kiter142, viter143 in self.hls.items():
                oprot.writeString(
                    kiter142.encode('utf-8') if sys.version_info[0] == 2 else kiter142
                )
                oprot.writeString(
                    viter143.encode('utf-8') if sys.version_info[0] == 2 else viter143
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.smoothStreaming is not None:
            oprot.writeFieldBegin('smoothStreaming', TType.MAP, 2)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.smoothStreaming))
            for kiter144, viter145 in self.smoothStreaming.items():
                oprot.writeString(
                    kiter144.encode('utf-8') if sys.version_info[0] == 2 else kiter144
                )
                oprot.writeString(
                    viter145.encode('utf-8') if sys.version_info[0] == 2 else viter145
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class BuddyOnAir(object):
    """
    Attributes:
     - mid
     - freshnessLifetime
     - onAirId
     - onAir
     - text
     - viewerCount
     - targetCount
     - onAirType
     - onAirUrls

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.freshnessLifetime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.onAirId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.onAir = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.text = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I64:
                    self.viewerCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I64:
                    self.targetCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 31:
                if ftype == TType.I32:
                    self.onAirType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 32:
                if ftype == TType.STRUCT:
                    self.onAirUrls = BuddyOnAirUrls()
                    self.onAirUrls.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('BuddyOnAir')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.freshnessLifetime is not None:
            oprot.writeFieldBegin('freshnessLifetime', TType.I64, 3)
            oprot.writeI64(self.freshnessLifetime)
            oprot.writeFieldEnd()
        if self.onAirId is not None:
            oprot.writeFieldBegin('onAirId', TType.STRING, 4)
            oprot.writeString(
                self.onAirId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.onAirId
            )
            oprot.writeFieldEnd()
        if self.onAir is not None:
            oprot.writeFieldBegin('onAir', TType.BOOL, 5)
            oprot.writeBool(self.onAir)
            oprot.writeFieldEnd()
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 11)
            oprot.writeString(
                self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text
            )
            oprot.writeFieldEnd()
        if self.viewerCount is not None:
            oprot.writeFieldBegin('viewerCount', TType.I64, 12)
            oprot.writeI64(self.viewerCount)
            oprot.writeFieldEnd()
        if self.targetCount is not None:
            oprot.writeFieldBegin('targetCount', TType.I64, 13)
            oprot.writeI64(self.targetCount)
            oprot.writeFieldEnd()
        if self.onAirType is not None:
            oprot.writeFieldBegin('onAirType', TType.I32, 31)
            oprot.writeI32(self.onAirType)
            oprot.writeFieldEnd()
        if self.onAirUrls is not None:
            oprot.writeFieldBegin('onAirUrls', TType.STRUCT, 32)
            self.onAirUrls.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class BuddyProfile(object):
    """
    Attributes:
     - buddyId
     - mid
     - searchId
     - displayName
     - statusMessage
     - contactCount

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.buddyId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.searchId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.statusMessage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.contactCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('BuddyProfile')
        if self.buddyId is not None:
            oprot.writeFieldBegin('buddyId', TType.STRING, 1)
            oprot.writeString(
                self.buddyId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.buddyId
            )
            oprot.writeFieldEnd()
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 2)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.searchId is not None:
            oprot.writeFieldBegin('searchId', TType.STRING, 3)
            oprot.writeString(
                self.searchId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.searchId
            )
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 4)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 5)
            oprot.writeString(
                self.statusMessage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.statusMessage
            )
            oprot.writeFieldEnd()
        if self.contactCount is not None:
            oprot.writeFieldBegin('contactCount', TType.I64, 11)
            oprot.writeI64(self.contactCount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CommitMessageResult(object):
    """
    Attributes:
     - message
     - code
     - reason
     - successCount
     - failCount
     - unregisterCount
     - blockCount

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.message = Message()
                    self.message.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.reason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.successCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.failCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.unregisterCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.blockCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CommitMessageResult')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRUCT, 1)
            self.message.write(oprot)
            oprot.writeFieldEnd()
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 2)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.reason is not None:
            oprot.writeFieldBegin('reason', TType.STRING, 3)
            oprot.writeString(
                self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason
            )
            oprot.writeFieldEnd()
        if self.successCount is not None:
            oprot.writeFieldBegin('successCount', TType.I64, 4)
            oprot.writeI64(self.successCount)
            oprot.writeFieldEnd()
        if self.failCount is not None:
            oprot.writeFieldBegin('failCount', TType.I64, 5)
            oprot.writeI64(self.failCount)
            oprot.writeFieldEnd()
        if self.unregisterCount is not None:
            oprot.writeFieldBegin('unregisterCount', TType.I64, 6)
            oprot.writeI64(self.unregisterCount)
            oprot.writeFieldEnd()
        if self.blockCount is not None:
            oprot.writeFieldBegin('blockCount', TType.I64, 7)
            oprot.writeI64(self.blockCount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class BuddySearchResult(object):
    """
    Attributes:
     - mid
     - displayName
     - pictureStatus
     - picturePath
     - statusMessage
     - businessAccount

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.pictureStatus = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.picturePath = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.statusMessage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.businessAccount = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('BuddySearchResult')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 2)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 3)
            oprot.writeString(
                self.pictureStatus.encode('utf-8')
                if sys.version_info[0] == 2
                else self.pictureStatus
            )
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 4)
            oprot.writeString(
                self.picturePath.encode('utf-8')
                if sys.version_info[0] == 2
                else self.picturePath
            )
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 5)
            oprot.writeString(
                self.statusMessage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.statusMessage
            )
            oprot.writeFieldEnd()
        if self.businessAccount is not None:
            oprot.writeFieldBegin('businessAccount', TType.BOOL, 6)
            oprot.writeBool(self.businessAccount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SyncParamMid(object):
    """
    Attributes:
     - mid
     - diff
     - revision

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SyncParamMid')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.diff is not None:
            oprot.writeFieldBegin('diff', TType.I32, 2)
            oprot.writeI32(self.diff)
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 3)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SIMInfo(object):
    """
    Attributes:
     - phoneNumber
     - countryCode

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.phoneNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.countryCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SIMInfo')
        if self.phoneNumber is not None:
            oprot.writeFieldBegin('phoneNumber', TType.STRING, 1)
            oprot.writeString(
                self.phoneNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.phoneNumber
            )
            oprot.writeFieldEnd()
        if self.countryCode is not None:
            oprot.writeFieldBegin('countryCode', TType.STRING, 2)
            oprot.writeString(
                self.countryCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.countryCode
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SyncParamContact(object):
    """
    Attributes:
     - syncParamMid
     - contactStatus

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.syncParamMid = SyncParamMid()
                    self.syncParamMid.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.contactStatus = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SyncParamContact')
        if self.syncParamMid is not None:
            oprot.writeFieldBegin('syncParamMid', TType.STRUCT, 1)
            self.syncParamMid.write(oprot)
            oprot.writeFieldEnd()
        if self.contactStatus is not None:
            oprot.writeFieldBegin('contactStatus', TType.I32, 2)
            oprot.writeI32(self.contactStatus)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ChannelDomains(object):
    """
    Attributes:
     - channelDomains
     - revision

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.channelDomains = []
                    (_etype149, _size146) = iprot.readListBegin()
                    for _i150 in range(_size146):
                        _elem151 = ChannelDomain()
                        _elem151.read(iprot)
                        self.channelDomains.append(_elem151)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelDomains')
        if self.channelDomains is not None:
            oprot.writeFieldBegin('channelDomains', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.channelDomains))
            for iter152 in self.channelDomains:
                iter152.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 2)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ProductCategory(object):
    """
    Attributes:
     - productCategoryId
     - title
     - productCount
     - newFlag

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.productCategoryId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.title = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.productCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.newFlag = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ProductCategory')
        if self.productCategoryId is not None:
            oprot.writeFieldBegin('productCategoryId', TType.I64, 1)
            oprot.writeI64(self.productCategoryId)
            oprot.writeFieldEnd()
        if self.title is not None:
            oprot.writeFieldBegin('title', TType.STRING, 2)
            oprot.writeString(
                self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title
            )
            oprot.writeFieldEnd()
        if self.productCount is not None:
            oprot.writeFieldBegin('productCount', TType.I32, 3)
            oprot.writeI32(self.productCount)
            oprot.writeFieldEnd()
        if self.newFlag is not None:
            oprot.writeFieldBegin('newFlag', TType.BOOL, 4)
            oprot.writeBool(self.newFlag)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ChannelInfos(object):
    """
    Attributes:
     - channelInfos
     - revision

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.channelInfos = []
                    (_etype156, _size153) = iprot.readListBegin()
                    for _i157 in range(_size153):
                        _elem158 = ChannelInfo()
                        _elem158.read(iprot)
                        self.channelInfos.append(_elem158)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelInfos')
        if self.channelInfos is not None:
            oprot.writeFieldBegin('channelInfos', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.channelInfos))
            for iter159 in self.channelInfos:
                iter159.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 2)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ChannelNotificationSetting(object):
    """
    Attributes:
     - channelId
     - name
     - notificationReceivable
     - messageReceivable
     - showDefault

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.channelId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.notificationReceivable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.messageReceivable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.showDefault = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelNotificationSetting')
        if self.channelId is not None:
            oprot.writeFieldBegin('channelId', TType.STRING, 1)
            oprot.writeString(
                self.channelId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.channelId
            )
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.notificationReceivable is not None:
            oprot.writeFieldBegin('notificationReceivable', TType.BOOL, 3)
            oprot.writeBool(self.notificationReceivable)
            oprot.writeFieldEnd()
        if self.messageReceivable is not None:
            oprot.writeFieldBegin('messageReceivable', TType.BOOL, 4)
            oprot.writeBool(self.messageReceivable)
            oprot.writeFieldEnd()
        if self.showDefault is not None:
            oprot.writeFieldBegin('showDefault', TType.BOOL, 5)
            oprot.writeBool(self.showDefault)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ChannelSyncDatas(object):
    """
    Attributes:
     - channelInfos
     - channelDomains
     - revision
     - expires

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.channelInfos = []
                    (_etype163, _size160) = iprot.readListBegin()
                    for _i164 in range(_size160):
                        _elem165 = ChannelInfo()
                        _elem165.read(iprot)
                        self.channelInfos.append(_elem165)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.channelDomains = []
                    (_etype169, _size166) = iprot.readListBegin()
                    for _i170 in range(_size166):
                        _elem171 = ChannelDomain()
                        _elem171.read(iprot)
                        self.channelDomains.append(_elem171)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.expires = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelSyncDatas')
        if self.channelInfos is not None:
            oprot.writeFieldBegin('channelInfos', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.channelInfos))
            for iter172 in self.channelInfos:
                iter172.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.channelDomains is not None:
            oprot.writeFieldBegin('channelDomains', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.channelDomains))
            for iter173 in self.channelDomains:
                iter173.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 3)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.expires is not None:
            oprot.writeFieldBegin('expires', TType.I64, 4)
            oprot.writeI64(self.expires)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class NotiCenterEventData(object):
    """
    Attributes:
     - id
     - to
     - from_
     - toChannel
     - fromChannel
     - eventType
     - createdTime
     - operationRevision
     - content
     - push

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.to = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.from_ = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.toChannel = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.fromChannel = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.eventType = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I64:
                    self.operationRevision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.MAP:
                    self.content = {}
                    (_ktype175, _vtype176, _size174) = iprot.readMapBegin()
                    for _i178 in range(_size174):
                        _key179 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val180 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.content[_key179] = _val180
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.MAP:
                    self.push = {}
                    (_ktype182, _vtype183, _size181) = iprot.readMapBegin()
                    for _i185 in range(_size181):
                        _key186 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val187 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.push[_key186] = _val187
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('NotiCenterEventData')
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.STRING, 1)
            oprot.writeString(
                self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id
            )
            oprot.writeFieldEnd()
        if self.to is not None:
            oprot.writeFieldBegin('to', TType.STRING, 2)
            oprot.writeString(
                self.to.encode('utf-8') if sys.version_info[0] == 2 else self.to
            )
            oprot.writeFieldEnd()
        if self.from_ is not None:
            oprot.writeFieldBegin('from_', TType.STRING, 3)
            oprot.writeString(
                self.from_.encode('utf-8') if sys.version_info[0] == 2 else self.from_
            )
            oprot.writeFieldEnd()
        if self.toChannel is not None:
            oprot.writeFieldBegin('toChannel', TType.STRING, 4)
            oprot.writeString(
                self.toChannel.encode('utf-8')
                if sys.version_info[0] == 2
                else self.toChannel
            )
            oprot.writeFieldEnd()
        if self.fromChannel is not None:
            oprot.writeFieldBegin('fromChannel', TType.STRING, 5)
            oprot.writeString(
                self.fromChannel.encode('utf-8')
                if sys.version_info[0] == 2
                else self.fromChannel
            )
            oprot.writeFieldEnd()
        if self.eventType is not None:
            oprot.writeFieldBegin('eventType', TType.STRING, 6)
            oprot.writeString(
                self.eventType.encode('utf-8')
                if sys.version_info[0] == 2
                else self.eventType
            )
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 7)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.operationRevision is not None:
            oprot.writeFieldBegin('operationRevision', TType.I64, 8)
            oprot.writeI64(self.operationRevision)
            oprot.writeFieldEnd()
        if self.content is not None:
            oprot.writeFieldBegin('content', TType.MAP, 9)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.content))
            for kiter188, viter189 in self.content.items():
                oprot.writeString(
                    kiter188.encode('utf-8') if sys.version_info[0] == 2 else kiter188
                )
                oprot.writeString(
                    viter189.encode('utf-8') if sys.version_info[0] == 2 else viter189
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.push is not None:
            oprot.writeFieldBegin('push', TType.MAP, 10)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.push))
            for kiter190, viter191 in self.push.items():
                oprot.writeString(
                    kiter190.encode('utf-8') if sys.version_info[0] == 2 else kiter190
                )
                oprot.writeString(
                    viter191.encode('utf-8') if sys.version_info[0] == 2 else viter191
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ChannelToken(object):
    """
    Attributes:
     - token
     - obsToken
     - expiration
     - refreshToken
     - channelAccessToken

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.token = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.obsToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.expiration = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.refreshToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.channelAccessToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelToken')
        if self.token is not None:
            oprot.writeFieldBegin('token', TType.STRING, 1)
            oprot.writeString(
                self.token.encode('utf-8') if sys.version_info[0] == 2 else self.token
            )
            oprot.writeFieldEnd()
        if self.obsToken is not None:
            oprot.writeFieldBegin('obsToken', TType.STRING, 2)
            oprot.writeString(
                self.obsToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.obsToken
            )
            oprot.writeFieldEnd()
        if self.expiration is not None:
            oprot.writeFieldBegin('expiration', TType.I64, 3)
            oprot.writeI64(self.expiration)
            oprot.writeFieldEnd()
        if self.refreshToken is not None:
            oprot.writeFieldBegin('refreshToken', TType.STRING, 4)
            oprot.writeString(
                self.refreshToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.refreshToken
            )
            oprot.writeFieldEnd()
        if self.channelAccessToken is not None:
            oprot.writeFieldBegin('channelAccessToken', TType.STRING, 5)
            oprot.writeString(
                self.channelAccessToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.channelAccessToken
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ChannelSettings(object):
    """
    Attributes:
     - unapprovedMessageReceivable

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.unapprovedMessageReceivable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelSettings')
        if self.unapprovedMessageReceivable is not None:
            oprot.writeFieldBegin('unapprovedMessageReceivable', TType.BOOL, 1)
            oprot.writeBool(self.unapprovedMessageReceivable)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ChannelIdWithLastUpdated(object):
    """
    Attributes:
     - channelId
     - lastUpdated

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.channelId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.lastUpdated = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelIdWithLastUpdated')
        if self.channelId is not None:
            oprot.writeFieldBegin('channelId', TType.STRING, 1)
            oprot.writeString(
                self.channelId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.channelId
            )
            oprot.writeFieldEnd()
        if self.lastUpdated is not None:
            oprot.writeFieldBegin('lastUpdated', TType.I64, 2)
            oprot.writeI64(self.lastUpdated)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class Coin(object):
    """
    Attributes:
     - freeCoinBalance
     - payedCoinBalance
     - totalCoinBalance
     - rewardCoinBalance

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.freeCoinBalance = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.payedCoinBalance = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.totalCoinBalance = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.rewardCoinBalance = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Coin')
        if self.freeCoinBalance is not None:
            oprot.writeFieldBegin('freeCoinBalance', TType.I32, 1)
            oprot.writeI32(self.freeCoinBalance)
            oprot.writeFieldEnd()
        if self.payedCoinBalance is not None:
            oprot.writeFieldBegin('payedCoinBalance', TType.I32, 2)
            oprot.writeI32(self.payedCoinBalance)
            oprot.writeFieldEnd()
        if self.totalCoinBalance is not None:
            oprot.writeFieldBegin('totalCoinBalance', TType.I32, 3)
            oprot.writeI32(self.totalCoinBalance)
            oprot.writeFieldEnd()
        if self.rewardCoinBalance is not None:
            oprot.writeFieldBegin('rewardCoinBalance', TType.I32, 4)
            oprot.writeI32(self.rewardCoinBalance)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CoinPayLoad(object):
    """
    Attributes:
     - payCoin
     - freeCoin
     - type
     - rewardCoin

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.payCoin = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.freeCoin = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.rewardCoin = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CoinPayLoad')
        if self.payCoin is not None:
            oprot.writeFieldBegin('payCoin', TType.I32, 1)
            oprot.writeI32(self.payCoin)
            oprot.writeFieldEnd()
        if self.freeCoin is not None:
            oprot.writeFieldBegin('freeCoin', TType.I32, 2)
            oprot.writeI32(self.freeCoin)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 3)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.rewardCoin is not None:
            oprot.writeFieldBegin('rewardCoin', TType.I32, 4)
            oprot.writeI32(self.rewardCoin)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CoinHistory(object):
    """
    Attributes:
     - payDate
     - coinBalance
     - coin
     - price
     - title
     - refund
     - paySeq
     - currency
     - currencySign
     - displayPrice
     - payload
     - channelId

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.payDate = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.coinBalance = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.coin = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.price = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.title = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.refund = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.paySeq = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.currency = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.currencySign = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.displayPrice = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRUCT:
                    self.payload = CoinPayLoad()
                    self.payload.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.channelId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CoinHistory')
        if self.payDate is not None:
            oprot.writeFieldBegin('payDate', TType.I64, 1)
            oprot.writeI64(self.payDate)
            oprot.writeFieldEnd()
        if self.coinBalance is not None:
            oprot.writeFieldBegin('coinBalance', TType.I32, 2)
            oprot.writeI32(self.coinBalance)
            oprot.writeFieldEnd()
        if self.coin is not None:
            oprot.writeFieldBegin('coin', TType.I32, 3)
            oprot.writeI32(self.coin)
            oprot.writeFieldEnd()
        if self.price is not None:
            oprot.writeFieldBegin('price', TType.STRING, 4)
            oprot.writeString(
                self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price
            )
            oprot.writeFieldEnd()
        if self.title is not None:
            oprot.writeFieldBegin('title', TType.STRING, 5)
            oprot.writeString(
                self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title
            )
            oprot.writeFieldEnd()
        if self.refund is not None:
            oprot.writeFieldBegin('refund', TType.BOOL, 6)
            oprot.writeBool(self.refund)
            oprot.writeFieldEnd()
        if self.paySeq is not None:
            oprot.writeFieldBegin('paySeq', TType.STRING, 7)
            oprot.writeString(
                self.paySeq.encode('utf-8') if sys.version_info[0] == 2 else self.paySeq
            )
            oprot.writeFieldEnd()
        if self.currency is not None:
            oprot.writeFieldBegin('currency', TType.STRING, 8)
            oprot.writeString(
                self.currency.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currency
            )
            oprot.writeFieldEnd()
        if self.currencySign is not None:
            oprot.writeFieldBegin('currencySign', TType.STRING, 9)
            oprot.writeString(
                self.currencySign.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currencySign
            )
            oprot.writeFieldEnd()
        if self.displayPrice is not None:
            oprot.writeFieldBegin('displayPrice', TType.STRING, 10)
            oprot.writeString(
                self.displayPrice.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayPrice
            )
            oprot.writeFieldEnd()
        if self.payload is not None:
            oprot.writeFieldBegin('payload', TType.STRUCT, 11)
            self.payload.write(oprot)
            oprot.writeFieldEnd()
        if self.channelId is not None:
            oprot.writeFieldBegin('channelId', TType.STRING, 12)
            oprot.writeString(
                self.channelId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.channelId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CoinHistoryCondition(object):
    """
    Attributes:
     - start
     - size
     - language
     - eddt
     - appStoreCode

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.start = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.size = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.language = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.eddt = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.appStoreCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CoinHistoryCondition')
        if self.start is not None:
            oprot.writeFieldBegin('start', TType.I64, 1)
            oprot.writeI64(self.start)
            oprot.writeFieldEnd()
        if self.size is not None:
            oprot.writeFieldBegin('size', TType.I32, 2)
            oprot.writeI32(self.size)
            oprot.writeFieldEnd()
        if self.language is not None:
            oprot.writeFieldBegin('language', TType.STRING, 3)
            oprot.writeString(
                self.language.encode('utf-8')
                if sys.version_info[0] == 2
                else self.language
            )
            oprot.writeFieldEnd()
        if self.eddt is not None:
            oprot.writeFieldBegin('eddt', TType.STRING, 4)
            oprot.writeString(
                self.eddt.encode('utf-8') if sys.version_info[0] == 2 else self.eddt
            )
            oprot.writeFieldEnd()
        if self.appStoreCode is not None:
            oprot.writeFieldBegin('appStoreCode', TType.I32, 5)
            oprot.writeI32(self.appStoreCode)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CoinHistoryResult(object):
    """
    Attributes:
     - historys
     - balance
     - hasNext

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.historys = []
                    (_etype195, _size192) = iprot.readListBegin()
                    for _i196 in range(_size192):
                        _elem197 = CoinHistory()
                        _elem197.read(iprot)
                        self.historys.append(_elem197)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.balance = Coin()
                    self.balance.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.hasNext = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CoinHistoryResult')
        if self.historys is not None:
            oprot.writeFieldBegin('historys', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.historys))
            for iter198 in self.historys:
                iter198.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.balance is not None:
            oprot.writeFieldBegin('balance', TType.STRUCT, 2)
            self.balance.write(oprot)
            oprot.writeFieldEnd()
        if self.hasNext is not None:
            oprot.writeFieldBegin('hasNext', TType.BOOL, 3)
            oprot.writeBool(self.hasNext)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CoinProductItem(object):
    """
    Attributes:
     - itemId
     - coin
     - freeCoin
     - currency
     - price
     - displayPrice
     - name
     - desc

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.itemId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.coin = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.freeCoin = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.currency = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.price = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.displayPrice = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.desc = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CoinProductItem')
        if self.itemId is not None:
            oprot.writeFieldBegin('itemId', TType.STRING, 1)
            oprot.writeString(
                self.itemId.encode('utf-8') if sys.version_info[0] == 2 else self.itemId
            )
            oprot.writeFieldEnd()
        if self.coin is not None:
            oprot.writeFieldBegin('coin', TType.I32, 2)
            oprot.writeI32(self.coin)
            oprot.writeFieldEnd()
        if self.freeCoin is not None:
            oprot.writeFieldBegin('freeCoin', TType.I32, 3)
            oprot.writeI32(self.freeCoin)
            oprot.writeFieldEnd()
        if self.currency is not None:
            oprot.writeFieldBegin('currency', TType.STRING, 5)
            oprot.writeString(
                self.currency.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currency
            )
            oprot.writeFieldEnd()
        if self.price is not None:
            oprot.writeFieldBegin('price', TType.STRING, 6)
            oprot.writeString(
                self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price
            )
            oprot.writeFieldEnd()
        if self.displayPrice is not None:
            oprot.writeFieldBegin('displayPrice', TType.STRING, 7)
            oprot.writeString(
                self.displayPrice.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayPrice
            )
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 8)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.desc is not None:
            oprot.writeFieldBegin('desc', TType.STRING, 9)
            oprot.writeString(
                self.desc.encode('utf-8') if sys.version_info[0] == 2 else self.desc
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CoinPurchaseConfirm(object):
    """
    Attributes:
     - orderId
     - appStoreCode
     - receipt
     - signature
     - seller
     - requestType
     - ignoreReceipt

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.orderId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.appStoreCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.receipt = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.signature = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.seller = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.requestType = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.ignoreReceipt = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CoinPurchaseConfirm')
        if self.orderId is not None:
            oprot.writeFieldBegin('orderId', TType.STRING, 1)
            oprot.writeString(
                self.orderId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.orderId
            )
            oprot.writeFieldEnd()
        if self.appStoreCode is not None:
            oprot.writeFieldBegin('appStoreCode', TType.I32, 2)
            oprot.writeI32(self.appStoreCode)
            oprot.writeFieldEnd()
        if self.receipt is not None:
            oprot.writeFieldBegin('receipt', TType.STRING, 3)
            oprot.writeString(
                self.receipt.encode('utf-8')
                if sys.version_info[0] == 2
                else self.receipt
            )
            oprot.writeFieldEnd()
        if self.signature is not None:
            oprot.writeFieldBegin('signature', TType.STRING, 4)
            oprot.writeString(
                self.signature.encode('utf-8')
                if sys.version_info[0] == 2
                else self.signature
            )
            oprot.writeFieldEnd()
        if self.seller is not None:
            oprot.writeFieldBegin('seller', TType.STRING, 5)
            oprot.writeString(
                self.seller.encode('utf-8') if sys.version_info[0] == 2 else self.seller
            )
            oprot.writeFieldEnd()
        if self.requestType is not None:
            oprot.writeFieldBegin('requestType', TType.STRING, 6)
            oprot.writeString(
                self.requestType.encode('utf-8')
                if sys.version_info[0] == 2
                else self.requestType
            )
            oprot.writeFieldEnd()
        if self.ignoreReceipt is not None:
            oprot.writeFieldBegin('ignoreReceipt', TType.BOOL, 7)
            oprot.writeBool(self.ignoreReceipt)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CoinPurchaseReservation(object):
    """
    Attributes:
     - productId
     - country
     - currency
     - price
     - appStoreCode
     - language
     - pgCode
     - redirectUrl

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.productId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.country = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.currency = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.price = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.appStoreCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.language = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.pgCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.redirectUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CoinPurchaseReservation')
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 1)
            oprot.writeString(
                self.productId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productId
            )
            oprot.writeFieldEnd()
        if self.country is not None:
            oprot.writeFieldBegin('country', TType.STRING, 2)
            oprot.writeString(
                self.country.encode('utf-8')
                if sys.version_info[0] == 2
                else self.country
            )
            oprot.writeFieldEnd()
        if self.currency is not None:
            oprot.writeFieldBegin('currency', TType.STRING, 3)
            oprot.writeString(
                self.currency.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currency
            )
            oprot.writeFieldEnd()
        if self.price is not None:
            oprot.writeFieldBegin('price', TType.STRING, 4)
            oprot.writeString(
                self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price
            )
            oprot.writeFieldEnd()
        if self.appStoreCode is not None:
            oprot.writeFieldBegin('appStoreCode', TType.I32, 5)
            oprot.writeI32(self.appStoreCode)
            oprot.writeFieldEnd()
        if self.language is not None:
            oprot.writeFieldBegin('language', TType.STRING, 6)
            oprot.writeString(
                self.language.encode('utf-8')
                if sys.version_info[0] == 2
                else self.language
            )
            oprot.writeFieldEnd()
        if self.pgCode is not None:
            oprot.writeFieldBegin('pgCode', TType.I32, 7)
            oprot.writeI32(self.pgCode)
            oprot.writeFieldEnd()
        if self.redirectUrl is not None:
            oprot.writeFieldBegin('redirectUrl', TType.STRING, 8)
            oprot.writeString(
                self.redirectUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.redirectUrl
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CoinUseReservationItem(object):
    """
    Attributes:
     - itemId
     - itemName
     - amount

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CoinUseReservationItem')
        if self.itemId is not None:
            oprot.writeFieldBegin('itemId', TType.STRING, 1)
            oprot.writeString(
                self.itemId.encode('utf-8') if sys.version_info[0] == 2 else self.itemId
            )
            oprot.writeFieldEnd()
        if self.itemName is not None:
            oprot.writeFieldBegin('itemName', TType.STRING, 2)
            oprot.writeString(
                self.itemName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.itemName
            )
            oprot.writeFieldEnd()
        if self.amount is not None:
            oprot.writeFieldBegin('amount', TType.I32, 3)
            oprot.writeI32(self.amount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CoinUseReservation(object):
    """
    Attributes:
     - channelId
     - shopOrderId
     - appStoreCode
     - items
     - country

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.channelId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.shopOrderId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.appStoreCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.items = []
                    (_etype202, _size199) = iprot.readListBegin()
                    for _i203 in range(_size199):
                        _elem204 = CoinUseReservationItem()
                        _elem204.read(iprot)
                        self.items.append(_elem204)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.country = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CoinUseReservation')
        if self.channelId is not None:
            oprot.writeFieldBegin('channelId', TType.STRING, 1)
            oprot.writeString(
                self.channelId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.channelId
            )
            oprot.writeFieldEnd()
        if self.shopOrderId is not None:
            oprot.writeFieldBegin('shopOrderId', TType.STRING, 2)
            oprot.writeString(
                self.shopOrderId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.shopOrderId
            )
            oprot.writeFieldEnd()
        if self.appStoreCode is not None:
            oprot.writeFieldBegin('appStoreCode', TType.I32, 3)
            oprot.writeI32(self.appStoreCode)
            oprot.writeFieldEnd()
        if self.items is not None:
            oprot.writeFieldBegin('items', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.items))
            for iter205 in self.items:
                iter205.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.country is not None:
            oprot.writeFieldBegin('country', TType.STRING, 5)
            oprot.writeString(
                self.country.encode('utf-8')
                if sys.version_info[0] == 2
                else self.country
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CompactContact(object):
    """
    Attributes:
     - mid
     - createdTime
     - modifiedTime
     - status
     - settings
     - displayNameOverridden

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.modifiedTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.status = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.settings = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.displayNameOverridden = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CompactContact')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 2)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.modifiedTime is not None:
            oprot.writeFieldBegin('modifiedTime', TType.I64, 3)
            oprot.writeI64(self.modifiedTime)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 4)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.settings is not None:
            oprot.writeFieldBegin('settings', TType.I64, 5)
            oprot.writeI64(self.settings)
            oprot.writeFieldEnd()
        if self.displayNameOverridden is not None:
            oprot.writeFieldBegin('displayNameOverridden', TType.STRING, 6)
            oprot.writeString(
                self.displayNameOverridden.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayNameOverridden
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ContactModification(object):
    """
    Attributes:
     - type
     - luid
     - phones
     - emails
     - userids

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.luid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.LIST:
                    self.phones = []
                    (_etype209, _size206) = iprot.readListBegin()
                    for _i210 in range(_size206):
                        _elem211 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.phones.append(_elem211)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.LIST:
                    self.emails = []
                    (_etype215, _size212) = iprot.readListBegin()
                    for _i216 in range(_size212):
                        _elem217 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.emails.append(_elem217)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.LIST:
                    self.userids = []
                    (_etype221, _size218) = iprot.readListBegin()
                    for _i222 in range(_size218):
                        _elem223 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.userids.append(_elem223)
                    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 iter224 in self.phones:
                oprot.writeString(
                    iter224.encode('utf-8') if sys.version_info[0] == 2 else iter224
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.emails is not None:
            oprot.writeFieldBegin('emails', TType.LIST, 12)
            oprot.writeListBegin(TType.STRING, len(self.emails))
            for iter225 in self.emails:
                oprot.writeString(
                    iter225.encode('utf-8') if sys.version_info[0] == 2 else iter225
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.userids is not None:
            oprot.writeFieldBegin('userids', TType.LIST, 13)
            oprot.writeListBegin(TType.STRING, len(self.userids))
            for iter226 in self.userids:
                oprot.writeString(
                    iter226.encode('utf-8') if sys.version_info[0] == 2 else iter226
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ContactRegistration(object):
    """
    Attributes:
     - contact
     - luid
     - contactType
     - contactKey

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.contact = Contact()
                    self.contact.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.luid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I32:
                    self.contactType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.contactKey = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ContactRegistration')
        if self.contact is not None:
            oprot.writeFieldBegin('contact', TType.STRUCT, 1)
            self.contact.write(oprot)
            oprot.writeFieldEnd()
        if self.luid is not None:
            oprot.writeFieldBegin('luid', TType.STRING, 10)
            oprot.writeString(
                self.luid.encode('utf-8') if sys.version_info[0] == 2 else self.luid
            )
            oprot.writeFieldEnd()
        if self.contactType is not None:
            oprot.writeFieldBegin('contactType', TType.I32, 11)
            oprot.writeI32(self.contactType)
            oprot.writeFieldEnd()
        if self.contactKey is not None:
            oprot.writeFieldBegin('contactKey', TType.STRING, 12)
            oprot.writeString(
                self.contactKey.encode('utf-8')
                if sys.version_info[0] == 2
                else self.contactKey
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ContactReport(object):
    """
    Attributes:
     - mid
     - exists
     - contact

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.exists = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.contact = Contact()
                    self.contact.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ContactReport')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.exists is not None:
            oprot.writeFieldBegin('exists', TType.BOOL, 2)
            oprot.writeBool(self.exists)
            oprot.writeFieldEnd()
        if self.contact is not None:
            oprot.writeFieldBegin('contact', TType.STRUCT, 3)
            self.contact.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ContactReportResult(object):
    """
    Attributes:
     - mid
     - exists

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.exists = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ContactReportResult')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.exists is not None:
            oprot.writeFieldBegin('exists', TType.BOOL, 2)
            oprot.writeBool(self.exists)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class DeviceInfo(object):
    """
    Attributes:
     - deviceName
     - systemName
     - systemVersion
     - model
     - carrierCode
     - carrierName
     - applicationType

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.deviceName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.systemName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.systemVersion = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.model = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I32:
                    self.carrierCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.carrierName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.I32:
                    self.applicationType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('DeviceInfo')
        if self.deviceName is not None:
            oprot.writeFieldBegin('deviceName', TType.STRING, 1)
            oprot.writeString(
                self.deviceName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.deviceName
            )
            oprot.writeFieldEnd()
        if self.systemName is not None:
            oprot.writeFieldBegin('systemName', TType.STRING, 2)
            oprot.writeString(
                self.systemName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.systemName
            )
            oprot.writeFieldEnd()
        if self.systemVersion is not None:
            oprot.writeFieldBegin('systemVersion', TType.STRING, 3)
            oprot.writeString(
                self.systemVersion.encode('utf-8')
                if sys.version_info[0] == 2
                else self.systemVersion
            )
            oprot.writeFieldEnd()
        if self.model is not None:
            oprot.writeFieldBegin('model', TType.STRING, 4)
            oprot.writeString(
                self.model.encode('utf-8') if sys.version_info[0] == 2 else self.model
            )
            oprot.writeFieldEnd()
        if self.carrierCode is not None:
            oprot.writeFieldBegin('carrierCode', TType.I32, 10)
            oprot.writeI32(self.carrierCode)
            oprot.writeFieldEnd()
        if self.carrierName is not None:
            oprot.writeFieldBegin('carrierName', TType.STRING, 11)
            oprot.writeString(
                self.carrierName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.carrierName
            )
            oprot.writeFieldEnd()
        if self.applicationType is not None:
            oprot.writeFieldBegin('applicationType', TType.I32, 20)
            oprot.writeI32(self.applicationType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class EmailConfirmation(object):
    """
    Attributes:
     - usePasswordSet
     - email
     - password
     - ignoreDuplication

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.usePasswordSet = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.email = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.password = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.ignoreDuplication = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('EmailConfirmation')
        if self.usePasswordSet is not None:
            oprot.writeFieldBegin('usePasswordSet', TType.BOOL, 1)
            oprot.writeBool(self.usePasswordSet)
            oprot.writeFieldEnd()
        if self.email is not None:
            oprot.writeFieldBegin('email', TType.STRING, 2)
            oprot.writeString(
                self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email
            )
            oprot.writeFieldEnd()
        if self.password is not None:
            oprot.writeFieldBegin('password', TType.STRING, 3)
            oprot.writeString(
                self.password.encode('utf-8')
                if sys.version_info[0] == 2
                else self.password
            )
            oprot.writeFieldEnd()
        if self.ignoreDuplication is not None:
            oprot.writeFieldBegin('ignoreDuplication', TType.BOOL, 4)
            oprot.writeBool(self.ignoreDuplication)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class EmailConfirmationSession(object):
    """
    Attributes:
     - emailConfirmationType
     - verifier
     - targetEmail

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('EmailConfirmationSession')
        if self.emailConfirmationType is not None:
            oprot.writeFieldBegin('emailConfirmationType', TType.I32, 1)
            oprot.writeI32(self.emailConfirmationType)
            oprot.writeFieldEnd()
        if self.verifier is not None:
            oprot.writeFieldBegin('verifier', TType.STRING, 2)
            oprot.writeString(
                self.verifier.encode('utf-8')
                if sys.version_info[0] == 2
                else self.verifier
            )
            oprot.writeFieldEnd()
        if self.targetEmail is not None:
            oprot.writeFieldBegin('targetEmail', TType.STRING, 3)
            oprot.writeString(
                self.targetEmail.encode('utf-8')
                if sys.version_info[0] == 2
                else self.targetEmail
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class FriendChannelMatrix(object):
    """
    Attributes:
     - channelId
     - representMid
     - count
     - point

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.channelId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.representMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.count = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.point = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FriendChannelMatrix')
        if self.channelId is not None:
            oprot.writeFieldBegin('channelId', TType.STRING, 1)
            oprot.writeString(
                self.channelId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.channelId
            )
            oprot.writeFieldEnd()
        if self.representMid is not None:
            oprot.writeFieldBegin('representMid', TType.STRING, 2)
            oprot.writeString(
                self.representMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.representMid
            )
            oprot.writeFieldEnd()
        if self.count is not None:
            oprot.writeFieldBegin('count', TType.I32, 3)
            oprot.writeI32(self.count)
            oprot.writeFieldEnd()
        if self.point is not None:
            oprot.writeFieldBegin('point', TType.I32, 4)
            oprot.writeI32(self.point)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class FriendChannelMatricesResponse(object):
    """
    Attributes:
     - expires
     - matrices

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.expires = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.matrices = []
                    (_etype230, _size227) = iprot.readListBegin()
                    for _i231 in range(_size227):
                        _elem232 = FriendChannelMatrix()
                        _elem232.read(iprot)
                        self.matrices.append(_elem232)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FriendChannelMatricesResponse')
        if self.expires is not None:
            oprot.writeFieldBegin('expires', TType.I64, 1)
            oprot.writeI64(self.expires)
            oprot.writeFieldEnd()
        if self.matrices is not None:
            oprot.writeFieldBegin('matrices', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.matrices))
            for iter233 in self.matrices:
                iter233.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class FriendRequest(object):
    """
    Attributes:
     - eMid
     - mid
     - direction
     - method
     - param
     - timestamp
     - seqId
     - displayName
     - picturePath
     - pictureStatus

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.eMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.direction = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.method = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.param = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.timestamp = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.seqId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.picturePath = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.pictureStatus = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FriendRequest')
        if self.eMid is not None:
            oprot.writeFieldBegin('eMid', TType.STRING, 1)
            oprot.writeString(
                self.eMid.encode('utf-8') if sys.version_info[0] == 2 else self.eMid
            )
            oprot.writeFieldEnd()
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 2)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.direction is not None:
            oprot.writeFieldBegin('direction', TType.I32, 3)
            oprot.writeI32(self.direction)
            oprot.writeFieldEnd()
        if self.method is not None:
            oprot.writeFieldBegin('method', TType.I32, 4)
            oprot.writeI32(self.method)
            oprot.writeFieldEnd()
        if self.param is not None:
            oprot.writeFieldBegin('param', TType.STRING, 5)
            oprot.writeString(
                self.param.encode('utf-8') if sys.version_info[0] == 2 else self.param
            )
            oprot.writeFieldEnd()
        if self.timestamp is not None:
            oprot.writeFieldBegin('timestamp', TType.I64, 6)
            oprot.writeI64(self.timestamp)
            oprot.writeFieldEnd()
        if self.seqId is not None:
            oprot.writeFieldBegin('seqId', TType.I64, 7)
            oprot.writeI64(self.seqId)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 10)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 11)
            oprot.writeString(
                self.picturePath.encode('utf-8')
                if sys.version_info[0] == 2
                else self.picturePath
            )
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 12)
            oprot.writeString(
                self.pictureStatus.encode('utf-8')
                if sys.version_info[0] == 2
                else self.pictureStatus
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class FriendRequestsInfo(object):
    """
    Attributes:
     - totalIncomingCount
     - totalOutgoingCount
     - recentIncomings
     - recentOutgoings
     - totalIncomingLimit
     - totalOutgoingLimit

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.totalIncomingCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.totalOutgoingCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.recentIncomings = []
                    (_etype237, _size234) = iprot.readListBegin()
                    for _i238 in range(_size234):
                        _elem239 = FriendRequest()
                        _elem239.read(iprot)
                        self.recentIncomings.append(_elem239)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.recentOutgoings = []
                    (_etype243, _size240) = iprot.readListBegin()
                    for _i244 in range(_size240):
                        _elem245 = FriendRequest()
                        _elem245.read(iprot)
                        self.recentOutgoings.append(_elem245)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.totalIncomingLimit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.totalOutgoingLimit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FriendRequestsInfo')
        if self.totalIncomingCount is not None:
            oprot.writeFieldBegin('totalIncomingCount', TType.I32, 1)
            oprot.writeI32(self.totalIncomingCount)
            oprot.writeFieldEnd()
        if self.totalOutgoingCount is not None:
            oprot.writeFieldBegin('totalOutgoingCount', TType.I32, 2)
            oprot.writeI32(self.totalOutgoingCount)
            oprot.writeFieldEnd()
        if self.recentIncomings is not None:
            oprot.writeFieldBegin('recentIncomings', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.recentIncomings))
            for iter246 in self.recentIncomings:
                iter246.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.recentOutgoings is not None:
            oprot.writeFieldBegin('recentOutgoings', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.recentOutgoings))
            for iter247 in self.recentOutgoings:
                iter247.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.totalIncomingLimit is not None:
            oprot.writeFieldBegin('totalIncomingLimit', TType.I32, 5)
            oprot.writeI32(self.totalIncomingLimit)
            oprot.writeFieldEnd()
        if self.totalOutgoingLimit is not None:
            oprot.writeFieldBegin('totalOutgoingLimit', TType.I32, 6)
            oprot.writeI32(self.totalOutgoingLimit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class Geolocation(object):
    """
    Attributes:
     - longitude
     - latitude

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.DOUBLE:
                    self.longitude = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.DOUBLE:
                    self.latitude = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Geolocation')
        if self.longitude is not None:
            oprot.writeFieldBegin('longitude', TType.DOUBLE, 1)
            oprot.writeDouble(self.longitude)
            oprot.writeFieldEnd()
        if self.latitude is not None:
            oprot.writeFieldBegin('latitude', TType.DOUBLE, 2)
            oprot.writeDouble(self.latitude)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class NotificationTarget(object):
    """
    Attributes:
     - applicationType
     - applicationVersion
     - region

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.applicationType = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.applicationVersion = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.region = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('NotificationTarget')
        if self.applicationType is not None:
            oprot.writeFieldBegin('applicationType', TType.STRING, 1)
            oprot.writeString(
                self.applicationType.encode('utf-8')
                if sys.version_info[0] == 2
                else self.applicationType
            )
            oprot.writeFieldEnd()
        if self.applicationVersion is not None:
            oprot.writeFieldBegin('applicationVersion', TType.STRING, 2)
            oprot.writeString(
                self.applicationVersion.encode('utf-8')
                if sys.version_info[0] == 2
                else self.applicationVersion
            )
            oprot.writeFieldEnd()
        if self.region is not None:
            oprot.writeFieldBegin('region', TType.STRING, 3)
            oprot.writeString(
                self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class GlobalEvent(object):
    """
    Attributes:
     - key
     - targets
     - createdTime
     - data
     - maxDelay

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.key = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.targets = []
                    (_etype251, _size248) = iprot.readListBegin()
                    for _i252 in range(_size248):
                        _elem253 = NotificationTarget()
                        _elem253.read(iprot)
                        self.targets.append(_elem253)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.data = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.maxDelay = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GlobalEvent')
        if self.key is not None:
            oprot.writeFieldBegin('key', TType.STRING, 1)
            oprot.writeString(
                self.key.encode('utf-8') if sys.version_info[0] == 2 else self.key
            )
            oprot.writeFieldEnd()
        if self.targets is not None:
            oprot.writeFieldBegin('targets', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.targets))
            for iter254 in self.targets:
                iter254.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 3)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.data is not None:
            oprot.writeFieldBegin('data', TType.I64, 4)
            oprot.writeI64(self.data)
            oprot.writeFieldEnd()
        if self.maxDelay is not None:
            oprot.writeFieldBegin('maxDelay', TType.I32, 5)
            oprot.writeI32(self.maxDelay)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class GroupPreference(object):
    """
    Attributes:
     - invitationTicket
     - favoriteTimestamp

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.invitationTicket = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.favoriteTimestamp = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GroupPreference')
        if self.invitationTicket is not None:
            oprot.writeFieldBegin('invitationTicket', TType.STRING, 1)
            oprot.writeString(
                self.invitationTicket.encode('utf-8')
                if sys.version_info[0] == 2
                else self.invitationTicket
            )
            oprot.writeFieldEnd()
        if self.favoriteTimestamp is not None:
            oprot.writeFieldBegin('favoriteTimestamp', TType.I64, 2)
            oprot.writeI64(self.favoriteTimestamp)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.pictureStatus = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.BOOL:
                    self.preventedJoinByTicket = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRUCT:
                    self.groupPreference = GroupPreference()
                    self.groupPreference.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.LIST:
                    self.members = []
                    (_etype258, _size255) = iprot.readListBegin()
                    for _i259 in range(_size255):
                        _elem260 = Contact()
                        _elem260.read(iprot)
                        self.members.append(_elem260)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRUCT:
                    self.creator = Contact()
                    self.creator.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.LIST:
                    self.invitee = []
                    (_etype264, _size261) = iprot.readListBegin()
                    for _i265 in range(_size261):
                        _elem266 = Contact()
                        _elem266.read(iprot)
                        self.invitee.append(_elem266)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 31:
                if ftype == TType.BOOL:
                    self.notificationDisabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Group')
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.STRING, 1)
            oprot.writeString(
                self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id
            )
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 2)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 10)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 11)
            oprot.writeString(
                self.pictureStatus.encode('utf-8')
                if sys.version_info[0] == 2
                else self.pictureStatus
            )
            oprot.writeFieldEnd()
        if self.preventedJoinByTicket is not None:
            oprot.writeFieldBegin('preventedJoinByTicket', TType.BOOL, 12)
            oprot.writeBool(self.preventedJoinByTicket)
            oprot.writeFieldEnd()
        if self.groupPreference is not None:
            oprot.writeFieldBegin('groupPreference', TType.STRUCT, 13)
            self.groupPreference.write(oprot)
            oprot.writeFieldEnd()
        if self.members is not None:
            oprot.writeFieldBegin('members', TType.LIST, 20)
            oprot.writeListBegin(TType.STRUCT, len(self.members))
            for iter267 in self.members:
                iter267.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.creator is not None:
            oprot.writeFieldBegin('creator', TType.STRUCT, 21)
            self.creator.write(oprot)
            oprot.writeFieldEnd()
        if self.invitee is not None:
            oprot.writeFieldBegin('invitee', TType.LIST, 22)
            oprot.writeListBegin(TType.STRUCT, len(self.invitee))
            for iter268 in self.invitee:
                iter268.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.notificationDisabled is not None:
            oprot.writeFieldBegin('notificationDisabled', TType.BOOL, 31)
            oprot.writeBool(self.notificationDisabled)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class IdentityCredential(object):
    """
    Attributes:
     - provider
     - identifier
     - password

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('IdentityCredential')
        if self.provider is not None:
            oprot.writeFieldBegin('provider', TType.I32, 1)
            oprot.writeI32(self.provider)
            oprot.writeFieldEnd()
        if self.identifier is not None:
            oprot.writeFieldBegin('identifier', TType.STRING, 2)
            oprot.writeString(
                self.identifier.encode('utf-8')
                if sys.version_info[0] == 2
                else self.identifier
            )
            oprot.writeFieldEnd()
        if self.password is not None:
            oprot.writeFieldBegin('password', TType.STRING, 3)
            oprot.writeString(
                self.password.encode('utf-8')
                if sys.version_info[0] == 2
                else self.password
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class LastReadMessageId(object):
    """
    Attributes:
     - mid
     - lastReadMessageId

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.lastReadMessageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LastReadMessageId')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.lastReadMessageId is not None:
            oprot.writeFieldBegin('lastReadMessageId', TType.STRING, 2)
            oprot.writeString(
                self.lastReadMessageId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.lastReadMessageId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class LastReadMessageIds(object):
    """
    Attributes:
     - chatId
     - lastReadMessageIds

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.chatId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.lastReadMessageIds = []
                    (_etype272, _size269) = iprot.readListBegin()
                    for _i273 in range(_size269):
                        _elem274 = LastReadMessageId()
                        _elem274.read(iprot)
                        self.lastReadMessageIds.append(_elem274)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LastReadMessageIds')
        if self.chatId is not None:
            oprot.writeFieldBegin('chatId', TType.STRING, 1)
            oprot.writeString(
                self.chatId.encode('utf-8') if sys.version_info[0] == 2 else self.chatId
            )
            oprot.writeFieldEnd()
        if self.lastReadMessageIds is not None:
            oprot.writeFieldBegin('lastReadMessageIds', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.lastReadMessageIds))
            for iter275 in self.lastReadMessageIds:
                iter275.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class VerificationSessionData(object):
    """
    Attributes:
     - sessionId
     - method
     - callback
     - normalizedPhone
     - countryCode
     - nationalSignificantNumber
     - availableVerificationMethods

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.sessionId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.method = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.callback = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.normalizedPhone = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.countryCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.nationalSignificantNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.LIST:
                    self.availableVerificationMethods = []
                    (_etype279, _size276) = iprot.readListBegin()
                    for _i280 in range(_size276):
                        _elem281 = iprot.readI32()
                        self.availableVerificationMethods.append(_elem281)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('VerificationSessionData')
        if self.sessionId is not None:
            oprot.writeFieldBegin('sessionId', TType.STRING, 1)
            oprot.writeString(
                self.sessionId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.sessionId
            )
            oprot.writeFieldEnd()
        if self.method is not None:
            oprot.writeFieldBegin('method', TType.I32, 2)
            oprot.writeI32(self.method)
            oprot.writeFieldEnd()
        if self.callback is not None:
            oprot.writeFieldBegin('callback', TType.STRING, 3)
            oprot.writeString(
                self.callback.encode('utf-8')
                if sys.version_info[0] == 2
                else self.callback
            )
            oprot.writeFieldEnd()
        if self.normalizedPhone is not None:
            oprot.writeFieldBegin('normalizedPhone', TType.STRING, 4)
            oprot.writeString(
                self.normalizedPhone.encode('utf-8')
                if sys.version_info[0] == 2
                else self.normalizedPhone
            )
            oprot.writeFieldEnd()
        if self.countryCode is not None:
            oprot.writeFieldBegin('countryCode', TType.STRING, 5)
            oprot.writeString(
                self.countryCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.countryCode
            )
            oprot.writeFieldEnd()
        if self.nationalSignificantNumber is not None:
            oprot.writeFieldBegin('nationalSignificantNumber', TType.STRING, 6)
            oprot.writeString(
                self.nationalSignificantNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.nationalSignificantNumber
            )
            oprot.writeFieldEnd()
        if self.availableVerificationMethods is not None:
            oprot.writeFieldBegin('availableVerificationMethods', TType.LIST, 7)
            oprot.writeListBegin(TType.I32, len(self.availableVerificationMethods))
            for iter282 in self.availableVerificationMethods:
                oprot.writeI32(iter282)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.authToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.certificate = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.verifier = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.pinCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.lastPrimaryBindTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.displayMessage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRUCT:
                    self.sessionForSMSConfirm = VerificationSessionData()
                    self.sessionForSMSConfirm.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LoginResult')
        if self.authToken is not None:
            oprot.writeFieldBegin('authToken', TType.STRING, 1)
            oprot.writeString(
                self.authToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authToken
            )
            oprot.writeFieldEnd()
        if self.certificate is not None:
            oprot.writeFieldBegin('certificate', TType.STRING, 2)
            oprot.writeString(
                self.certificate.encode('utf-8')
                if sys.version_info[0] == 2
                else self.certificate
            )
            oprot.writeFieldEnd()
        if self.verifier is not None:
            oprot.writeFieldBegin('verifier', TType.STRING, 3)
            oprot.writeString(
                self.verifier.encode('utf-8')
                if sys.version_info[0] == 2
                else self.verifier
            )
            oprot.writeFieldEnd()
        if self.pinCode is not None:
            oprot.writeFieldBegin('pinCode', TType.STRING, 4)
            oprot.writeString(
                self.pinCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.pinCode
            )
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 5)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.lastPrimaryBindTime is not None:
            oprot.writeFieldBegin('lastPrimaryBindTime', TType.I64, 6)
            oprot.writeI64(self.lastPrimaryBindTime)
            oprot.writeFieldEnd()
        if self.displayMessage is not None:
            oprot.writeFieldBegin('displayMessage', TType.STRING, 7)
            oprot.writeString(
                self.displayMessage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayMessage
            )
            oprot.writeFieldEnd()
        if self.sessionForSMSConfirm is not None:
            oprot.writeFieldBegin('sessionForSMSConfirm', TType.STRUCT, 8)
            self.sessionForSMSConfirm.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class LoginRequest(object):
    """
    Attributes:
     - type
     - identityProvider
     - identifier
     - password
     - keepLoggedIn
     - accessLocation
     - systemName
     - certificate
     - verifier
     - secret
     - e2eeVersion

    """

    def __init__(
        self,
        type=None,
        identityProvider=None,
        identifier=None,
        password=None,
        keepLoggedIn=None,
        accessLocation=None,
        systemName=None,
        certificate=None,
        verifier=None,
        secret=None,
        e2eeVersion=None,
    ):
        self.type = type
        self.identityProvider = identityProvider
        self.identifier = identifier
        self.password = password
        self.keepLoggedIn = keepLoggedIn
        self.accessLocation = accessLocation
        self.systemName = systemName
        self.certificate = certificate
        self.verifier = verifier
        self.secret = secret
        self.e2eeVersion = e2eeVersion

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.identityProvider = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.identifier = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.password = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.keepLoggedIn = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.accessLocation = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.systemName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.certificate = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.verifier = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.secret = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I32:
                    self.e2eeVersion = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LoginRequest')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.identityProvider is not None:
            oprot.writeFieldBegin('identityProvider', TType.I32, 2)
            oprot.writeI32(self.identityProvider)
            oprot.writeFieldEnd()
        if self.identifier is not None:
            oprot.writeFieldBegin('identifier', TType.STRING, 3)
            oprot.writeString(
                self.identifier.encode('utf-8')
                if sys.version_info[0] == 2
                else self.identifier
            )
            oprot.writeFieldEnd()
        if self.password is not None:
            oprot.writeFieldBegin('password', TType.STRING, 4)
            oprot.writeString(
                self.password.encode('utf-8')
                if sys.version_info[0] == 2
                else self.password
            )
            oprot.writeFieldEnd()
        if self.keepLoggedIn is not None:
            oprot.writeFieldBegin('keepLoggedIn', TType.BOOL, 5)
            oprot.writeBool(self.keepLoggedIn)
            oprot.writeFieldEnd()
        if self.accessLocation is not None:
            oprot.writeFieldBegin('accessLocation', TType.STRING, 6)
            oprot.writeString(
                self.accessLocation.encode('utf-8')
                if sys.version_info[0] == 2
                else self.accessLocation
            )
            oprot.writeFieldEnd()
        if self.systemName is not None:
            oprot.writeFieldBegin('systemName', TType.STRING, 7)
            oprot.writeString(
                self.systemName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.systemName
            )
            oprot.writeFieldEnd()
        if self.certificate is not None:
            oprot.writeFieldBegin('certificate', TType.STRING, 8)
            oprot.writeString(
                self.certificate.encode('utf-8')
                if sys.version_info[0] == 2
                else self.certificate
            )
            oprot.writeFieldEnd()
        if self.verifier is not None:
            oprot.writeFieldBegin('verifier', TType.STRING, 9)
            oprot.writeString(
                self.verifier.encode('utf-8')
                if sys.version_info[0] == 2
                else self.verifier
            )
            oprot.writeFieldEnd()
        if self.secret is not None:
            oprot.writeFieldBegin('secret', TType.STRING, 10)
            oprot.writeString(
                self.secret.encode('utf-8') if sys.version_info[0] == 2 else self.secret
            )
            oprot.writeFieldEnd()
        if self.e2eeVersion is not None:
            oprot.writeFieldBegin('e2eeVersion', TType.I32, 11)
            oprot.writeI32(self.e2eeVersion)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class LoginSession(object):
    """
    Attributes:
     - tokenKey
     - expirationTime
     - applicationType
     - systemName
     - accessLocation

    """

    def __init__(
        self,
        tokenKey=None,
        expirationTime=None,
        applicationType=None,
        systemName=None,
        accessLocation=None,
    ):
        self.tokenKey = tokenKey
        self.expirationTime = expirationTime
        self.applicationType = applicationType
        self.systemName = systemName
        self.accessLocation = accessLocation

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.tokenKey = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.expirationTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I32:
                    self.applicationType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.systemName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.accessLocation = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LoginSession')
        if self.tokenKey is not None:
            oprot.writeFieldBegin('tokenKey', TType.STRING, 1)
            oprot.writeString(
                self.tokenKey.encode('utf-8')
                if sys.version_info[0] == 2
                else self.tokenKey
            )
            oprot.writeFieldEnd()
        if self.expirationTime is not None:
            oprot.writeFieldBegin('expirationTime', TType.I64, 3)
            oprot.writeI64(self.expirationTime)
            oprot.writeFieldEnd()
        if self.applicationType is not None:
            oprot.writeFieldBegin('applicationType', TType.I32, 11)
            oprot.writeI32(self.applicationType)
            oprot.writeFieldEnd()
        if self.systemName is not None:
            oprot.writeFieldBegin('systemName', TType.STRING, 12)
            oprot.writeString(
                self.systemName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.systemName
            )
            oprot.writeFieldEnd()
        if self.accessLocation is not None:
            oprot.writeFieldBegin('accessLocation', TType.STRING, 22)
            oprot.writeString(
                self.accessLocation.encode('utf-8')
                if sys.version_info[0] == 2
                else self.accessLocation
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class MessageWithoutLocation(object):
    """
    Attributes:
     - _from
     - displayName
     - picturePath
     - type
     - person
     - person2
     - personName
     - personName2
     - to
     - toType
     - id
     - createdTime
     - deliveredTime
     - text
     - hasContent
     - contentType
     - contentPreview
     - contentMetadata
     - sessionId
     - chunks
     - relatedMessageId
     - messageRelationType
     - readCount
     - relatedMessageServiceCode

    """

    def __init__(
        self,
        _from=None,
        displayName=None,
        picturePath=None,
        type=None,
        person=None,
        person2=None,
        personName=None,
        personName2=None,
        to=None,
        toType=None,
        id=None,
        createdTime=None,
        deliveredTime=None,
        text=None,
        hasContent=None,
        contentType=None,
        contentPreview=None,
        contentMetadata=None,
        sessionId=None,
        chunks=None,
        relatedMessageId=None,
        messageRelationType=None,
        readCount=None,
        relatedMessageServiceCode=None,
    ):
        self._from = _from
        self.displayName = displayName
        self.picturePath = picturePath
        self.type = type
        self.person = person
        self.person2 = person2
        self.personName = personName
        self.personName2 = personName2
        self.to = to
        self.toType = toType
        self.id = id
        self.createdTime = createdTime
        self.deliveredTime = deliveredTime
        self.text = text
        self.hasContent = hasContent
        self.contentType = contentType
        self.contentPreview = contentPreview
        self.contentMetadata = contentMetadata
        self.sessionId = sessionId
        self.chunks = chunks
        self.relatedMessageId = relatedMessageId
        self.messageRelationType = messageRelationType
        self.readCount = readCount
        self.relatedMessageServiceCode = relatedMessageServiceCode

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self._from = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 99:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 98:
                if ftype == TType.STRING:
                    self.picturePath = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 97:
                if ftype == TType.STRING:
                    self.type = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 96:
                if ftype == TType.STRING:
                    self.person = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 95:
                if ftype == TType.STRING:
                    self.person2 = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 94:
                if ftype == TType.STRING:
                    self.personName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 93:
                if ftype == TType.STRING:
                    self.personName2 = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.to = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.toType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.deliveredTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.text = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 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 = {}
                    (_ktype284, _vtype285, _size283) = iprot.readMapBegin()
                    for _i287 in range(_size283):
                        _key288 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val289 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.contentMetadata[_key288] = _val289
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 19:
                if ftype == TType.I32:
                    self.sessionId = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.LIST:
                    self.chunks = []
                    (_etype293, _size290) = iprot.readListBegin()
                    for _i294 in range(_size290):
                        _elem295 = iprot.readBinary()
                        self.chunks.append(_elem295)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRING:
                    self.relatedMessageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.I32:
                    self.messageRelationType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.I32:
                    self.readCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.I32:
                    self.relatedMessageServiceCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('MessageWithoutLocation')
        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.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 kiter296, viter297 in self.contentMetadata.items():
                oprot.writeString(
                    kiter296.encode('utf-8') if sys.version_info[0] == 2 else kiter296
                )
                oprot.writeString(
                    viter297.encode('utf-8') if sys.version_info[0] == 2 else viter297
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.sessionId is not None:
            oprot.writeFieldBegin('sessionId', TType.I32, 19)
            oprot.writeI32(self.sessionId)
            oprot.writeFieldEnd()
        if self.chunks is not None:
            oprot.writeFieldBegin('chunks', TType.LIST, 20)
            oprot.writeListBegin(TType.STRING, len(self.chunks))
            for iter298 in self.chunks:
                oprot.writeBinary(iter298)
            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.I32, 23)
            oprot.writeI32(self.readCount)
            oprot.writeFieldEnd()
        if self.relatedMessageServiceCode is not None:
            oprot.writeFieldBegin('relatedMessageServiceCode', TType.I32, 24)
            oprot.writeI32(self.relatedMessageServiceCode)
            oprot.writeFieldEnd()
        if self.personName2 is not None:
            oprot.writeFieldBegin('personName2', TType.STRING, 93)
            oprot.writeString(
                self.personName2.encode('utf-8')
                if sys.version_info[0] == 2
                else self.personName2
            )
            oprot.writeFieldEnd()
        if self.personName is not None:
            oprot.writeFieldBegin('personName', TType.STRING, 94)
            oprot.writeString(
                self.personName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.personName
            )
            oprot.writeFieldEnd()
        if self.person2 is not None:
            oprot.writeFieldBegin('person2', TType.STRING, 95)
            oprot.writeString(
                self.person2.encode('utf-8')
                if sys.version_info[0] == 2
                else self.person2
            )
            oprot.writeFieldEnd()
        if self.person is not None:
            oprot.writeFieldBegin('person', TType.STRING, 96)
            oprot.writeString(
                self.person.encode('utf-8') if sys.version_info[0] == 2 else self.person
            )
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.STRING, 97)
            oprot.writeString(
                self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type
            )
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 98)
            oprot.writeString(
                self.picturePath.encode('utf-8')
                if sys.version_info[0] == 2
                else self.picturePath
            )
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 99)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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
     - displayName
     - picturePath
     - type
     - person
     - person2
     - personName
     - personName2
     - to
     - toType
     - id
     - createdTime
     - deliveredTime
     - text
     - location
     - hasContent
     - contentType
     - contentPreview
     - contentMetadata
     - sessionId
     - chunks
     - relatedMessageId
     - messageRelationType
     - readCount
     - relatedMessageServiceCode

    """

    def __init__(
        self,
        _from=None,
        displayName=None,
        picturePath=None,
        type=None,
        person=None,
        person2=None,
        personName=None,
        personName2=None,
        to=None,
        toType=None,
        id=None,
        createdTime=None,
        deliveredTime=None,
        text=None,
        location=None,
        hasContent=None,
        contentType=None,
        contentPreview=None,
        contentMetadata=None,
        sessionId=None,
        chunks=None,
        relatedMessageId=None,
        messageRelationType=None,
        readCount=None,
        relatedMessageServiceCode=None,
    ):
        self._from = _from
        self.displayName = displayName
        self.picturePath = picturePath
        self.type = type
        self.person = person
        self.person2 = person2
        self.personName = personName
        self.personName2 = personName2
        self.to = to
        self.toType = toType
        self.id = id
        self.createdTime = createdTime
        self.deliveredTime = deliveredTime
        self.text = text
        self.location = location
        self.hasContent = hasContent
        self.contentType = contentType
        self.contentPreview = contentPreview
        self.contentMetadata = contentMetadata
        self.sessionId = sessionId
        self.chunks = chunks
        self.relatedMessageId = relatedMessageId
        self.messageRelationType = messageRelationType
        self.readCount = readCount
        self.relatedMessageServiceCode = relatedMessageServiceCode

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self._from = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 99:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 98:
                if ftype == TType.STRING:
                    self.picturePath = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 97:
                if ftype == TType.STRING:
                    self.type = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 96:
                if ftype == TType.STRING:
                    self.person = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 95:
                if ftype == TType.STRING:
                    self.person2 = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 94:
                if ftype == TType.STRING:
                    self.personName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 93:
                if ftype == TType.STRING:
                    self.personName2 = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.to = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.toType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.deliveredTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.text = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRUCT:
                    self.location = Location()
                    self.location.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.BOOL:
                    self.hasContent = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I32:
                    self.contentType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRING:
                    self.contentPreview = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 18:
                if ftype == TType.MAP:
                    self.contentMetadata = {}
                    (_ktype300, _vtype301, _size299) = iprot.readMapBegin()
                    for _i303 in range(_size299):
                        _key304 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val305 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.contentMetadata[_key304] = _val305
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 19:
                if ftype == TType.I32:
                    self.sessionId = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.LIST:
                    self.chunks = []
                    (_etype309, _size306) = iprot.readListBegin()
                    for _i310 in range(_size306):
                        _elem311 = iprot.readBinary()
                        self.chunks.append(_elem311)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRING:
                    self.relatedMessageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.I32:
                    self.messageRelationType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.I32:
                    self.readCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.I32:
                    self.relatedMessageServiceCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Message')
        if self._from is not None:
            oprot.writeFieldBegin('_from', TType.STRING, 1)
            oprot.writeString(
                self._from.encode('utf-8') if sys.version_info[0] == 2 else self._from
            )
            oprot.writeFieldEnd()
        if self.to is not None:
            oprot.writeFieldBegin('to', TType.STRING, 2)
            oprot.writeString(
                self.to.encode('utf-8') if sys.version_info[0] == 2 else self.to
            )
            oprot.writeFieldEnd()
        if self.toType is not None:
            oprot.writeFieldBegin('toType', TType.I32, 3)
            oprot.writeI32(self.toType)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.STRING, 4)
            oprot.writeString(
                self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id
            )
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 5)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.deliveredTime is not None:
            oprot.writeFieldBegin('deliveredTime', TType.I64, 6)
            oprot.writeI64(self.deliveredTime)
            oprot.writeFieldEnd()
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 10)
            oprot.writeString(
                self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text
            )
            oprot.writeFieldEnd()
        if self.location is not None:
            oprot.writeFieldBegin('location', TType.STRUCT, 11)
            self.location.write(oprot)
            oprot.writeFieldEnd()
        if self.hasContent is not None:
            oprot.writeFieldBegin('hasContent', TType.BOOL, 14)
            oprot.writeBool(self.hasContent)
            oprot.writeFieldEnd()
        if self.contentType is not None:
            oprot.writeFieldBegin('contentType', TType.I32, 15)
            oprot.writeI32(self.contentType)
            oprot.writeFieldEnd()
        if self.contentPreview is not None:
            oprot.writeFieldBegin('contentPreview', TType.STRING, 17)
            oprot.writeBinary(self.contentPreview)
            oprot.writeFieldEnd()
        if self.contentMetadata is not None:
            oprot.writeFieldBegin('contentMetadata', TType.MAP, 18)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.contentMetadata))
            for kiter312, viter313 in self.contentMetadata.items():
                oprot.writeString(
                    kiter312.encode('utf-8') if sys.version_info[0] == 2 else kiter312
                )
                oprot.writeString(
                    viter313.encode('utf-8') if sys.version_info[0] == 2 else viter313
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.sessionId is not None:
            oprot.writeFieldBegin('sessionId', TType.I32, 19)
            oprot.writeI32(self.sessionId)
            oprot.writeFieldEnd()
        if self.chunks is not None:
            oprot.writeFieldBegin('chunks', TType.LIST, 20)
            oprot.writeListBegin(TType.STRING, len(self.chunks))
            for iter314 in self.chunks:
                oprot.writeBinary(iter314)
            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.I32, 23)
            oprot.writeI32(self.readCount)
            oprot.writeFieldEnd()
        if self.relatedMessageServiceCode is not None:
            oprot.writeFieldBegin('relatedMessageServiceCode', TType.I32, 24)
            oprot.writeI32(self.relatedMessageServiceCode)
            oprot.writeFieldEnd()
        if self.personName2 is not None:
            oprot.writeFieldBegin('personName2', TType.STRING, 93)
            oprot.writeString(
                self.personName2.encode('utf-8')
                if sys.version_info[0] == 2
                else self.personName2
            )
            oprot.writeFieldEnd()
        if self.personName is not None:
            oprot.writeFieldBegin('personName', TType.STRING, 94)
            oprot.writeString(
                self.personName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.personName
            )
            oprot.writeFieldEnd()
        if self.person2 is not None:
            oprot.writeFieldBegin('person2', TType.STRING, 95)
            oprot.writeString(
                self.person2.encode('utf-8')
                if sys.version_info[0] == 2
                else self.person2
            )
            oprot.writeFieldEnd()
        if self.person is not None:
            oprot.writeFieldBegin('person', TType.STRING, 96)
            oprot.writeString(
                self.person.encode('utf-8') if sys.version_info[0] == 2 else self.person
            )
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.STRING, 97)
            oprot.writeString(
                self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type
            )
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 98)
            oprot.writeString(
                self.picturePath.encode('utf-8')
                if sys.version_info[0] == 2
                else self.picturePath
            )
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 99)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

    """

    def __init__(
        self,
        message=None,
        fromType=None,
        squareMessageRevision=None,
    ):
        self.message = message
        self.fromType = fromType
        self.squareMessageRevision = squareMessageRevision

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.message = Message()
                    self.message.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.fromType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.squareMessageRevision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareMessage')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRUCT, 1)
            self.message.write(oprot)
            oprot.writeFieldEnd()
        if self.fromType is not None:
            oprot.writeFieldBegin('fromType', TType.I32, 3)
            oprot.writeI32(self.fromType)
            oprot.writeFieldEnd()
        if self.squareMessageRevision is not None:
            oprot.writeFieldBegin('squareMessageRevision', TType.I64, 4)
            oprot.writeI64(self.squareMessageRevision)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class 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')
                        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 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')
                        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')
                        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 SquareChatMember(object):
    """
    Attributes:
     - squareMemberMid
     - squareChatMid
     - revision
     - membershipState
     - notificationForMessage

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.membershipState = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.notificationForMessage = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareChatMember')
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMemberMid
            )
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 3)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.membershipState is not None:
            oprot.writeFieldBegin('membershipState', TType.I32, 4)
            oprot.writeI32(self.membershipState)
            oprot.writeFieldEnd()
        if self.notificationForMessage is not None:
            oprot.writeFieldBegin('notificationForMessage', TType.BOOL, 5)
            oprot.writeBool(self.notificationForMessage)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SquareChatMemberSearchOption(object):
    """
    Attributes:
     - displayName

    """

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

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

    def validate(self):
        return

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

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

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


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

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.status = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.param1 = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.param2 = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.param3 = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.STRUCT:
                    self.message = Message()
                    self.message.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('MessageOperation')
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 1)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 2)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 3)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 4)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 5)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.param1 is not None:
            oprot.writeFieldBegin('param1', TType.STRING, 10)
            oprot.writeString(
                self.param1.encode('utf-8') if sys.version_info[0] == 2 else self.param1
            )
            oprot.writeFieldEnd()
        if self.param2 is not None:
            oprot.writeFieldBegin('param2', TType.STRING, 11)
            oprot.writeString(
                self.param2.encode('utf-8') if sys.version_info[0] == 2 else self.param2
            )
            oprot.writeFieldEnd()
        if self.param3 is not None:
            oprot.writeFieldBegin('param3', TType.STRING, 12)
            oprot.writeString(
                self.param3.encode('utf-8') if sys.version_info[0] == 2 else self.param3
            )
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRUCT, 20)
            self.message.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class MessageOperations(object):
    """
    Attributes:
     - operations
     - endFlag

    """

    def __init__(
        self,
        operations=None,
        endFlag=None,
    ):
        self.operations = operations
        self.endFlag = endFlag

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.operations = []
                    (_etype318, _size315) = iprot.readListBegin()
                    for _i319 in range(_size315):
                        _elem320 = MessageOperation()
                        _elem320.read(iprot)
                        self.operations.append(_elem320)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.endFlag = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('MessageOperations')
        if self.operations is not None:
            oprot.writeFieldBegin('operations', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.operations))
            for iter321 in self.operations:
                iter321.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.endFlag is not None:
            oprot.writeFieldBegin('endFlag', TType.BOOL, 2)
            oprot.writeBool(self.endFlag)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class MessageStoreResult(object):
    """
    Attributes:
     - requestId
     - messageIds

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.requestId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.messageIds = []
                    (_etype325, _size322) = iprot.readListBegin()
                    for _i326 in range(_size322):
                        _elem327 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.messageIds.append(_elem327)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('MessageStoreResult')
        if self.requestId is not None:
            oprot.writeFieldBegin('requestId', TType.STRING, 1)
            oprot.writeString(
                self.requestId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.requestId
            )
            oprot.writeFieldEnd()
        if self.messageIds is not None:
            oprot.writeFieldBegin('messageIds', TType.LIST, 2)
            oprot.writeListBegin(TType.STRING, len(self.messageIds))
            for iter328 in self.messageIds:
                oprot.writeString(
                    iter328.encode('utf-8') if sys.version_info[0] == 2 else iter328
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class MetaProfile(object):
    """
    Attributes:
     - createTime
     - regionCode
     - identities

    """

    def __init__(
        self,
        createTime=None,
        regionCode=None,
        identities=None,
    ):
        self.createTime = createTime
        self.regionCode = regionCode
        self.identities = identities

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.createTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.regionCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.identities = {}
                    (_ktype330, _vtype331, _size329) = iprot.readMapBegin()
                    for _i333 in range(_size329):
                        _key334 = iprot.readI32()
                        _val335 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.identities[_key334] = _val335
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('MetaProfile')
        if self.createTime is not None:
            oprot.writeFieldBegin('createTime', TType.I64, 1)
            oprot.writeI64(self.createTime)
            oprot.writeFieldEnd()
        if self.regionCode is not None:
            oprot.writeFieldBegin('regionCode', TType.STRING, 2)
            oprot.writeString(
                self.regionCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.regionCode
            )
            oprot.writeFieldEnd()
        if self.identities is not None:
            oprot.writeFieldBegin('identities', TType.MAP, 3)
            oprot.writeMapBegin(TType.I32, TType.STRING, len(self.identities))
            for kiter336, viter337 in self.identities.items():
                oprot.writeI32(kiter336)
                oprot.writeString(
                    viter337.encode('utf-8') if sys.version_info[0] == 2 else viter337
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class NotificationItem(object):
    """
    Attributes:
     - id
     - _from
     - to
     - fromChannel
     - toChannel
     - revision
     - createdTime
     - content

    """

    def __init__(
        self,
        id=None,
        _from=None,
        to=None,
        fromChannel=None,
        toChannel=None,
        revision=None,
        createdTime=None,
        content=None,
    ):
        self.id = id
        self._from = _from
        self.to = to
        self.fromChannel = fromChannel
        self.toChannel = toChannel
        self.revision = revision
        self.createdTime = createdTime
        self.content = content

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self._from = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.to = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.fromChannel = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.toChannel = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.MAP:
                    self.content = {}
                    (_ktype339, _vtype340, _size338) = iprot.readMapBegin()
                    for _i342 in range(_size338):
                        _key343 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val344 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.content[_key343] = _val344
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('NotificationItem')
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.STRING, 1)
            oprot.writeString(
                self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id
            )
            oprot.writeFieldEnd()
        if self._from is not None:
            oprot.writeFieldBegin('_from', TType.STRING, 2)
            oprot.writeString(
                self._from.encode('utf-8') if sys.version_info[0] == 2 else self._from
            )
            oprot.writeFieldEnd()
        if self.to is not None:
            oprot.writeFieldBegin('to', TType.STRING, 3)
            oprot.writeString(
                self.to.encode('utf-8') if sys.version_info[0] == 2 else self.to
            )
            oprot.writeFieldEnd()
        if self.fromChannel is not None:
            oprot.writeFieldBegin('fromChannel', TType.STRING, 4)
            oprot.writeString(
                self.fromChannel.encode('utf-8')
                if sys.version_info[0] == 2
                else self.fromChannel
            )
            oprot.writeFieldEnd()
        if self.toChannel is not None:
            oprot.writeFieldBegin('toChannel', TType.STRING, 5)
            oprot.writeString(
                self.toChannel.encode('utf-8')
                if sys.version_info[0] == 2
                else self.toChannel
            )
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 7)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 8)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.content is not None:
            oprot.writeFieldBegin('content', TType.MAP, 9)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.content))
            for kiter345, viter346 in self.content.items():
                oprot.writeString(
                    kiter345.encode('utf-8') if sys.version_info[0] == 2 else kiter345
                )
                oprot.writeString(
                    viter346.encode('utf-8') if sys.version_info[0] == 2 else viter346
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class NotificationFetchResult(object):
    """
    Attributes:
     - fetchMode
     - itemList

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.fetchMode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.itemList = []
                    (_etype350, _size347) = iprot.readListBegin()
                    for _i351 in range(_size347):
                        _elem352 = NotificationItem()
                        _elem352.read(iprot)
                        self.itemList.append(_elem352)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('NotificationFetchResult')
        if self.fetchMode is not None:
            oprot.writeFieldBegin('fetchMode', TType.I32, 1)
            oprot.writeI32(self.fetchMode)
            oprot.writeFieldEnd()
        if self.itemList is not None:
            oprot.writeFieldBegin('itemList', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.itemList))
            for iter353 in self.itemList:
                iter353.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.checksum = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.status = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.param1 = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.param2 = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.param3 = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.STRUCT:
                    self.message = Message()
                    self.message.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Operation')
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 1)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 2)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 3)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 4)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.checksum is not None:
            oprot.writeFieldBegin('checksum', TType.STRING, 5)
            oprot.writeString(
                self.checksum.encode('utf-8')
                if sys.version_info[0] == 2
                else self.checksum
            )
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 7)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.param1 is not None:
            oprot.writeFieldBegin('param1', TType.STRING, 10)
            oprot.writeString(
                self.param1.encode('utf-8') if sys.version_info[0] == 2 else self.param1
            )
            oprot.writeFieldEnd()
        if self.param2 is not None:
            oprot.writeFieldBegin('param2', TType.STRING, 11)
            oprot.writeString(
                self.param2.encode('utf-8') if sys.version_info[0] == 2 else self.param2
            )
            oprot.writeFieldEnd()
        if self.param3 is not None:
            oprot.writeFieldBegin('param3', TType.STRING, 12)
            oprot.writeString(
                self.param3.encode('utf-8') if sys.version_info[0] == 2 else self.param3
            )
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRUCT, 20)
            self.message.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaymentReservation(object):
    """
    Attributes:
     - receiverMid
     - productId
     - language
     - location
     - currency
     - price
     - appStoreCode
     - messageText
     - messageTemplate
     - packageId

    """

    def __init__(
        self,
        receiverMid=None,
        productId=None,
        language=None,
        location=None,
        currency=None,
        price=None,
        appStoreCode=None,
        messageText=None,
        messageTemplate=None,
        packageId=None,
    ):
        self.receiverMid = receiverMid
        self.productId = productId
        self.language = language
        self.location = location
        self.currency = currency
        self.price = price
        self.appStoreCode = appStoreCode
        self.messageText = messageText
        self.messageTemplate = messageTemplate
        self.packageId = packageId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.receiverMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.productId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.language = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.location = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.currency = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.price = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.appStoreCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.messageText = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I32:
                    self.messageTemplate = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I64:
                    self.packageId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaymentReservation')
        if self.receiverMid is not None:
            oprot.writeFieldBegin('receiverMid', TType.STRING, 1)
            oprot.writeString(
                self.receiverMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.receiverMid
            )
            oprot.writeFieldEnd()
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 2)
            oprot.writeString(
                self.productId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productId
            )
            oprot.writeFieldEnd()
        if self.language is not None:
            oprot.writeFieldBegin('language', TType.STRING, 3)
            oprot.writeString(
                self.language.encode('utf-8')
                if sys.version_info[0] == 2
                else self.language
            )
            oprot.writeFieldEnd()
        if self.location is not None:
            oprot.writeFieldBegin('location', TType.STRING, 4)
            oprot.writeString(
                self.location.encode('utf-8')
                if sys.version_info[0] == 2
                else self.location
            )
            oprot.writeFieldEnd()
        if self.currency is not None:
            oprot.writeFieldBegin('currency', TType.STRING, 5)
            oprot.writeString(
                self.currency.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currency
            )
            oprot.writeFieldEnd()
        if self.price is not None:
            oprot.writeFieldBegin('price', TType.STRING, 6)
            oprot.writeString(
                self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price
            )
            oprot.writeFieldEnd()
        if self.appStoreCode is not None:
            oprot.writeFieldBegin('appStoreCode', TType.I32, 7)
            oprot.writeI32(self.appStoreCode)
            oprot.writeFieldEnd()
        if self.messageText is not None:
            oprot.writeFieldBegin('messageText', TType.STRING, 8)
            oprot.writeString(
                self.messageText.encode('utf-8')
                if sys.version_info[0] == 2
                else self.messageText
            )
            oprot.writeFieldEnd()
        if self.messageTemplate is not None:
            oprot.writeFieldBegin('messageTemplate', TType.I32, 9)
            oprot.writeI32(self.messageTemplate)
            oprot.writeFieldEnd()
        if self.packageId is not None:
            oprot.writeFieldBegin('packageId', TType.I64, 10)
            oprot.writeI64(self.packageId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class PaymentReservationResult(object):
    """
    Attributes:
     - orderId
     - confirmUrl
     - extras

    """

    def __init__(
        self,
        orderId=None,
        confirmUrl=None,
        extras=None,
    ):
        self.orderId = orderId
        self.confirmUrl = confirmUrl
        self.extras = extras

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.orderId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.confirmUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.extras = {}
                    (_ktype355, _vtype356, _size354) = iprot.readMapBegin()
                    for _i358 in range(_size354):
                        _key359 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val360 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.extras[_key359] = _val360
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PaymentReservationResult')
        if self.orderId is not None:
            oprot.writeFieldBegin('orderId', TType.STRING, 1)
            oprot.writeString(
                self.orderId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.orderId
            )
            oprot.writeFieldEnd()
        if self.confirmUrl is not None:
            oprot.writeFieldBegin('confirmUrl', TType.STRING, 2)
            oprot.writeString(
                self.confirmUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.confirmUrl
            )
            oprot.writeFieldEnd()
        if self.extras is not None:
            oprot.writeFieldBegin('extras', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extras))
            for kiter361, viter362 in self.extras.items():
                oprot.writeString(
                    kiter361.encode('utf-8') if sys.version_info[0] == 2 else kiter361
                )
                oprot.writeString(
                    viter362.encode('utf-8') if sys.version_info[0] == 2 else viter362
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class Product(object):
    """
    Attributes:
     - productId
     - packageId
     - version
     - authorName
     - onSale
     - validDays
     - saleType
     - copyright
     - title
     - descriptionText
     - shopOrderId
     - fromMid
     - toMid
     - validUntil
     - priceTier
     - price
     - currency
     - currencySymbol
     - paymentType
     - createDate
     - ownFlag
     - eventType
     - urlSchema
     - downloadUrl
     - buddyMid
     - publishSince
     - newFlag
     - missionFlag
     - categories
     - missionButtonText
     - missionShortDescription
     - authorId
     - grantedByDefault
     - displayOrder
     - availableForPresent
     - availableForMyself
     - hasAnimation
     - hasSound
     - recommendationsEnabled
     - stickerResourceType

    """

    def __init__(
        self,
        productId=None,
        packageId=None,
        version=None,
        authorName=None,
        onSale=None,
        validDays=None,
        saleType=None,
        copyright=None,
        title=None,
        descriptionText=None,
        shopOrderId=None,
        fromMid=None,
        toMid=None,
        validUntil=None,
        priceTier=None,
        price=None,
        currency=None,
        currencySymbol=None,
        paymentType=None,
        createDate=None,
        ownFlag=None,
        eventType=None,
        urlSchema=None,
        downloadUrl=None,
        buddyMid=None,
        publishSince=None,
        newFlag=None,
        missionFlag=None,
        categories=None,
        missionButtonText=None,
        missionShortDescription=None,
        authorId=None,
        grantedByDefault=None,
        displayOrder=None,
        availableForPresent=None,
        availableForMyself=None,
        hasAnimation=None,
        hasSound=None,
        recommendationsEnabled=None,
        stickerResourceType=None,
    ):
        self.productId = productId
        self.packageId = packageId
        self.version = version
        self.authorName = authorName
        self.onSale = onSale
        self.validDays = validDays
        self.saleType = saleType
        self.copyright = copyright
        self.title = title
        self.descriptionText = descriptionText
        self.shopOrderId = shopOrderId
        self.fromMid = fromMid
        self.toMid = toMid
        self.validUntil = validUntil
        self.priceTier = priceTier
        self.price = price
        self.currency = currency
        self.currencySymbol = currencySymbol
        self.paymentType = paymentType
        self.createDate = createDate
        self.ownFlag = ownFlag
        self.eventType = eventType
        self.urlSchema = urlSchema
        self.downloadUrl = downloadUrl
        self.buddyMid = buddyMid
        self.publishSince = publishSince
        self.newFlag = newFlag
        self.missionFlag = missionFlag
        self.categories = categories
        self.missionButtonText = missionButtonText
        self.missionShortDescription = missionShortDescription
        self.authorId = authorId
        self.grantedByDefault = grantedByDefault
        self.displayOrder = displayOrder
        self.availableForPresent = availableForPresent
        self.availableForMyself = availableForMyself
        self.hasAnimation = hasAnimation
        self.hasSound = hasSound
        self.recommendationsEnabled = recommendationsEnabled
        self.stickerResourceType = stickerResourceType

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.productId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.packageId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.version = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.authorName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.onSale = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.validDays = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.saleType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.copyright = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.title = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.descriptionText = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.shopOrderId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.fromMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRING:
                    self.toMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.I64:
                    self.validUntil = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I32:
                    self.priceTier = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.STRING:
                    self.price = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRING:
                    self.currency = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 18:
                if ftype == TType.STRING:
                    self.currencySymbol = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 19:
                if ftype == TType.I32:
                    self.paymentType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.I64:
                    self.createDate = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.BOOL:
                    self.ownFlag = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.I32:
                    self.eventType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.STRING:
                    self.urlSchema = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.STRING:
                    self.downloadUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 25:
                if ftype == TType.STRING:
                    self.buddyMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 26:
                if ftype == TType.I64:
                    self.publishSince = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 27:
                if ftype == TType.BOOL:
                    self.newFlag = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 28:
                if ftype == TType.BOOL:
                    self.missionFlag = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 29:
                if ftype == TType.LIST:
                    self.categories = []
                    (_etype366, _size363) = iprot.readListBegin()
                    for _i367 in range(_size363):
                        _elem368 = ProductCategory()
                        _elem368.read(iprot)
                        self.categories.append(_elem368)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 30:
                if ftype == TType.STRING:
                    self.missionButtonText = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 31:
                if ftype == TType.STRING:
                    self.missionShortDescription = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 32:
                if ftype == TType.STRING:
                    self.authorId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 41:
                if ftype == TType.BOOL:
                    self.grantedByDefault = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 42:
                if ftype == TType.I32:
                    self.displayOrder = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 43:
                if ftype == TType.BOOL:
                    self.availableForPresent = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 44:
                if ftype == TType.BOOL:
                    self.availableForMyself = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 51:
                if ftype == TType.BOOL:
                    self.hasAnimation = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 52:
                if ftype == TType.BOOL:
                    self.hasSound = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 53:
                if ftype == TType.BOOL:
                    self.recommendationsEnabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 54:
                if ftype == TType.I32:
                    self.stickerResourceType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Product')
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 1)
            oprot.writeString(
                self.productId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productId
            )
            oprot.writeFieldEnd()
        if self.packageId is not None:
            oprot.writeFieldBegin('packageId', TType.I64, 2)
            oprot.writeI64(self.packageId)
            oprot.writeFieldEnd()
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.I32, 3)
            oprot.writeI32(self.version)
            oprot.writeFieldEnd()
        if self.authorName is not None:
            oprot.writeFieldBegin('authorName', TType.STRING, 4)
            oprot.writeString(
                self.authorName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authorName
            )
            oprot.writeFieldEnd()
        if self.onSale is not None:
            oprot.writeFieldBegin('onSale', TType.BOOL, 5)
            oprot.writeBool(self.onSale)
            oprot.writeFieldEnd()
        if self.validDays is not None:
            oprot.writeFieldBegin('validDays', TType.I32, 6)
            oprot.writeI32(self.validDays)
            oprot.writeFieldEnd()
        if self.saleType is not None:
            oprot.writeFieldBegin('saleType', TType.I32, 7)
            oprot.writeI32(self.saleType)
            oprot.writeFieldEnd()
        if self.copyright is not None:
            oprot.writeFieldBegin('copyright', TType.STRING, 8)
            oprot.writeString(
                self.copyright.encode('utf-8')
                if sys.version_info[0] == 2
                else self.copyright
            )
            oprot.writeFieldEnd()
        if self.title is not None:
            oprot.writeFieldBegin('title', TType.STRING, 9)
            oprot.writeString(
                self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title
            )
            oprot.writeFieldEnd()
        if self.descriptionText is not None:
            oprot.writeFieldBegin('descriptionText', TType.STRING, 10)
            oprot.writeString(
                self.descriptionText.encode('utf-8')
                if sys.version_info[0] == 2
                else self.descriptionText
            )
            oprot.writeFieldEnd()
        if self.shopOrderId is not None:
            oprot.writeFieldBegin('shopOrderId', TType.I64, 11)
            oprot.writeI64(self.shopOrderId)
            oprot.writeFieldEnd()
        if self.fromMid is not None:
            oprot.writeFieldBegin('fromMid', TType.STRING, 12)
            oprot.writeString(
                self.fromMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.fromMid
            )
            oprot.writeFieldEnd()
        if self.toMid is not None:
            oprot.writeFieldBegin('toMid', TType.STRING, 13)
            oprot.writeString(
                self.toMid.encode('utf-8') if sys.version_info[0] == 2 else self.toMid
            )
            oprot.writeFieldEnd()
        if self.validUntil is not None:
            oprot.writeFieldBegin('validUntil', TType.I64, 14)
            oprot.writeI64(self.validUntil)
            oprot.writeFieldEnd()
        if self.priceTier is not None:
            oprot.writeFieldBegin('priceTier', TType.I32, 15)
            oprot.writeI32(self.priceTier)
            oprot.writeFieldEnd()
        if self.price is not None:
            oprot.writeFieldBegin('price', TType.STRING, 16)
            oprot.writeString(
                self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price
            )
            oprot.writeFieldEnd()
        if self.currency is not None:
            oprot.writeFieldBegin('currency', TType.STRING, 17)
            oprot.writeString(
                self.currency.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currency
            )
            oprot.writeFieldEnd()
        if self.currencySymbol is not None:
            oprot.writeFieldBegin('currencySymbol', TType.STRING, 18)
            oprot.writeString(
                self.currencySymbol.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currencySymbol
            )
            oprot.writeFieldEnd()
        if self.paymentType is not None:
            oprot.writeFieldBegin('paymentType', TType.I32, 19)
            oprot.writeI32(self.paymentType)
            oprot.writeFieldEnd()
        if self.createDate is not None:
            oprot.writeFieldBegin('createDate', TType.I64, 20)
            oprot.writeI64(self.createDate)
            oprot.writeFieldEnd()
        if self.ownFlag is not None:
            oprot.writeFieldBegin('ownFlag', TType.BOOL, 21)
            oprot.writeBool(self.ownFlag)
            oprot.writeFieldEnd()
        if self.eventType is not None:
            oprot.writeFieldBegin('eventType', TType.I32, 22)
            oprot.writeI32(self.eventType)
            oprot.writeFieldEnd()
        if self.urlSchema is not None:
            oprot.writeFieldBegin('urlSchema', TType.STRING, 23)
            oprot.writeString(
                self.urlSchema.encode('utf-8')
                if sys.version_info[0] == 2
                else self.urlSchema
            )
            oprot.writeFieldEnd()
        if self.downloadUrl is not None:
            oprot.writeFieldBegin('downloadUrl', TType.STRING, 24)
            oprot.writeString(
                self.downloadUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.downloadUrl
            )
            oprot.writeFieldEnd()
        if self.buddyMid is not None:
            oprot.writeFieldBegin('buddyMid', TType.STRING, 25)
            oprot.writeString(
                self.buddyMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.buddyMid
            )
            oprot.writeFieldEnd()
        if self.publishSince is not None:
            oprot.writeFieldBegin('publishSince', TType.I64, 26)
            oprot.writeI64(self.publishSince)
            oprot.writeFieldEnd()
        if self.newFlag is not None:
            oprot.writeFieldBegin('newFlag', TType.BOOL, 27)
            oprot.writeBool(self.newFlag)
            oprot.writeFieldEnd()
        if self.missionFlag is not None:
            oprot.writeFieldBegin('missionFlag', TType.BOOL, 28)
            oprot.writeBool(self.missionFlag)
            oprot.writeFieldEnd()
        if self.categories is not None:
            oprot.writeFieldBegin('categories', TType.LIST, 29)
            oprot.writeListBegin(TType.STRUCT, len(self.categories))
            for iter369 in self.categories:
                iter369.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.missionButtonText is not None:
            oprot.writeFieldBegin('missionButtonText', TType.STRING, 30)
            oprot.writeString(
                self.missionButtonText.encode('utf-8')
                if sys.version_info[0] == 2
                else self.missionButtonText
            )
            oprot.writeFieldEnd()
        if self.missionShortDescription is not None:
            oprot.writeFieldBegin('missionShortDescription', TType.STRING, 31)
            oprot.writeString(
                self.missionShortDescription.encode('utf-8')
                if sys.version_info[0] == 2
                else self.missionShortDescription
            )
            oprot.writeFieldEnd()
        if self.authorId is not None:
            oprot.writeFieldBegin('authorId', TType.STRING, 32)
            oprot.writeString(
                self.authorId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authorId
            )
            oprot.writeFieldEnd()
        if self.grantedByDefault is not None:
            oprot.writeFieldBegin('grantedByDefault', TType.BOOL, 41)
            oprot.writeBool(self.grantedByDefault)
            oprot.writeFieldEnd()
        if self.displayOrder is not None:
            oprot.writeFieldBegin('displayOrder', TType.I32, 42)
            oprot.writeI32(self.displayOrder)
            oprot.writeFieldEnd()
        if self.availableForPresent is not None:
            oprot.writeFieldBegin('availableForPresent', TType.BOOL, 43)
            oprot.writeBool(self.availableForPresent)
            oprot.writeFieldEnd()
        if self.availableForMyself is not None:
            oprot.writeFieldBegin('availableForMyself', TType.BOOL, 44)
            oprot.writeBool(self.availableForMyself)
            oprot.writeFieldEnd()
        if self.hasAnimation is not None:
            oprot.writeFieldBegin('hasAnimation', TType.BOOL, 51)
            oprot.writeBool(self.hasAnimation)
            oprot.writeFieldEnd()
        if self.hasSound is not None:
            oprot.writeFieldBegin('hasSound', TType.BOOL, 52)
            oprot.writeBool(self.hasSound)
            oprot.writeFieldEnd()
        if self.recommendationsEnabled is not None:
            oprot.writeFieldBegin('recommendationsEnabled', TType.BOOL, 53)
            oprot.writeBool(self.recommendationsEnabled)
            oprot.writeFieldEnd()
        if self.stickerResourceType is not None:
            oprot.writeFieldBegin('stickerResourceType', TType.I32, 54)
            oprot.writeI32(self.stickerResourceType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ProductList(object):
    """
    Attributes:
     - hasNext
     - bannerSequence
     - bannerTargetType
     - bannerTargetPath
     - productList
     - bannerLang

    """

    def __init__(
        self,
        hasNext=None,
        bannerSequence=None,
        bannerTargetType=None,
        bannerTargetPath=None,
        productList=None,
        bannerLang=None,
    ):
        self.hasNext = hasNext
        self.bannerSequence = bannerSequence
        self.bannerTargetType = bannerTargetType
        self.bannerTargetPath = bannerTargetPath
        self.productList = productList
        self.bannerLang = bannerLang

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.hasNext = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.bannerSequence = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.bannerTargetType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.bannerTargetPath = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.LIST:
                    self.productList = []
                    (_etype373, _size370) = iprot.readListBegin()
                    for _i374 in range(_size370):
                        _elem375 = Product()
                        _elem375.read(iprot)
                        self.productList.append(_elem375)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.bannerLang = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ProductList')
        if self.hasNext is not None:
            oprot.writeFieldBegin('hasNext', TType.BOOL, 1)
            oprot.writeBool(self.hasNext)
            oprot.writeFieldEnd()
        if self.bannerSequence is not None:
            oprot.writeFieldBegin('bannerSequence', TType.I64, 4)
            oprot.writeI64(self.bannerSequence)
            oprot.writeFieldEnd()
        if self.bannerTargetType is not None:
            oprot.writeFieldBegin('bannerTargetType', TType.I32, 5)
            oprot.writeI32(self.bannerTargetType)
            oprot.writeFieldEnd()
        if self.bannerTargetPath is not None:
            oprot.writeFieldBegin('bannerTargetPath', TType.STRING, 6)
            oprot.writeString(
                self.bannerTargetPath.encode('utf-8')
                if sys.version_info[0] == 2
                else self.bannerTargetPath
            )
            oprot.writeFieldEnd()
        if self.productList is not None:
            oprot.writeFieldBegin('productList', TType.LIST, 7)
            oprot.writeListBegin(TType.STRUCT, len(self.productList))
            for iter376 in self.productList:
                iter376.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.bannerLang is not None:
            oprot.writeFieldBegin('bannerLang', TType.STRING, 8)
            oprot.writeString(
                self.bannerLang.encode('utf-8')
                if sys.version_info[0] == 2
                else self.bannerLang
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class StickerIdRange(object):
    """
    Attributes:
     - start
     - size

    """

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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('StickerIdRange')
        if self.start is not None:
            oprot.writeFieldBegin('start', TType.I64, 1)
            oprot.writeI64(self.start)
            oprot.writeFieldEnd()
        if self.size is not None:
            oprot.writeFieldBegin('size', TType.I32, 2)
            oprot.writeI32(self.size)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ProductSimple(object):
    """
    Attributes:
     - productId
     - packageId
     - version
     - onSale
     - validUntil
     - stickerIdRanges
     - grantedByDefault
     - displayOrder

    """

    def __init__(
        self,
        productId=None,
        packageId=None,
        version=None,
        onSale=None,
        validUntil=None,
        stickerIdRanges=None,
        grantedByDefault=None,
        displayOrder=None,
    ):
        self.productId = productId
        self.packageId = packageId
        self.version = version
        self.onSale = onSale
        self.validUntil = validUntil
        self.stickerIdRanges = stickerIdRanges
        self.grantedByDefault = grantedByDefault
        self.displayOrder = displayOrder

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.productId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.packageId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.version = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.onSale = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.validUntil = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.LIST:
                    self.stickerIdRanges = []
                    (_etype380, _size377) = iprot.readListBegin()
                    for _i381 in range(_size377):
                        _elem382 = StickerIdRange()
                        _elem382.read(iprot)
                        self.stickerIdRanges.append(_elem382)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 41:
                if ftype == TType.BOOL:
                    self.grantedByDefault = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 42:
                if ftype == TType.I32:
                    self.displayOrder = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ProductSimple')
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 1)
            oprot.writeString(
                self.productId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productId
            )
            oprot.writeFieldEnd()
        if self.packageId is not None:
            oprot.writeFieldBegin('packageId', TType.I64, 2)
            oprot.writeI64(self.packageId)
            oprot.writeFieldEnd()
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.I32, 3)
            oprot.writeI32(self.version)
            oprot.writeFieldEnd()
        if self.onSale is not None:
            oprot.writeFieldBegin('onSale', TType.BOOL, 4)
            oprot.writeBool(self.onSale)
            oprot.writeFieldEnd()
        if self.validUntil is not None:
            oprot.writeFieldBegin('validUntil', TType.I64, 5)
            oprot.writeI64(self.validUntil)
            oprot.writeFieldEnd()
        if self.stickerIdRanges is not None:
            oprot.writeFieldBegin('stickerIdRanges', TType.LIST, 10)
            oprot.writeListBegin(TType.STRUCT, len(self.stickerIdRanges))
            for iter383 in self.stickerIdRanges:
                iter383.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.grantedByDefault is not None:
            oprot.writeFieldBegin('grantedByDefault', TType.BOOL, 41)
            oprot.writeBool(self.grantedByDefault)
            oprot.writeFieldEnd()
        if self.displayOrder is not None:
            oprot.writeFieldBegin('displayOrder', TType.I32, 42)
            oprot.writeI32(self.displayOrder)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ProductSimpleList(object):
    """
    Attributes:
     - hasNext
     - reinvokeHour
     - lastVersionSeq
     - productList
     - recentNewReleaseDate
     - recentEventReleaseDate

    """

    def __init__(
        self,
        hasNext=None,
        reinvokeHour=None,
        lastVersionSeq=None,
        productList=None,
        recentNewReleaseDate=None,
        recentEventReleaseDate=None,
    ):
        self.hasNext = hasNext
        self.reinvokeHour = reinvokeHour
        self.lastVersionSeq = lastVersionSeq
        self.productList = productList
        self.recentNewReleaseDate = recentNewReleaseDate
        self.recentEventReleaseDate = recentEventReleaseDate

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.hasNext = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.reinvokeHour = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.lastVersionSeq = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.productList = []
                    (_etype387, _size384) = iprot.readListBegin()
                    for _i388 in range(_size384):
                        _elem389 = ProductSimple()
                        _elem389.read(iprot)
                        self.productList.append(_elem389)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.recentNewReleaseDate = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.recentEventReleaseDate = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ProductSimpleList')
        if self.hasNext is not None:
            oprot.writeFieldBegin('hasNext', TType.BOOL, 1)
            oprot.writeBool(self.hasNext)
            oprot.writeFieldEnd()
        if self.reinvokeHour is not None:
            oprot.writeFieldBegin('reinvokeHour', TType.I32, 2)
            oprot.writeI32(self.reinvokeHour)
            oprot.writeFieldEnd()
        if self.lastVersionSeq is not None:
            oprot.writeFieldBegin('lastVersionSeq', TType.I64, 3)
            oprot.writeI64(self.lastVersionSeq)
            oprot.writeFieldEnd()
        if self.productList is not None:
            oprot.writeFieldBegin('productList', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.productList))
            for iter390 in self.productList:
                iter390.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.recentNewReleaseDate is not None:
            oprot.writeFieldBegin('recentNewReleaseDate', TType.I64, 5)
            oprot.writeI64(self.recentNewReleaseDate)
            oprot.writeFieldEnd()
        if self.recentEventReleaseDate is not None:
            oprot.writeFieldBegin('recentEventReleaseDate', TType.I64, 6)
            oprot.writeI64(self.recentEventReleaseDate)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.userid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.phone = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.email = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.regionCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRING:
                    self.phoneticName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.pictureStatus = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.STRING:
                    self.thumbnailUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.STRING:
                    self.statusMessage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 31:
                if ftype == TType.BOOL:
                    self.allowSearchByUserid = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 32:
                if ftype == TType.BOOL:
                    self.allowSearchByEmail = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 33:
                if ftype == TType.STRING:
                    self.picturePath = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 34:
                if ftype == TType.STRING:
                    self.musicProfile = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 35:
                if ftype == TType.STRING:
                    self.videoProfile = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Profile')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.userid is not None:
            oprot.writeFieldBegin('userid', TType.STRING, 3)
            oprot.writeString(
                self.userid.encode('utf-8') if sys.version_info[0] == 2 else self.userid
            )
            oprot.writeFieldEnd()
        if self.phone is not None:
            oprot.writeFieldBegin('phone', TType.STRING, 10)
            oprot.writeString(
                self.phone.encode('utf-8') if sys.version_info[0] == 2 else self.phone
            )
            oprot.writeFieldEnd()
        if self.email is not None:
            oprot.writeFieldBegin('email', TType.STRING, 11)
            oprot.writeString(
                self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email
            )
            oprot.writeFieldEnd()
        if self.regionCode is not None:
            oprot.writeFieldBegin('regionCode', TType.STRING, 12)
            oprot.writeString(
                self.regionCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.regionCode
            )
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 20)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        if self.phoneticName is not None:
            oprot.writeFieldBegin('phoneticName', TType.STRING, 21)
            oprot.writeString(
                self.phoneticName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.phoneticName
            )
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 22)
            oprot.writeString(
                self.pictureStatus.encode('utf-8')
                if sys.version_info[0] == 2
                else self.pictureStatus
            )
            oprot.writeFieldEnd()
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 23)
            oprot.writeString(
                self.thumbnailUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.thumbnailUrl
            )
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 24)
            oprot.writeString(
                self.statusMessage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.statusMessage
            )
            oprot.writeFieldEnd()
        if self.allowSearchByUserid is not None:
            oprot.writeFieldBegin('allowSearchByUserid', TType.BOOL, 31)
            oprot.writeBool(self.allowSearchByUserid)
            oprot.writeFieldEnd()
        if self.allowSearchByEmail is not None:
            oprot.writeFieldBegin('allowSearchByEmail', TType.BOOL, 32)
            oprot.writeBool(self.allowSearchByEmail)
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 33)
            oprot.writeString(
                self.picturePath.encode('utf-8')
                if sys.version_info[0] == 2
                else self.picturePath
            )
            oprot.writeFieldEnd()
        if self.musicProfile is not None:
            oprot.writeFieldBegin('musicProfile', TType.STRING, 34)
            oprot.writeString(
                self.musicProfile.encode('utf-8')
                if sys.version_info[0] == 2
                else self.musicProfile
            )
            oprot.writeFieldEnd()
        if self.videoProfile is not None:
            oprot.writeFieldBegin('videoProfile', TType.STRING, 35)
            oprot.writeString(
                self.videoProfile.encode('utf-8')
                if sys.version_info[0] == 2
                else self.videoProfile
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class ProximityMatchCandidateResult(object):
    """
    Attributes:
     - users
     - buddies

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.users = []
                    (_etype394, _size391) = iprot.readListBegin()
                    for _i395 in range(_size391):
                        _elem396 = Contact()
                        _elem396.read(iprot)
                        self.users.append(_elem396)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.buddies = []
                    (_etype400, _size397) = iprot.readListBegin()
                    for _i401 in range(_size397):
                        _elem402 = Contact()
                        _elem402.read(iprot)
                        self.buddies.append(_elem402)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ProximityMatchCandidateResult')
        if self.users is not None:
            oprot.writeFieldBegin('users', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.users))
            for iter403 in self.users:
                iter403.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.buddies is not None:
            oprot.writeFieldBegin('buddies', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.buddies))
            for iter404 in self.buddies:
                iter404.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class RegisterWithSnsIdResult(object):
    """
    Attributes:
     - authToken
     - userCreated

    """

    def __init__(
        self,
        authToken=None,
        userCreated=None,
    ):
        self.authToken = authToken
        self.userCreated = userCreated

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.authToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.userCreated = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('RegisterWithSnsIdResult')
        if self.authToken is not None:
            oprot.writeFieldBegin('authToken', TType.STRING, 1)
            oprot.writeString(
                self.authToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authToken
            )
            oprot.writeFieldEnd()
        if self.userCreated is not None:
            oprot.writeFieldBegin('userCreated', TType.BOOL, 2)
            oprot.writeBool(self.userCreated)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class RequestTokenResponse(object):
    """
    Attributes:
     - requestToken
     - returnUrl

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.requestToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.returnUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('RequestTokenResponse')
        if self.requestToken is not None:
            oprot.writeFieldBegin('requestToken', TType.STRING, 1)
            oprot.writeString(
                self.requestToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.requestToken
            )
            oprot.writeFieldEnd()
        if self.returnUrl is not None:
            oprot.writeFieldBegin('returnUrl', TType.STRING, 2)
            oprot.writeString(
                self.returnUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.returnUrl
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.LIST:
                    self.contacts = []
                    (_etype408, _size405) = iprot.readListBegin()
                    for _i409 in range(_size405):
                        _elem410 = Contact()
                        _elem410.read(iprot)
                        self.contacts.append(_elem410)
                    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 = []
                    (_etype414, _size411) = iprot.readListBegin()
                    for _i415 in range(_size411):
                        _elem416 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.memberMids.append(_elem416)
                    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 iter417 in self.contacts:
                iter417.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 iter418 in self.memberMids:
                oprot.writeString(
                    iter418.encode('utf-8') if sys.version_info[0] == 2 else iter418
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SuggestDictionary(object):
    """
    Attributes:
     - language
     - name

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.language = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SuggestDictionary')
        if self.language is not None:
            oprot.writeFieldBegin('language', TType.STRING, 1)
            oprot.writeString(
                self.language.encode('utf-8')
                if sys.version_info[0] == 2
                else self.language
            )
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class SuggestItemDictionaryIncrement(object):
    """
    Attributes:
     - status
     - revision
     - scheme
     - data

    """

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

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.status = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.scheme = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.data = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SuggestItemDictionaryIncrement')
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 1)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 2)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.scheme is not None:
            oprot.writeFieldBegin('scheme', TType.STRING, 3)
            oprot.writeString(
                self.scheme.encode('utf-8') if sys.version_info[0] == 2 else self.scheme
            )
            oprot.writeFieldEnd()
        if self.data is not None:
            oprot.writeFieldBegin('data', TType.STRING, 4)
            oprot.writeBinary(self.data)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

    def __ne__(self, other):
        return not (self == other)


class SuggestTagDictionaryIncrement(object):
    """
    Attributes:
     - status
     - language
     - revision
     - scheme
     - data

    """

    def __init__(
        self,
        status=None,
        language=None,
        revision=None,
        scheme=None,
        data=None,
    ):
        self.status = status
        self.language = language
        self.revision = revision
        self.scheme = scheme
        self.data = data

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.status = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.language = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.scheme = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.data = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SuggestTagDictionaryIncrement')
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 1)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.language is not None:
            oprot.writeFieldBegin('language', TType.STRING, 2)
            oprot.writeString(
                self.language.encode('utf-8')
                if sys.version_info[0] == 2
                else self.language
            )
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 3)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.scheme is not None:
            oprot.writeFieldBegin('scheme', TType.STRING, 4)
            oprot.writeString(
                self.scheme.encode('utf-8') if sys.version_info[0] == 2 else self.scheme
            )
            oprot.writeFieldEnd()
        if self.data is not None:
            oprot.writeFieldBegin('data', TType.STRING, 5)
            oprot.writeBinary(self.data)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SuggestDictionaryIncrements(object):
    """
    Attributes:
     - itemIncrement
     - tagIncrements

    """

    def __init__(
        self,
        itemIncrement=None,
        tagIncrements=None,
    ):
        self.itemIncrement = itemIncrement
        self.tagIncrements = tagIncrements

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.itemIncrement = SuggestItemDictionaryIncrement()
                    self.itemIncrement.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.tagIncrements = []
                    (_etype422, _size419) = iprot.readListBegin()
                    for _i423 in range(_size419):
                        _elem424 = SuggestTagDictionaryIncrement()
                        _elem424.read(iprot)
                        self.tagIncrements.append(_elem424)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SuggestDictionaryIncrements')
        if self.itemIncrement is not None:
            oprot.writeFieldBegin('itemIncrement', TType.STRUCT, 1)
            self.itemIncrement.write(oprot)
            oprot.writeFieldEnd()
        if self.tagIncrements is not None:
            oprot.writeFieldBegin('tagIncrements', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.tagIncrements))
            for iter425 in self.tagIncrements:
                iter425.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SuggestItemDictionaryRevision(object):
    """
    Attributes:
     - revision
     - scheme

    """

    def __init__(
        self,
        revision=None,
        scheme=None,
    ):
        self.revision = revision
        self.scheme = scheme

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.scheme = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SuggestItemDictionaryRevision')
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 1)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.scheme is not None:
            oprot.writeFieldBegin('scheme', TType.STRING, 2)
            oprot.writeString(
                self.scheme.encode('utf-8') if sys.version_info[0] == 2 else self.scheme
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SuggestTagDictionaryRevision(object):
    """
    Attributes:
     - language
     - revision
     - scheme

    """

    def __init__(
        self,
        language=None,
        revision=None,
        scheme=None,
    ):
        self.language = language
        self.revision = revision
        self.scheme = scheme

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.language = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.scheme = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SuggestTagDictionaryRevision')
        if self.language is not None:
            oprot.writeFieldBegin('language', TType.STRING, 1)
            oprot.writeString(
                self.language.encode('utf-8')
                if sys.version_info[0] == 2
                else self.language
            )
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 2)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.scheme is not None:
            oprot.writeFieldBegin('scheme', TType.STRING, 3)
            oprot.writeString(
                self.scheme.encode('utf-8') if sys.version_info[0] == 2 else self.scheme
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SuggestDictionaryRevisions(object):
    """
    Attributes:
     - itemRevision
     - tagRevisions

    """

    def __init__(
        self,
        itemRevision=None,
        tagRevisions=None,
    ):
        self.itemRevision = itemRevision
        self.tagRevisions = tagRevisions

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.itemRevision = SuggestItemDictionaryRevision()
                    self.itemRevision.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.tagRevisions = []
                    (_etype429, _size426) = iprot.readListBegin()
                    for _i430 in range(_size426):
                        _elem431 = SuggestTagDictionaryRevision()
                        _elem431.read(iprot)
                        self.tagRevisions.append(_elem431)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SuggestDictionaryRevisions')
        if self.itemRevision is not None:
            oprot.writeFieldBegin('itemRevision', TType.STRUCT, 1)
            self.itemRevision.write(oprot)
            oprot.writeFieldEnd()
        if self.tagRevisions is not None:
            oprot.writeFieldBegin('tagRevisions', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.tagRevisions))
            for iter432 in self.tagRevisions:
                iter432.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SuggestDictionarySettings(object):
    """
    Attributes:
     - revision
     - newRevision
     - dictionaries
     - preloadedDictionaries

    """

    def __init__(
        self,
        revision=None,
        newRevision=None,
        dictionaries=None,
        preloadedDictionaries=None,
    ):
        self.revision = revision
        self.newRevision = newRevision
        self.dictionaries = dictionaries
        self.preloadedDictionaries = preloadedDictionaries

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.newRevision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.dictionaries = []
                    (_etype436, _size433) = iprot.readListBegin()
                    for _i437 in range(_size433):
                        _elem438 = SuggestDictionary()
                        _elem438.read(iprot)
                        self.dictionaries.append(_elem438)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.preloadedDictionaries = []
                    (_etype442, _size439) = iprot.readListBegin()
                    for _i443 in range(_size439):
                        _elem444 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.preloadedDictionaries.append(_elem444)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SuggestDictionarySettings')
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 1)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.newRevision is not None:
            oprot.writeFieldBegin('newRevision', TType.I64, 2)
            oprot.writeI64(self.newRevision)
            oprot.writeFieldEnd()
        if self.dictionaries is not None:
            oprot.writeFieldBegin('dictionaries', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.dictionaries))
            for iter445 in self.dictionaries:
                iter445.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.preloadedDictionaries is not None:
            oprot.writeFieldBegin('preloadedDictionaries', TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.preloadedDictionaries))
            for iter446 in self.preloadedDictionaries:
                oprot.writeString(
                    iter446.encode('utf-8') if sys.version_info[0] == 2 else iter446
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PhoneInfoForChannel(object):
    """
    Attributes:
     - mid
     - normalizedPhoneNumber
     - allowedToSearchByPhoneNumber
     - allowedToReceiveMessageFromNonFriend
     - region

    """

    def __init__(
        self,
        mid=None,
        normalizedPhoneNumber=None,
        allowedToSearchByPhoneNumber=None,
        allowedToReceiveMessageFromNonFriend=None,
        region=None,
    ):
        self.mid = mid
        self.normalizedPhoneNumber = normalizedPhoneNumber
        self.allowedToSearchByPhoneNumber = allowedToSearchByPhoneNumber
        self.allowedToReceiveMessageFromNonFriend = allowedToReceiveMessageFromNonFriend
        self.region = region

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.normalizedPhoneNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.allowedToSearchByPhoneNumber = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.allowedToReceiveMessageFromNonFriend = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.region = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PhoneInfoForChannel')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.normalizedPhoneNumber is not None:
            oprot.writeFieldBegin('normalizedPhoneNumber', TType.STRING, 2)
            oprot.writeString(
                self.normalizedPhoneNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.normalizedPhoneNumber
            )
            oprot.writeFieldEnd()
        if self.allowedToSearchByPhoneNumber is not None:
            oprot.writeFieldBegin('allowedToSearchByPhoneNumber', TType.BOOL, 3)
            oprot.writeBool(self.allowedToSearchByPhoneNumber)
            oprot.writeFieldEnd()
        if self.allowedToReceiveMessageFromNonFriend is not None:
            oprot.writeFieldBegin('allowedToReceiveMessageFromNonFriend', TType.BOOL, 4)
            oprot.writeBool(self.allowedToReceiveMessageFromNonFriend)
            oprot.writeFieldEnd()
        if self.region is not None:
            oprot.writeFieldBegin('region', TType.STRING, 5)
            oprot.writeString(
                self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PhoneVerificationResult(object):
    """
    Attributes:
     - verificationResult
     - accountMigrationCheckType
     - recommendAddFriends

    """

    def __init__(
        self,
        verificationResult=None,
        accountMigrationCheckType=None,
        recommendAddFriends=None,
    ):
        self.verificationResult = verificationResult
        self.accountMigrationCheckType = accountMigrationCheckType
        self.recommendAddFriends = recommendAddFriends

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.verificationResult = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.accountMigrationCheckType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.recommendAddFriends = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PhoneVerificationResult')
        if self.verificationResult is not None:
            oprot.writeFieldBegin('verificationResult', TType.I32, 1)
            oprot.writeI32(self.verificationResult)
            oprot.writeFieldEnd()
        if self.accountMigrationCheckType is not None:
            oprot.writeFieldBegin('accountMigrationCheckType', TType.I32, 2)
            oprot.writeI32(self.accountMigrationCheckType)
            oprot.writeFieldEnd()
        if self.recommendAddFriends is not None:
            oprot.writeFieldBegin('recommendAddFriends', TType.BOOL, 3)
            oprot.writeBool(self.recommendAddFriends)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PlaceSearchInfo(object):
    """
    Attributes:
     - name
     - address
     - latitude
     - longitude

    """

    def __init__(
        self,
        name=None,
        address=None,
        latitude=None,
        longitude=None,
    ):
        self.name = name
        self.address = address
        self.latitude = latitude
        self.longitude = longitude

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.address = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.DOUBLE:
                    self.latitude = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.DOUBLE:
                    self.longitude = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PlaceSearchInfo')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.address is not None:
            oprot.writeFieldBegin('address', TType.STRING, 2)
            oprot.writeString(
                self.address.encode('utf-8')
                if sys.version_info[0] == 2
                else self.address
            )
            oprot.writeFieldEnd()
        if self.latitude is not None:
            oprot.writeFieldBegin('latitude', TType.DOUBLE, 3)
            oprot.writeDouble(self.latitude)
            oprot.writeFieldEnd()
        if self.longitude is not None:
            oprot.writeFieldBegin('longitude', TType.DOUBLE, 4)
            oprot.writeDouble(self.longitude)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class RSAKey(object):
    """
    Attributes:
     - keynm
     - nvalue
     - evalue
     - sessionKey

    """

    def __init__(
        self,
        keynm=None,
        nvalue=None,
        evalue=None,
        sessionKey=None,
    ):
        self.keynm = keynm
        self.nvalue = nvalue
        self.evalue = evalue
        self.sessionKey = sessionKey

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.keynm = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.nvalue = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.evalue = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.sessionKey = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('RSAKey')
        if self.keynm is not None:
            oprot.writeFieldBegin('keynm', TType.STRING, 1)
            oprot.writeString(
                self.keynm.encode('utf-8') if sys.version_info[0] == 2 else self.keynm
            )
            oprot.writeFieldEnd()
        if self.nvalue is not None:
            oprot.writeFieldBegin('nvalue', TType.STRING, 2)
            oprot.writeString(
                self.nvalue.encode('utf-8') if sys.version_info[0] == 2 else self.nvalue
            )
            oprot.writeFieldEnd()
        if self.evalue is not None:
            oprot.writeFieldBegin('evalue', TType.STRING, 3)
            oprot.writeString(
                self.evalue.encode('utf-8') if sys.version_info[0] == 2 else self.evalue
            )
            oprot.writeFieldEnd()
        if self.sessionKey is not None:
            oprot.writeFieldBegin('sessionKey', TType.STRING, 4)
            oprot.writeString(
                self.sessionKey.encode('utf-8')
                if sys.version_info[0] == 2
                else self.sessionKey
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SecurityCenterResult(object):
    """
    Attributes:
     - uri
     - token
     - cookiePath
     - skip

    """

    def __init__(
        self,
        uri=None,
        token=None,
        cookiePath=None,
        skip=None,
    ):
        self.uri = uri
        self.token = token
        self.cookiePath = cookiePath
        self.skip = skip

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.uri = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.token = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.cookiePath = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.skip = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SecurityCenterResult')
        if self.uri is not None:
            oprot.writeFieldBegin('uri', TType.STRING, 1)
            oprot.writeString(
                self.uri.encode('utf-8') if sys.version_info[0] == 2 else self.uri
            )
            oprot.writeFieldEnd()
        if self.token is not None:
            oprot.writeFieldBegin('token', TType.STRING, 2)
            oprot.writeString(
                self.token.encode('utf-8') if sys.version_info[0] == 2 else self.token
            )
            oprot.writeFieldEnd()
        if self.cookiePath is not None:
            oprot.writeFieldBegin('cookiePath', TType.STRING, 3)
            oprot.writeString(
                self.cookiePath.encode('utf-8')
                if sys.version_info[0] == 2
                else self.cookiePath
            )
            oprot.writeFieldEnd()
        if self.skip is not None:
            oprot.writeFieldBegin('skip', TType.BOOL, 4)
            oprot.writeBool(self.skip)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SendBuddyMessageResult(object):
    """
    Attributes:
     - requestId
     - state
     - messageId
     - eventNo
     - receiverCount
     - successCount
     - failCount
     - cancelCount
     - blockCount
     - unregisterCount
     - timestamp
     - message

    """

    def __init__(
        self,
        requestId=None,
        state=None,
        messageId=None,
        eventNo=None,
        receiverCount=None,
        successCount=None,
        failCount=None,
        cancelCount=None,
        blockCount=None,
        unregisterCount=None,
        timestamp=None,
        message=None,
    ):
        self.requestId = requestId
        self.state = state
        self.messageId = messageId
        self.eventNo = eventNo
        self.receiverCount = receiverCount
        self.successCount = successCount
        self.failCount = failCount
        self.cancelCount = cancelCount
        self.blockCount = blockCount
        self.unregisterCount = unregisterCount
        self.timestamp = timestamp
        self.message = message

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.requestId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.messageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.eventNo = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.receiverCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I64:
                    self.successCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I64:
                    self.failCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.I64:
                    self.cancelCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I64:
                    self.blockCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.I64:
                    self.unregisterCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.I64:
                    self.timestamp = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.message = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SendBuddyMessageResult')
        if self.requestId is not None:
            oprot.writeFieldBegin('requestId', TType.STRING, 1)
            oprot.writeString(
                self.requestId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.requestId
            )
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 2)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.STRING, 3)
            oprot.writeString(
                self.messageId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.messageId
            )
            oprot.writeFieldEnd()
        if self.eventNo is not None:
            oprot.writeFieldBegin('eventNo', TType.I32, 4)
            oprot.writeI32(self.eventNo)
            oprot.writeFieldEnd()
        if self.receiverCount is not None:
            oprot.writeFieldBegin('receiverCount', TType.I64, 11)
            oprot.writeI64(self.receiverCount)
            oprot.writeFieldEnd()
        if self.successCount is not None:
            oprot.writeFieldBegin('successCount', TType.I64, 12)
            oprot.writeI64(self.successCount)
            oprot.writeFieldEnd()
        if self.failCount is not None:
            oprot.writeFieldBegin('failCount', TType.I64, 13)
            oprot.writeI64(self.failCount)
            oprot.writeFieldEnd()
        if self.cancelCount is not None:
            oprot.writeFieldBegin('cancelCount', TType.I64, 14)
            oprot.writeI64(self.cancelCount)
            oprot.writeFieldEnd()
        if self.blockCount is not None:
            oprot.writeFieldBegin('blockCount', TType.I64, 15)
            oprot.writeI64(self.blockCount)
            oprot.writeFieldEnd()
        if self.unregisterCount is not None:
            oprot.writeFieldBegin('unregisterCount', TType.I64, 16)
            oprot.writeI64(self.unregisterCount)
            oprot.writeFieldEnd()
        if self.timestamp is not None:
            oprot.writeFieldBegin('timestamp', TType.I64, 21)
            oprot.writeI64(self.timestamp)
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 22)
            oprot.writeString(
                self.message.encode('utf-8')
                if sys.version_info[0] == 2
                else self.message
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SetBuddyOnAirResult(object):
    """
    Attributes:
     - requestId
     - state
     - eventNo
     - receiverCount
     - successCount
     - failCount
     - cancelCount
     - unregisterCount
     - timestamp
     - message

    """

    def __init__(
        self,
        requestId=None,
        state=None,
        eventNo=None,
        receiverCount=None,
        successCount=None,
        failCount=None,
        cancelCount=None,
        unregisterCount=None,
        timestamp=None,
        message=None,
    ):
        self.requestId = requestId
        self.state = state
        self.eventNo = eventNo
        self.receiverCount = receiverCount
        self.successCount = successCount
        self.failCount = failCount
        self.cancelCount = cancelCount
        self.unregisterCount = unregisterCount
        self.timestamp = timestamp
        self.message = message

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.requestId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.eventNo = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.receiverCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I64:
                    self.successCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I64:
                    self.failCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.I64:
                    self.cancelCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I64:
                    self.unregisterCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.I64:
                    self.timestamp = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.message = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SetBuddyOnAirResult')
        if self.requestId is not None:
            oprot.writeFieldBegin('requestId', TType.STRING, 1)
            oprot.writeString(
                self.requestId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.requestId
            )
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 2)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.eventNo is not None:
            oprot.writeFieldBegin('eventNo', TType.I32, 3)
            oprot.writeI32(self.eventNo)
            oprot.writeFieldEnd()
        if self.receiverCount is not None:
            oprot.writeFieldBegin('receiverCount', TType.I64, 11)
            oprot.writeI64(self.receiverCount)
            oprot.writeFieldEnd()
        if self.successCount is not None:
            oprot.writeFieldBegin('successCount', TType.I64, 12)
            oprot.writeI64(self.successCount)
            oprot.writeFieldEnd()
        if self.failCount is not None:
            oprot.writeFieldBegin('failCount', TType.I64, 13)
            oprot.writeI64(self.failCount)
            oprot.writeFieldEnd()
        if self.cancelCount is not None:
            oprot.writeFieldBegin('cancelCount', TType.I64, 14)
            oprot.writeI64(self.cancelCount)
            oprot.writeFieldEnd()
        if self.unregisterCount is not None:
            oprot.writeFieldBegin('unregisterCount', TType.I64, 15)
            oprot.writeI64(self.unregisterCount)
            oprot.writeFieldEnd()
        if self.timestamp is not None:
            oprot.writeFieldBegin('timestamp', TType.I64, 21)
            oprot.writeI64(self.timestamp)
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 22)
            oprot.writeString(
                self.message.encode('utf-8')
                if sys.version_info[0] == 2
                else self.message
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Settings(object):
    """
    Attributes:
     - notificationEnable
     - notificationMuteExpiration
     - notificationNewMessage
     - notificationGroupInvitation
     - notificationShowMessage
     - notificationIncomingCall
     - notificationSoundMessage
     - notificationSoundGroup
     - notificationDisabledWithSub
     - privacySyncContacts
     - privacySearchByPhoneNumber
     - privacySearchByUserid
     - privacySearchByEmail
     - privacyAllowSecondaryDeviceLogin
     - privacyProfileImagePostToMyhome
     - privacyReceiveMessagesFromNotFriend
     - contactMyTicket
     - identityProvider
     - identityIdentifier
     - snsAccounts
     - phoneRegistration
     - emailConfirmationStatus
     - preferenceLocale
     - customModes
     - e2eeEnable
     - hitokotoBackupRequested
     - privacyProfileMusicPostToMyhome
     - privacyAllowNearby
     - agreementNearbyTime
     - agreementSquareTime
     - notificationMention
     - botUseAgreementAcceptedAt

    """

    def __init__(
        self,
        notificationEnable=None,
        notificationMuteExpiration=None,
        notificationNewMessage=None,
        notificationGroupInvitation=None,
        notificationShowMessage=None,
        notificationIncomingCall=None,
        notificationSoundMessage=None,
        notificationSoundGroup=None,
        notificationDisabledWithSub=None,
        privacySyncContacts=None,
        privacySearchByPhoneNumber=None,
        privacySearchByUserid=None,
        privacySearchByEmail=None,
        privacyAllowSecondaryDeviceLogin=None,
        privacyProfileImagePostToMyhome=None,
        privacyReceiveMessagesFromNotFriend=None,
        contactMyTicket=None,
        identityProvider=None,
        identityIdentifier=None,
        snsAccounts=None,
        phoneRegistration=None,
        emailConfirmationStatus=None,
        preferenceLocale=None,
        customModes=None,
        e2eeEnable=None,
        hitokotoBackupRequested=None,
        privacyProfileMusicPostToMyhome=None,
        privacyAllowNearby=None,
        agreementNearbyTime=None,
        agreementSquareTime=None,
        notificationMention=None,
        botUseAgreementAcceptedAt=None,
    ):
        self.notificationEnable = notificationEnable
        self.notificationMuteExpiration = notificationMuteExpiration
        self.notificationNewMessage = notificationNewMessage
        self.notificationGroupInvitation = notificationGroupInvitation
        self.notificationShowMessage = notificationShowMessage
        self.notificationIncomingCall = notificationIncomingCall
        self.notificationSoundMessage = notificationSoundMessage
        self.notificationSoundGroup = notificationSoundGroup
        self.notificationDisabledWithSub = notificationDisabledWithSub
        self.privacySyncContacts = privacySyncContacts
        self.privacySearchByPhoneNumber = privacySearchByPhoneNumber
        self.privacySearchByUserid = privacySearchByUserid
        self.privacySearchByEmail = privacySearchByEmail
        self.privacyAllowSecondaryDeviceLogin = privacyAllowSecondaryDeviceLogin
        self.privacyProfileImagePostToMyhome = privacyProfileImagePostToMyhome
        self.privacyReceiveMessagesFromNotFriend = privacyReceiveMessagesFromNotFriend
        self.contactMyTicket = contactMyTicket
        self.identityProvider = identityProvider
        self.identityIdentifier = identityIdentifier
        self.snsAccounts = snsAccounts
        self.phoneRegistration = phoneRegistration
        self.emailConfirmationStatus = emailConfirmationStatus
        self.preferenceLocale = preferenceLocale
        self.customModes = customModes
        self.e2eeEnable = e2eeEnable
        self.hitokotoBackupRequested = hitokotoBackupRequested
        self.privacyProfileMusicPostToMyhome = privacyProfileMusicPostToMyhome
        self.privacyAllowNearby = privacyAllowNearby
        self.agreementNearbyTime = agreementNearbyTime
        self.agreementSquareTime = agreementSquareTime
        self.notificationMention = notificationMention
        self.botUseAgreementAcceptedAt = botUseAgreementAcceptedAt

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 10:
                if ftype == TType.BOOL:
                    self.notificationEnable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.notificationMuteExpiration = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.BOOL:
                    self.notificationNewMessage = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.BOOL:
                    self.notificationGroupInvitation = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.BOOL:
                    self.notificationShowMessage = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.BOOL:
                    self.notificationIncomingCall = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.STRING:
                    self.notificationSoundMessage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRING:
                    self.notificationSoundGroup = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 18:
                if ftype == TType.BOOL:
                    self.notificationDisabledWithSub = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.BOOL:
                    self.privacySyncContacts = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.BOOL:
                    self.privacySearchByPhoneNumber = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.BOOL:
                    self.privacySearchByUserid = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.BOOL:
                    self.privacySearchByEmail = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.BOOL:
                    self.privacyAllowSecondaryDeviceLogin = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 25:
                if ftype == TType.BOOL:
                    self.privacyProfileImagePostToMyhome = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 26:
                if ftype == TType.BOOL:
                    self.privacyReceiveMessagesFromNotFriend = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 30:
                if ftype == TType.STRING:
                    self.contactMyTicket = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 40:
                if ftype == TType.I32:
                    self.identityProvider = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 41:
                if ftype == TType.STRING:
                    self.identityIdentifier = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 42:
                if ftype == TType.MAP:
                    self.snsAccounts = {}
                    (_ktype448, _vtype449, _size447) = iprot.readMapBegin()
                    for _i451 in range(_size447):
                        _key452 = iprot.readI32()
                        _val453 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.snsAccounts[_key452] = _val453
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 43:
                if ftype == TType.BOOL:
                    self.phoneRegistration = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 44:
                if ftype == TType.I32:
                    self.emailConfirmationStatus = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 50:
                if ftype == TType.STRING:
                    self.preferenceLocale = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 60:
                if ftype == TType.MAP:
                    self.customModes = {}
                    (_ktype455, _vtype456, _size454) = iprot.readMapBegin()
                    for _i458 in range(_size454):
                        _key459 = iprot.readI32()
                        _val460 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.customModes[_key459] = _val460
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 61:
                if ftype == TType.BOOL:
                    self.e2eeEnable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 62:
                if ftype == TType.BOOL:
                    self.hitokotoBackupRequested = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 63:
                if ftype == TType.BOOL:
                    self.privacyProfileMusicPostToMyhome = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 65:
                if ftype == TType.BOOL:
                    self.privacyAllowNearby = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 66:
                if ftype == TType.I64:
                    self.agreementNearbyTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 67:
                if ftype == TType.I64:
                    self.agreementSquareTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 68:
                if ftype == TType.BOOL:
                    self.notificationMention = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 69:
                if ftype == TType.I64:
                    self.botUseAgreementAcceptedAt = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Settings')
        if self.notificationEnable is not None:
            oprot.writeFieldBegin('notificationEnable', TType.BOOL, 10)
            oprot.writeBool(self.notificationEnable)
            oprot.writeFieldEnd()
        if self.notificationMuteExpiration is not None:
            oprot.writeFieldBegin('notificationMuteExpiration', TType.I64, 11)
            oprot.writeI64(self.notificationMuteExpiration)
            oprot.writeFieldEnd()
        if self.notificationNewMessage is not None:
            oprot.writeFieldBegin('notificationNewMessage', TType.BOOL, 12)
            oprot.writeBool(self.notificationNewMessage)
            oprot.writeFieldEnd()
        if self.notificationGroupInvitation is not None:
            oprot.writeFieldBegin('notificationGroupInvitation', TType.BOOL, 13)
            oprot.writeBool(self.notificationGroupInvitation)
            oprot.writeFieldEnd()
        if self.notificationShowMessage is not None:
            oprot.writeFieldBegin('notificationShowMessage', TType.BOOL, 14)
            oprot.writeBool(self.notificationShowMessage)
            oprot.writeFieldEnd()
        if self.notificationIncomingCall is not None:
            oprot.writeFieldBegin('notificationIncomingCall', TType.BOOL, 15)
            oprot.writeBool(self.notificationIncomingCall)
            oprot.writeFieldEnd()
        if self.notificationSoundMessage is not None:
            oprot.writeFieldBegin('notificationSoundMessage', TType.STRING, 16)
            oprot.writeString(
                self.notificationSoundMessage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.notificationSoundMessage
            )
            oprot.writeFieldEnd()
        if self.notificationSoundGroup is not None:
            oprot.writeFieldBegin('notificationSoundGroup', TType.STRING, 17)
            oprot.writeString(
                self.notificationSoundGroup.encode('utf-8')
                if sys.version_info[0] == 2
                else self.notificationSoundGroup
            )
            oprot.writeFieldEnd()
        if self.notificationDisabledWithSub is not None:
            oprot.writeFieldBegin('notificationDisabledWithSub', TType.BOOL, 18)
            oprot.writeBool(self.notificationDisabledWithSub)
            oprot.writeFieldEnd()
        if self.privacySyncContacts is not None:
            oprot.writeFieldBegin('privacySyncContacts', TType.BOOL, 20)
            oprot.writeBool(self.privacySyncContacts)
            oprot.writeFieldEnd()
        if self.privacySearchByPhoneNumber is not None:
            oprot.writeFieldBegin('privacySearchByPhoneNumber', TType.BOOL, 21)
            oprot.writeBool(self.privacySearchByPhoneNumber)
            oprot.writeFieldEnd()
        if self.privacySearchByUserid is not None:
            oprot.writeFieldBegin('privacySearchByUserid', TType.BOOL, 22)
            oprot.writeBool(self.privacySearchByUserid)
            oprot.writeFieldEnd()
        if self.privacySearchByEmail is not None:
            oprot.writeFieldBegin('privacySearchByEmail', TType.BOOL, 23)
            oprot.writeBool(self.privacySearchByEmail)
            oprot.writeFieldEnd()
        if self.privacyAllowSecondaryDeviceLogin is not None:
            oprot.writeFieldBegin('privacyAllowSecondaryDeviceLogin', TType.BOOL, 24)
            oprot.writeBool(self.privacyAllowSecondaryDeviceLogin)
            oprot.writeFieldEnd()
        if self.privacyProfileImagePostToMyhome is not None:
            oprot.writeFieldBegin('privacyProfileImagePostToMyhome', TType.BOOL, 25)
            oprot.writeBool(self.privacyProfileImagePostToMyhome)
            oprot.writeFieldEnd()
        if self.privacyReceiveMessagesFromNotFriend is not None:
            oprot.writeFieldBegin('privacyReceiveMessagesFromNotFriend', TType.BOOL, 26)
            oprot.writeBool(self.privacyReceiveMessagesFromNotFriend)
            oprot.writeFieldEnd()
        if self.contactMyTicket is not None:
            oprot.writeFieldBegin('contactMyTicket', TType.STRING, 30)
            oprot.writeString(
                self.contactMyTicket.encode('utf-8')
                if sys.version_info[0] == 2
                else self.contactMyTicket
            )
            oprot.writeFieldEnd()
        if self.identityProvider is not None:
            oprot.writeFieldBegin('identityProvider', TType.I32, 40)
            oprot.writeI32(self.identityProvider)
            oprot.writeFieldEnd()
        if self.identityIdentifier is not None:
            oprot.writeFieldBegin('identityIdentifier', TType.STRING, 41)
            oprot.writeString(
                self.identityIdentifier.encode('utf-8')
                if sys.version_info[0] == 2
                else self.identityIdentifier
            )
            oprot.writeFieldEnd()
        if self.snsAccounts is not None:
            oprot.writeFieldBegin('snsAccounts', TType.MAP, 42)
            oprot.writeMapBegin(TType.I32, TType.STRING, len(self.snsAccounts))
            for kiter461, viter462 in self.snsAccounts.items():
                oprot.writeI32(kiter461)
                oprot.writeString(
                    viter462.encode('utf-8') if sys.version_info[0] == 2 else viter462
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.phoneRegistration is not None:
            oprot.writeFieldBegin('phoneRegistration', TType.BOOL, 43)
            oprot.writeBool(self.phoneRegistration)
            oprot.writeFieldEnd()
        if self.emailConfirmationStatus is not None:
            oprot.writeFieldBegin('emailConfirmationStatus', TType.I32, 44)
            oprot.writeI32(self.emailConfirmationStatus)
            oprot.writeFieldEnd()
        if self.preferenceLocale is not None:
            oprot.writeFieldBegin('preferenceLocale', TType.STRING, 50)
            oprot.writeString(
                self.preferenceLocale.encode('utf-8')
                if sys.version_info[0] == 2
                else self.preferenceLocale
            )
            oprot.writeFieldEnd()
        if self.customModes is not None:
            oprot.writeFieldBegin('customModes', TType.MAP, 60)
            oprot.writeMapBegin(TType.I32, TType.STRING, len(self.customModes))
            for kiter463, viter464 in self.customModes.items():
                oprot.writeI32(kiter463)
                oprot.writeString(
                    viter464.encode('utf-8') if sys.version_info[0] == 2 else viter464
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.e2eeEnable is not None:
            oprot.writeFieldBegin('e2eeEnable', TType.BOOL, 61)
            oprot.writeBool(self.e2eeEnable)
            oprot.writeFieldEnd()
        if self.hitokotoBackupRequested is not None:
            oprot.writeFieldBegin('hitokotoBackupRequested', TType.BOOL, 62)
            oprot.writeBool(self.hitokotoBackupRequested)
            oprot.writeFieldEnd()
        if self.privacyProfileMusicPostToMyhome is not None:
            oprot.writeFieldBegin('privacyProfileMusicPostToMyhome', TType.BOOL, 63)
            oprot.writeBool(self.privacyProfileMusicPostToMyhome)
            oprot.writeFieldEnd()
        if self.privacyAllowNearby is not None:
            oprot.writeFieldBegin('privacyAllowNearby', TType.BOOL, 65)
            oprot.writeBool(self.privacyAllowNearby)
            oprot.writeFieldEnd()
        if self.agreementNearbyTime is not None:
            oprot.writeFieldBegin('agreementNearbyTime', TType.I64, 66)
            oprot.writeI64(self.agreementNearbyTime)
            oprot.writeFieldEnd()
        if self.agreementSquareTime is not None:
            oprot.writeFieldBegin('agreementSquareTime', TType.I64, 67)
            oprot.writeI64(self.agreementSquareTime)
            oprot.writeFieldEnd()
        if self.notificationMention is not None:
            oprot.writeFieldBegin('notificationMention', TType.BOOL, 68)
            oprot.writeBool(self.notificationMention)
            oprot.writeFieldEnd()
        if self.botUseAgreementAcceptedAt is not None:
            oprot.writeFieldBegin('botUseAgreementAcceptedAt', TType.I64, 69)
            oprot.writeI64(self.botUseAgreementAcceptedAt)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SimpleChannelClient(object):
    """
    Attributes:
     - applicationType
     - applicationVersion
     - locale

    """

    def __init__(
        self,
        applicationType=None,
        applicationVersion=None,
        locale=None,
    ):
        self.applicationType = applicationType
        self.applicationVersion = applicationVersion
        self.locale = locale

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.applicationType = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.applicationVersion = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.locale = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SimpleChannelClient')
        if self.applicationType is not None:
            oprot.writeFieldBegin('applicationType', TType.STRING, 1)
            oprot.writeString(
                self.applicationType.encode('utf-8')
                if sys.version_info[0] == 2
                else self.applicationType
            )
            oprot.writeFieldEnd()
        if self.applicationVersion is not None:
            oprot.writeFieldBegin('applicationVersion', TType.STRING, 2)
            oprot.writeString(
                self.applicationVersion.encode('utf-8')
                if sys.version_info[0] == 2
                else self.applicationVersion
            )
            oprot.writeFieldEnd()
        if self.locale is not None:
            oprot.writeFieldBegin('locale', TType.STRING, 3)
            oprot.writeString(
                self.locale.encode('utf-8') if sys.version_info[0] == 2 else self.locale
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SimpleChannelContact(object):
    """
    Attributes:
     - mid
     - displayName
     - pictureStatus
     - picturePath
     - statusMessage

    """

    def __init__(
        self,
        mid=None,
        displayName=None,
        pictureStatus=None,
        picturePath=None,
        statusMessage=None,
    ):
        self.mid = mid
        self.displayName = displayName
        self.pictureStatus = pictureStatus
        self.picturePath = picturePath
        self.statusMessage = statusMessage

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.pictureStatus = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.picturePath = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.statusMessage = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SimpleChannelContact')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 2)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 3)
            oprot.writeString(
                self.pictureStatus.encode('utf-8')
                if sys.version_info[0] == 2
                else self.pictureStatus
            )
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 4)
            oprot.writeString(
                self.picturePath.encode('utf-8')
                if sys.version_info[0] == 2
                else self.picturePath
            )
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 5)
            oprot.writeString(
                self.statusMessage.encode('utf-8')
                if sys.version_info[0] == 2
                else self.statusMessage
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SnsFriend(object):
    """
    Attributes:
     - snsUserId
     - snsUserName
     - snsIdType

    """

    def __init__(
        self,
        snsUserId=None,
        snsUserName=None,
        snsIdType=None,
    ):
        self.snsUserId = snsUserId
        self.snsUserName = snsUserName
        self.snsIdType = snsIdType

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.snsUserId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.snsUserName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.snsIdType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SnsFriend')
        if self.snsUserId is not None:
            oprot.writeFieldBegin('snsUserId', TType.STRING, 1)
            oprot.writeString(
                self.snsUserId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.snsUserId
            )
            oprot.writeFieldEnd()
        if self.snsUserName is not None:
            oprot.writeFieldBegin('snsUserName', TType.STRING, 2)
            oprot.writeString(
                self.snsUserName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.snsUserName
            )
            oprot.writeFieldEnd()
        if self.snsIdType is not None:
            oprot.writeFieldBegin('snsIdType', TType.I32, 3)
            oprot.writeI32(self.snsIdType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SnsFriendContactRegistration(object):
    """
    Attributes:
     - contact
     - snsIdType
     - snsUserId

    """

    def __init__(
        self,
        contact=None,
        snsIdType=None,
        snsUserId=None,
    ):
        self.contact = contact
        self.snsIdType = snsIdType
        self.snsUserId = snsUserId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.contact = Contact()
                    self.contact.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.snsIdType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.snsUserId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SnsFriendContactRegistration')
        if self.contact is not None:
            oprot.writeFieldBegin('contact', TType.STRUCT, 1)
            self.contact.write(oprot)
            oprot.writeFieldEnd()
        if self.snsIdType is not None:
            oprot.writeFieldBegin('snsIdType', TType.I32, 2)
            oprot.writeI32(self.snsIdType)
            oprot.writeFieldEnd()
        if self.snsUserId is not None:
            oprot.writeFieldBegin('snsUserId', TType.STRING, 3)
            oprot.writeString(
                self.snsUserId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.snsUserId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SnsFriendModification(object):
    """
    Attributes:
     - type
     - snsFriend

    """

    def __init__(
        self,
        type=None,
        snsFriend=None,
    ):
        self.type = type
        self.snsFriend = snsFriend

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.snsFriend = SnsFriend()
                    self.snsFriend.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SnsFriendModification')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.snsFriend is not None:
            oprot.writeFieldBegin('snsFriend', TType.STRUCT, 2)
            self.snsFriend.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SnsFriends(object):
    """
    Attributes:
     - snsFriends
     - hasMore

    """

    def __init__(
        self,
        snsFriends=None,
        hasMore=None,
    ):
        self.snsFriends = snsFriends
        self.hasMore = hasMore

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.snsFriends = []
                    (_etype468, _size465) = iprot.readListBegin()
                    for _i469 in range(_size465):
                        _elem470 = SnsFriend()
                        _elem470.read(iprot)
                        self.snsFriends.append(_elem470)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.hasMore = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SnsFriends')
        if self.snsFriends is not None:
            oprot.writeFieldBegin('snsFriends', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.snsFriends))
            for iter471 in self.snsFriends:
                iter471.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.hasMore is not None:
            oprot.writeFieldBegin('hasMore', TType.BOOL, 2)
            oprot.writeBool(self.hasMore)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SnsIdUserStatus(object):
    """
    Attributes:
     - userExisting
     - phoneNumberRegistered
     - sameDevice

    """

    def __init__(
        self,
        userExisting=None,
        phoneNumberRegistered=None,
        sameDevice=None,
    ):
        self.userExisting = userExisting
        self.phoneNumberRegistered = phoneNumberRegistered
        self.sameDevice = sameDevice

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.userExisting = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.phoneNumberRegistered = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.sameDevice = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SnsIdUserStatus')
        if self.userExisting is not None:
            oprot.writeFieldBegin('userExisting', TType.BOOL, 1)
            oprot.writeBool(self.userExisting)
            oprot.writeFieldEnd()
        if self.phoneNumberRegistered is not None:
            oprot.writeFieldBegin('phoneNumberRegistered', TType.BOOL, 2)
            oprot.writeBool(self.phoneNumberRegistered)
            oprot.writeFieldEnd()
        if self.sameDevice is not None:
            oprot.writeFieldBegin('sameDevice', TType.BOOL, 3)
            oprot.writeBool(self.sameDevice)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SnsProfile(object):
    """
    Attributes:
     - snsUserId
     - snsUserName
     - email
     - thumbnailUrl

    """

    def __init__(
        self,
        snsUserId=None,
        snsUserName=None,
        email=None,
        thumbnailUrl=None,
    ):
        self.snsUserId = snsUserId
        self.snsUserName = snsUserName
        self.email = email
        self.thumbnailUrl = thumbnailUrl

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.snsUserId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.snsUserName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.email = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.thumbnailUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SnsProfile')
        if self.snsUserId is not None:
            oprot.writeFieldBegin('snsUserId', TType.STRING, 1)
            oprot.writeString(
                self.snsUserId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.snsUserId
            )
            oprot.writeFieldEnd()
        if self.snsUserName is not None:
            oprot.writeFieldBegin('snsUserName', TType.STRING, 2)
            oprot.writeString(
                self.snsUserName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.snsUserName
            )
            oprot.writeFieldEnd()
        if self.email is not None:
            oprot.writeFieldBegin('email', TType.STRING, 3)
            oprot.writeString(
                self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email
            )
            oprot.writeFieldEnd()
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 4)
            oprot.writeString(
                self.thumbnailUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.thumbnailUrl
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SystemConfiguration(object):
    """
    Attributes:
     - endpoint
     - endpointSsl
     - updateUrl
     - c2dmAccount
     - nniServer

    """

    def __init__(
        self,
        endpoint=None,
        endpointSsl=None,
        updateUrl=None,
        c2dmAccount=None,
        nniServer=None,
    ):
        self.endpoint = endpoint
        self.endpointSsl = endpointSsl
        self.updateUrl = updateUrl
        self.c2dmAccount = c2dmAccount
        self.nniServer = nniServer

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.endpoint = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.endpointSsl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.updateUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.c2dmAccount = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.nniServer = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SystemConfiguration')
        if self.endpoint is not None:
            oprot.writeFieldBegin('endpoint', TType.STRING, 1)
            oprot.writeString(
                self.endpoint.encode('utf-8')
                if sys.version_info[0] == 2
                else self.endpoint
            )
            oprot.writeFieldEnd()
        if self.endpointSsl is not None:
            oprot.writeFieldBegin('endpointSsl', TType.STRING, 2)
            oprot.writeString(
                self.endpointSsl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.endpointSsl
            )
            oprot.writeFieldEnd()
        if self.updateUrl is not None:
            oprot.writeFieldBegin('updateUrl', TType.STRING, 3)
            oprot.writeString(
                self.updateUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.updateUrl
            )
            oprot.writeFieldEnd()
        if self.c2dmAccount is not None:
            oprot.writeFieldBegin('c2dmAccount', TType.STRING, 11)
            oprot.writeString(
                self.c2dmAccount.encode('utf-8')
                if sys.version_info[0] == 2
                else self.c2dmAccount
            )
            oprot.writeFieldEnd()
        if self.nniServer is not None:
            oprot.writeFieldBegin('nniServer', TType.STRING, 12)
            oprot.writeString(
                self.nniServer.encode('utf-8')
                if sys.version_info[0] == 2
                else self.nniServer
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Ticket(object):
    """
    Attributes:
     - id
     - expirationTime
     - maxUseCount

    """

    def __init__(
        self,
        id=None,
        expirationTime=None,
        maxUseCount=None,
    ):
        self.id = id
        self.expirationTime = expirationTime
        self.maxUseCount = maxUseCount

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I64:
                    self.expirationTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.I32:
                    self.maxUseCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Ticket')
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.STRING, 1)
            oprot.writeString(
                self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id
            )
            oprot.writeFieldEnd()
        if self.expirationTime is not None:
            oprot.writeFieldBegin('expirationTime', TType.I64, 10)
            oprot.writeI64(self.expirationTime)
            oprot.writeFieldEnd()
        if self.maxUseCount is not None:
            oprot.writeFieldBegin('maxUseCount', TType.I32, 21)
            oprot.writeI32(self.maxUseCount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TMessageBox(object):
    """
    Attributes:
     - id
     - channelId
     - lastSeq
     - unreadCount
     - lastModifiedTime
     - status
     - midType
     - lastMessages

    """

    def __init__(
        self,
        id=None,
        channelId=None,
        lastSeq=None,
        unreadCount=None,
        lastModifiedTime=None,
        status=None,
        midType=None,
        lastMessages=None,
    ):
        self.id = id
        self.channelId = channelId
        self.lastSeq = lastSeq
        self.unreadCount = unreadCount
        self.lastModifiedTime = lastModifiedTime
        self.status = status
        self.midType = midType
        self.lastMessages = lastMessages

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.channelId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.lastSeq = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.unreadCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.lastModifiedTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.status = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I32:
                    self.midType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.LIST:
                    self.lastMessages = []
                    (_etype475, _size472) = iprot.readListBegin()
                    for _i476 in range(_size472):
                        _elem477 = Message()
                        _elem477.read(iprot)
                        self.lastMessages.append(_elem477)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('TMessageBox')
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.STRING, 1)
            oprot.writeString(
                self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id
            )
            oprot.writeFieldEnd()
        if self.channelId is not None:
            oprot.writeFieldBegin('channelId', TType.STRING, 2)
            oprot.writeString(
                self.channelId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.channelId
            )
            oprot.writeFieldEnd()
        if self.lastSeq is not None:
            oprot.writeFieldBegin('lastSeq', TType.I64, 5)
            oprot.writeI64(self.lastSeq)
            oprot.writeFieldEnd()
        if self.unreadCount is not None:
            oprot.writeFieldBegin('unreadCount', TType.I64, 6)
            oprot.writeI64(self.unreadCount)
            oprot.writeFieldEnd()
        if self.lastModifiedTime is not None:
            oprot.writeFieldBegin('lastModifiedTime', TType.I64, 7)
            oprot.writeI64(self.lastModifiedTime)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 8)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.midType is not None:
            oprot.writeFieldBegin('midType', TType.I32, 9)
            oprot.writeI32(self.midType)
            oprot.writeFieldEnd()
        if self.lastMessages is not None:
            oprot.writeFieldBegin('lastMessages', TType.LIST, 10)
            oprot.writeListBegin(TType.STRUCT, len(self.lastMessages))
            for iter478 in self.lastMessages:
                iter478.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TMessageBoxWrapUp(object):
    """
    Attributes:
     - messageBox
     - name
     - contacts
     - pictureRevision

    """

    def __init__(
        self,
        messageBox=None,
        name=None,
        contacts=None,
        pictureRevision=None,
    ):
        self.messageBox = messageBox
        self.name = name
        self.contacts = contacts
        self.pictureRevision = pictureRevision

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.messageBox = TMessageBox()
                    self.messageBox.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.contacts = []
                    (_etype482, _size479) = iprot.readListBegin()
                    for _i483 in range(_size479):
                        _elem484 = Contact()
                        _elem484.read(iprot)
                        self.contacts.append(_elem484)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.pictureRevision = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('TMessageBoxWrapUp')
        if self.messageBox is not None:
            oprot.writeFieldBegin('messageBox', TType.STRUCT, 1)
            self.messageBox.write(oprot)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.contacts is not None:
            oprot.writeFieldBegin('contacts', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.contacts))
            for iter485 in self.contacts:
                iter485.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.pictureRevision is not None:
            oprot.writeFieldBegin('pictureRevision', TType.STRING, 4)
            oprot.writeString(
                self.pictureRevision.encode('utf-8')
                if sys.version_info[0] == 2
                else self.pictureRevision
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TMessageBoxWrapUpResponse(object):
    """
    Attributes:
     - messageBoxWrapUpList
     - totalSize

    """

    def __init__(
        self,
        messageBoxWrapUpList=None,
        totalSize=None,
    ):
        self.messageBoxWrapUpList = messageBoxWrapUpList
        self.totalSize = totalSize

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.messageBoxWrapUpList = []
                    (_etype489, _size486) = iprot.readListBegin()
                    for _i490 in range(_size486):
                        _elem491 = TMessageBoxWrapUp()
                        _elem491.read(iprot)
                        self.messageBoxWrapUpList.append(_elem491)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.totalSize = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('TMessageBoxWrapUpResponse')
        if self.messageBoxWrapUpList is not None:
            oprot.writeFieldBegin('messageBoxWrapUpList', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.messageBoxWrapUpList))
            for iter492 in self.messageBoxWrapUpList:
                iter492.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.totalSize is not None:
            oprot.writeFieldBegin('totalSize', TType.I32, 2)
            oprot.writeI32(self.totalSize)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TMessageReadRangeEntry(object):
    """
    Attributes:
     - startMessageId
     - endMessageId
     - startTime
     - endTime

    """

    def __init__(
        self,
        startMessageId=None,
        endMessageId=None,
        startTime=None,
        endTime=None,
    ):
        self.startMessageId = startMessageId
        self.endMessageId = endMessageId
        self.startTime = startTime
        self.endTime = endTime

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.startMessageId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.endMessageId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.startTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.endTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('TMessageReadRangeEntry')
        if self.startMessageId is not None:
            oprot.writeFieldBegin('startMessageId', TType.I64, 1)
            oprot.writeI64(self.startMessageId)
            oprot.writeFieldEnd()
        if self.endMessageId is not None:
            oprot.writeFieldBegin('endMessageId', TType.I64, 2)
            oprot.writeI64(self.endMessageId)
            oprot.writeFieldEnd()
        if self.startTime is not None:
            oprot.writeFieldBegin('startTime', TType.I64, 3)
            oprot.writeI64(self.startTime)
            oprot.writeFieldEnd()
        if self.endTime is not None:
            oprot.writeFieldBegin('endTime', TType.I64, 4)
            oprot.writeI64(self.endTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TMessageReadRange(object):
    """
    Attributes:
     - chatId
     - ranges

    """

    def __init__(
        self,
        chatId=None,
        ranges=None,
    ):
        self.chatId = chatId
        self.ranges = ranges

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.chatId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.ranges = {}
                    (_ktype494, _vtype495, _size493) = iprot.readMapBegin()
                    for _i497 in range(_size493):
                        _key498 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val499 = []
                        (_etype503, _size500) = iprot.readListBegin()
                        for _i504 in range(_size500):
                            _elem505 = TMessageReadRangeEntry()
                            _elem505.read(iprot)
                            _val499.append(_elem505)
                        iprot.readListEnd()
                        self.ranges[_key498] = _val499
                    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 kiter506, viter507 in self.ranges.items():
                oprot.writeString(
                    kiter506.encode('utf-8') if sys.version_info[0] == 2 else kiter506
                )
                oprot.writeListBegin(TType.STRUCT, len(viter507))
                for iter508 in viter507:
                    iter508.write(oprot)
                oprot.writeListEnd()
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ChatRoomAnnouncementContents(object):
    """
    Attributes:
     - displayFields
     - text
     - link
     - thumbnail

    """

    def __init__(
        self,
        displayFields=None,
        text=None,
        link=None,
        thumbnail=None,
    ):
        self.displayFields = displayFields
        self.text = text
        self.link = link
        self.thumbnail = thumbnail

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.displayFields = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.text = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.link = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.thumbnail = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChatRoomAnnouncementContents')
        if self.displayFields is not None:
            oprot.writeFieldBegin('displayFields', TType.I32, 1)
            oprot.writeI32(self.displayFields)
            oprot.writeFieldEnd()
        if self.text is not None:
            oprot.writeFieldBegin('text', TType.STRING, 2)
            oprot.writeString(
                self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text
            )
            oprot.writeFieldEnd()
        if self.link is not None:
            oprot.writeFieldBegin('link', TType.STRING, 3)
            oprot.writeString(
                self.link.encode('utf-8') if sys.version_info[0] == 2 else self.link
            )
            oprot.writeFieldEnd()
        if self.thumbnail is not None:
            oprot.writeFieldBegin('thumbnail', TType.STRING, 4)
            oprot.writeString(
                self.thumbnail.encode('utf-8')
                if sys.version_info[0] == 2
                else self.thumbnail
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ChatRoomAnnouncement(object):
    """
    Attributes:
     - announcementSeq
     - type
     - contents
     - creatorMid
     - createdTime

    """

    def __init__(
        self,
        announcementSeq=None,
        type=None,
        contents=None,
        creatorMid=None,
        createdTime=None,
    ):
        self.announcementSeq = announcementSeq
        self.type = type
        self.contents = contents
        self.creatorMid = creatorMid
        self.createdTime = createdTime

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.announcementSeq = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.contents = ChatRoomAnnouncementContents()
                    self.contents.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.creatorMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChatRoomAnnouncement')
        if self.announcementSeq is not None:
            oprot.writeFieldBegin('announcementSeq', TType.I64, 1)
            oprot.writeI64(self.announcementSeq)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 2)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.contents is not None:
            oprot.writeFieldBegin('contents', TType.STRUCT, 3)
            self.contents.write(oprot)
            oprot.writeFieldEnd()
        if self.creatorMid is not None:
            oprot.writeFieldBegin('creatorMid', TType.STRING, 4)
            oprot.writeString(
                self.creatorMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.creatorMid
            )
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 5)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ErrorExtraInfo(object):
    """
    Attributes:
     - preconditionFailedExtraInfo

    """

    def __init__(
        self,
        preconditionFailedExtraInfo=None,
    ):
        self.preconditionFailedExtraInfo = preconditionFailedExtraInfo

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.preconditionFailedExtraInfo = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ErrorExtraInfo')
        if self.preconditionFailedExtraInfo is not None:
            oprot.writeFieldBegin('preconditionFailedExtraInfo', TType.I32, 1)
            oprot.writeI32(self.preconditionFailedExtraInfo)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SyncRelations(object):
    """
    Attributes:
     - syncAll
     - syncParamContact
     - syncParamMid

    """

    def __init__(
        self,
        syncAll=None,
        syncParamContact=None,
        syncParamMid=None,
    ):
        self.syncAll = syncAll
        self.syncParamContact = syncParamContact
        self.syncParamMid = syncParamMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.syncAll = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.syncParamContact = []
                    (_etype512, _size509) = iprot.readListBegin()
                    for _i513 in range(_size509):
                        _elem514 = SyncParamContact()
                        _elem514.read(iprot)
                        self.syncParamContact.append(_elem514)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.syncParamMid = []
                    (_etype518, _size515) = iprot.readListBegin()
                    for _i519 in range(_size515):
                        _elem520 = SyncParamMid()
                        _elem520.read(iprot)
                        self.syncParamMid.append(_elem520)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SyncRelations')
        if self.syncAll is not None:
            oprot.writeFieldBegin('syncAll', TType.BOOL, 1)
            oprot.writeBool(self.syncAll)
            oprot.writeFieldEnd()
        if self.syncParamContact is not None:
            oprot.writeFieldBegin('syncParamContact', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.syncParamContact))
            for iter521 in self.syncParamContact:
                iter521.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.syncParamMid is not None:
            oprot.writeFieldBegin('syncParamMid', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.syncParamMid))
            for iter522 in self.syncParamMid:
                iter522.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SyncScope(object):
    """
    Attributes:
     - syncProfile
     - syncSettings
     - syncSticker
     - syncThemeShop
     - contact
     - group
     - room
     - chat

    """

    def __init__(
        self,
        syncProfile=None,
        syncSettings=None,
        syncSticker=None,
        syncThemeShop=None,
        contact=None,
        group=None,
        room=None,
        chat=None,
    ):
        self.syncProfile = syncProfile
        self.syncSettings = syncSettings
        self.syncSticker = syncSticker
        self.syncThemeShop = syncThemeShop
        self.contact = contact
        self.group = group
        self.room = room
        self.chat = chat

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.syncProfile = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.syncSettings = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.syncSticker = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.syncThemeShop = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRUCT:
                    self.contact = SyncRelations()
                    self.contact.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRUCT:
                    self.group = SyncRelations()
                    self.group.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRUCT:
                    self.room = SyncRelations()
                    self.room.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRUCT:
                    self.chat = SyncRelations()
                    self.chat.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SyncScope')
        if self.syncProfile is not None:
            oprot.writeFieldBegin('syncProfile', TType.BOOL, 1)
            oprot.writeBool(self.syncProfile)
            oprot.writeFieldEnd()
        if self.syncSettings is not None:
            oprot.writeFieldBegin('syncSettings', TType.BOOL, 2)
            oprot.writeBool(self.syncSettings)
            oprot.writeFieldEnd()
        if self.syncSticker is not None:
            oprot.writeFieldBegin('syncSticker', TType.BOOL, 3)
            oprot.writeBool(self.syncSticker)
            oprot.writeFieldEnd()
        if self.syncThemeShop is not None:
            oprot.writeFieldBegin('syncThemeShop', TType.BOOL, 4)
            oprot.writeBool(self.syncThemeShop)
            oprot.writeFieldEnd()
        if self.contact is not None:
            oprot.writeFieldBegin('contact', TType.STRUCT, 10)
            self.contact.write(oprot)
            oprot.writeFieldEnd()
        if self.group is not None:
            oprot.writeFieldBegin('group', TType.STRUCT, 11)
            self.group.write(oprot)
            oprot.writeFieldEnd()
        if self.room is not None:
            oprot.writeFieldBegin('room', TType.STRUCT, 12)
            self.room.write(oprot)
            oprot.writeFieldEnd()
        if self.chat is not None:
            oprot.writeFieldBegin('chat', TType.STRUCT, 13)
            self.chat.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class JoinSquareResponse(object):
    """
    Attributes:
     - square
     - squareAuthority
     - squareStatus
     - squareMember
     - squareFeatureSet
     - noteStatus

    """

    def __init__(
        self,
        square=None,
        squareAuthority=None,
        squareStatus=None,
        squareMember=None,
        squareFeatureSet=None,
        noteStatus=None,
    ):
        self.square = square
        self.squareAuthority = squareAuthority
        self.squareStatus = squareStatus
        self.squareMember = squareMember
        self.squareFeatureSet = squareFeatureSet
        self.noteStatus = noteStatus

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareAuthority = SquareAuthority()
                    self.squareAuthority.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareStatus = SquareStatus()
                    self.squareStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.squareMember = SquareMember()
                    self.squareMember.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.squareFeatureSet = SquareFeatureSet()
                    self.squareFeatureSet.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.noteStatus = NoteStatus()
                    self.noteStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('JoinSquareResponse')
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 1)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        if self.squareAuthority is not None:
            oprot.writeFieldBegin('squareAuthority', TType.STRUCT, 2)
            self.squareAuthority.write(oprot)
            oprot.writeFieldEnd()
        if self.squareStatus is not None:
            oprot.writeFieldBegin('squareStatus', TType.STRUCT, 3)
            self.squareStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.squareMember is not None:
            oprot.writeFieldBegin('squareMember', TType.STRUCT, 4)
            self.squareMember.write(oprot)
            oprot.writeFieldEnd()
        if self.squareFeatureSet is not None:
            oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 5)
            self.squareFeatureSet.write(oprot)
            oprot.writeFieldEnd()
        if self.noteStatus is not None:
            oprot.writeFieldBegin('noteStatus', TType.STRUCT, 6)
            self.noteStatus.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class JoinSquareRequest(object):
    """
    Attributes:
     - squareMid
     - member

    """

    def __init__(
        self,
        squareMid=None,
        member=None,
    ):
        self.squareMid = squareMid
        self.member = member

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.member = SquareMember()
                    self.member.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('JoinSquareRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.member is not None:
            oprot.writeFieldBegin('member', TType.STRUCT, 3)
            self.member.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class JoinSquareChatResponse(object):
    """
    Attributes:
     - squareChat
     - squareChatStatus
     - squareChatMember

    """

    def __init__(
        self,
        squareChat=None,
        squareChatStatus=None,
        squareChatMember=None,
    ):
        self.squareChat = squareChat
        self.squareChatStatus = squareChatStatus
        self.squareChatMember = squareChatMember

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.squareChat = SquareChat()
                    self.squareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareChatStatus = SquareChatStatus()
                    self.squareChatStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareChatMember = SquareChatMember()
                    self.squareChatMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('JoinSquareChatResponse')
        if self.squareChat is not None:
            oprot.writeFieldBegin('squareChat', TType.STRUCT, 1)
            self.squareChat.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChatStatus is not None:
            oprot.writeFieldBegin('squareChatStatus', TType.STRUCT, 2)
            self.squareChatStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChatMember is not None:
            oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 3)
            self.squareChatMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class JoinSquareChatRequest(object):
    """
    Attributes:
     - squareChatMid

    """

    def __init__(
        self,
        squareChatMid=None,
    ):
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('JoinSquareChatRequest')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SendMessageResponse(object):
    """
    Attributes:
     - createdSquareMessage

    """

    def __init__(
        self,
        createdSquareMessage=None,
    ):
        self.createdSquareMessage = createdSquareMessage

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.createdSquareMessage = SquareMessage()
                    self.createdSquareMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SendMessageResponse')
        if self.createdSquareMessage is not None:
            oprot.writeFieldBegin('createdSquareMessage', TType.STRUCT, 1)
            self.createdSquareMessage.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SendMessageRequest(object):
    """
    Attributes:
     - reqSeq
     - squareChatMid
     - squareMessage

    """

    def __init__(
        self,
        reqSeq=None,
        squareChatMid=None,
        squareMessage=None,
    ):
        self.reqSeq = reqSeq
        self.squareChatMid = squareChatMid
        self.squareMessage = squareMessage

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareMessage = SquareMessage()
                    self.squareMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SendMessageRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareMessage is not None:
            oprot.writeFieldBegin('squareMessage', TType.STRUCT, 3)
            self.squareMessage.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class MarkAsReadRequest(object):
    """
    Attributes:
     - squareChatMid
     - messageId

    """

    def __init__(
        self,
        squareChatMid=None,
        messageId=None,
    ):
        self.squareChatMid = squareChatMid
        self.messageId = messageId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.messageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('MarkAsReadRequest')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.STRING, 4)
            oprot.writeString(
                self.messageId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.messageId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class MarkAsReadResponse(object):
    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('MarkAsReadResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SubscriptionState(object):
    """
    Attributes:
     - subscriptionId
     - ttlMillis

    """

    def __init__(
        self,
        subscriptionId=None,
        ttlMillis=None,
    ):
        self.subscriptionId = subscriptionId
        self.ttlMillis = ttlMillis

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.subscriptionId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.ttlMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SubscriptionState')
        if self.subscriptionId is not None:
            oprot.writeFieldBegin('subscriptionId', TType.I64, 1)
            oprot.writeI64(self.subscriptionId)
            oprot.writeFieldEnd()
        if self.ttlMillis is not None:
            oprot.writeFieldBegin('ttlMillis', TType.I64, 2)
            oprot.writeI64(self.ttlMillis)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ApproveSquareMembersResponse(object):
    """
    Attributes:
     - approvedMembers
     - status

    """

    def __init__(
        self,
        approvedMembers=None,
        status=None,
    ):
        self.approvedMembers = approvedMembers
        self.status = status

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.approvedMembers = []
                    (_etype526, _size523) = iprot.readListBegin()
                    for _i527 in range(_size523):
                        _elem528 = SquareMember()
                        _elem528.read(iprot)
                        self.approvedMembers.append(_elem528)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.status = SquareStatus()
                    self.status.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ApproveSquareMembersResponse')
        if self.approvedMembers is not None:
            oprot.writeFieldBegin('approvedMembers', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.approvedMembers))
            for iter529 in self.approvedMembers:
                iter529.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.STRUCT, 2)
            self.status.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ApproveSquareMembersRequest(object):
    """
    Attributes:
     - squareMid
     - requestedMemberMids

    """

    def __init__(
        self,
        squareMid=None,
        requestedMemberMids=None,
    ):
        self.squareMid = squareMid
        self.requestedMemberMids = requestedMemberMids

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.requestedMemberMids = []
                    (_etype533, _size530) = iprot.readListBegin()
                    for _i534 in range(_size530):
                        _elem535 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.requestedMemberMids.append(_elem535)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ApproveSquareMembersRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.requestedMemberMids is not None:
            oprot.writeFieldBegin('requestedMemberMids', TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.requestedMemberMids))
            for iter536 in self.requestedMemberMids:
                oprot.writeString(
                    iter536.encode('utf-8') if sys.version_info[0] == 2 else iter536
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CreateSquareChatResponse(object):
    """
    Attributes:
     - squareChat
     - squareChatStatus
     - squareChatMember

    """

    def __init__(
        self,
        squareChat=None,
        squareChatStatus=None,
        squareChatMember=None,
    ):
        self.squareChat = squareChat
        self.squareChatStatus = squareChatStatus
        self.squareChatMember = squareChatMember

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.squareChat = SquareChat()
                    self.squareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareChatStatus = SquareChatStatus()
                    self.squareChatStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareChatMember = SquareChatMember()
                    self.squareChatMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CreateSquareChatResponse')
        if self.squareChat is not None:
            oprot.writeFieldBegin('squareChat', TType.STRUCT, 1)
            self.squareChat.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChatStatus is not None:
            oprot.writeFieldBegin('squareChatStatus', TType.STRUCT, 2)
            self.squareChatStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChatMember is not None:
            oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 3)
            self.squareChatMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CreateSquareChatRequest(object):
    """
    Attributes:
     - reqSeq
     - squareChat
     - squareMemberMids

    """

    def __init__(
        self,
        reqSeq=None,
        squareChat=None,
        squareMemberMids=None,
    ):
        self.reqSeq = reqSeq
        self.squareChat = squareChat
        self.squareMemberMids = squareMemberMids

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareChat = SquareChat()
                    self.squareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.squareMemberMids = []
                    (_etype540, _size537) = iprot.readListBegin()
                    for _i541 in range(_size537):
                        _elem542 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.squareMemberMids.append(_elem542)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CreateSquareChatRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.squareChat is not None:
            oprot.writeFieldBegin('squareChat', TType.STRUCT, 2)
            self.squareChat.write(oprot)
            oprot.writeFieldEnd()
        if self.squareMemberMids is not None:
            oprot.writeFieldBegin('squareMemberMids', TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.squareMemberMids))
            for iter543 in self.squareMemberMids:
                oprot.writeString(
                    iter543.encode('utf-8') if sys.version_info[0] == 2 else iter543
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CreateSquareResponse(object):
    """
    Attributes:
     - square
     - creator
     - authority
     - status

    """

    def __init__(
        self,
        square=None,
        creator=None,
        authority=None,
        status=None,
    ):
        self.square = square
        self.creator = creator
        self.authority = authority
        self.status = status

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.creator = SquareMember()
                    self.creator.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.authority = SquareAuthority()
                    self.authority.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.status = SquareStatus()
                    self.status.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CreateSquareResponse')
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 1)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        if self.creator is not None:
            oprot.writeFieldBegin('creator', TType.STRUCT, 2)
            self.creator.write(oprot)
            oprot.writeFieldEnd()
        if self.authority is not None:
            oprot.writeFieldBegin('authority', TType.STRUCT, 3)
            self.authority.write(oprot)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.STRUCT, 4)
            self.status.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CreateSquareRequest(object):
    """
    Attributes:
     - reqSeq
     - square
     - creator

    """

    def __init__(
        self,
        reqSeq=None,
        square=None,
        creator=None,
    ):
        self.reqSeq = reqSeq
        self.square = square
        self.creator = creator

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.creator = SquareMember()
                    self.creator.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CreateSquareRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 2)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        if self.creator is not None:
            oprot.writeFieldBegin('creator', TType.STRUCT, 3)
            self.creator.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DeleteSquareResponse(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('DeleteSquareResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DeleteSquareRequest(object):
    """
    Attributes:
     - mid
     - revision

    """

    def __init__(
        self,
        mid=None,
        revision=None,
    ):
        self.mid = mid
        self.revision = revision

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('DeleteSquareRequest')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 2)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 3)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DestroyMessageResponse(object):
    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('DestroyMessageResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DestroyMessageRequest(object):
    """
    Attributes:
     - squareChatMid
     - messageId

    """

    def __init__(
        self,
        squareChatMid=None,
        messageId=None,
    ):
        self.squareChatMid = squareChatMid
        self.messageId = messageId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.messageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('DestroyMessageRequest')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.STRING, 4)
            oprot.writeString(
                self.messageId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.messageId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareChatMemberResponse(object):
    """
    Attributes:
     - squareChatMember

    """

    def __init__(
        self,
        squareChatMember=None,
    ):
        self.squareChatMember = squareChatMember

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.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('GetSquareChatMemberResponse')
        if self.squareChatMember is not None:
            oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 1)
            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 SearchSquareChatMembersRequest(object):
    """
    Attributes:
     - squareChatMid
     - searchOption
     - continuationToken
     - limit

    """

    def __init__(
        self,
        squareChatMid=None,
        searchOption=None,
        continuationToken=None,
        limit=None,
    ):
        self.squareChatMid = squareChatMid
        self.searchOption = searchOption
        self.continuationToken = continuationToken
        self.limit = limit

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.searchOption = SquareChatMemberSearchOption()
                    self.searchOption.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SearchSquareChatMembersRequest')
        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.searchOption is not None:
            oprot.writeFieldBegin('searchOption', TType.STRUCT, 2)
            self.searchOption.write(oprot)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 3)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 4)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SearchSquareChatMembersResponse(object):
    """
    Attributes:
     - members
     - continuationToken

    """

    def __init__(
        self,
        members=None,
        continuationToken=None,
    ):
        self.members = members
        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.members = []
                    (_etype547, _size544) = iprot.readListBegin()
                    for _i548 in range(_size544):
                        _elem549 = SquareMember()
                        _elem549.read(iprot)
                        self.members.append(_elem549)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SearchSquareChatMembersResponse')
        if self.members is not None:
            oprot.writeFieldBegin('members', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.members))
            for iter550 in self.members:
                iter550.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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SearchSquareMembersRequest(object):
    """
    Attributes:
     - squareMid
     - searchOption
     - continuationToken
     - limit

    """

    def __init__(
        self,
        squareMid=None,
        searchOption=None,
        continuationToken=None,
        limit=None,
    ):
        self.squareMid = squareMid
        self.searchOption = searchOption
        self.continuationToken = continuationToken
        self.limit = limit

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.searchOption = SquareChatMemberSearchOption()
                    self.searchOption.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SearchSquareMembersRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.searchOption is not None:
            oprot.writeFieldBegin('searchOption', TType.STRUCT, 3)
            self.searchOption.write(oprot)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 5)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SearchSquareMembersResponse(object):
    """
    Attributes:
     - members
     - revision
     - continuationToken
     - totalCount

    """

    def __init__(
        self,
        members=None,
        revision=None,
        continuationToken=None,
        totalCount=None,
    ):
        self.members = members
        self.revision = revision
        self.continuationToken = continuationToken
        self.totalCount = totalCount

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.members = []
                    (_etype554, _size551) = iprot.readListBegin()
                    for _i555 in range(_size551):
                        _elem556 = SquareMember()
                        _elem556.read(iprot)
                        self.members.append(_elem556)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.totalCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SearchSquareMembersResponse')
        if self.members is not None:
            oprot.writeFieldBegin('members', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.members))
            for iter557 in self.members:
                iter557.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 2)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 3)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        if self.totalCount is not None:
            oprot.writeFieldBegin('totalCount', TType.I32, 4)
            oprot.writeI32(self.totalCount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareChatMembersRequest(object):
    """
    Attributes:
     - squareChatMid
     - continuationToken
     - limit

    """

    def __init__(
        self,
        squareChatMid=None,
        continuationToken=None,
        limit=None,
    ):
        self.squareChatMid = squareChatMid
        self.continuationToken = continuationToken
        self.limit = limit

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareChatMembersRequest')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 3)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class InviteIntoSquareChatRequest(object):
    """
    Attributes:
     - inviteeMids
     - squareChatMid

    """

    def __init__(
        self,
        inviteeMids=None,
        squareChatMid=None,
    ):
        self.inviteeMids = inviteeMids
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.inviteeMids = []
                    (_etype561, _size558) = iprot.readListBegin()
                    for _i562 in range(_size558):
                        _elem563 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.inviteeMids.append(_elem563)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('InviteIntoSquareChatRequest')
        if self.inviteeMids is not None:
            oprot.writeFieldBegin('inviteeMids', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.inviteeMids))
            for iter564 in self.inviteeMids:
                oprot.writeString(
                    iter564.encode('utf-8') if sys.version_info[0] == 2 else iter564
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class 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 = []
                    (_etype568, _size565) = iprot.readListBegin()
                    for _i569 in range(_size565):
                        _elem570 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.inviteeMids.append(_elem570)
                    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 iter571 in self.inviteeMids:
                oprot.writeString(
                    iter571.encode('utf-8') if sys.version_info[0] == 2 else iter571
                )
            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 GetSquareChatMembersResponse(object):
    """
    Attributes:
     - squareChatMembers
     - continuationToken

    """

    def __init__(
        self,
        squareChatMembers=None,
        continuationToken=None,
    ):
        self.squareChatMembers = squareChatMembers
        self.continuationToken = continuationToken

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.squareChatMembers = SquareMember()
                    self.squareChatMembers.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareChatMembersResponse')
        if self.squareChatMembers is not None:
            oprot.writeFieldBegin('squareChatMembers', TType.STRUCT, 1)
            self.squareChatMembers.write(oprot)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareChatStatusRequest(object):
    """
    Attributes:
     - squareChatMid

    """

    def __init__(
        self,
        squareChatMid=None,
    ):
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareChatStatusRequest')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareChatStatusResponse(object):
    """
    Attributes:
     - chatStatus

    """

    def __init__(
        self,
        chatStatus=None,
    ):
        self.chatStatus = chatStatus

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.chatStatus = SquareChatStatus()
                    self.chatStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareChatStatusResponse')
        if self.chatStatus is not None:
            oprot.writeFieldBegin('chatStatus', TType.STRUCT, 1)
            self.chatStatus.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareChatRequest(object):
    """
    Attributes:
     - squareChatMid

    """

    def __init__(
        self,
        squareChatMid=None,
    ):
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareChatRequest')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareChatResponse(object):
    """
    Attributes:
     - squareChat
     - squareChatMember
     - squareChatStatus

    """

    def __init__(
        self,
        squareChat=None,
        squareChatMember=None,
        squareChatStatus=None,
    ):
        self.squareChat = squareChat
        self.squareChatMember = squareChatMember
        self.squareChatStatus = squareChatStatus

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.squareChat = SquareChat()
                    self.squareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareChatMember = SquareChatMember()
                    self.squareChatMember.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareChatStatus = SquareChatStatus()
                    self.squareChatStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareChatResponse')
        if self.squareChat is not None:
            oprot.writeFieldBegin('squareChat', TType.STRUCT, 1)
            self.squareChat.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChatMember is not None:
            oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 2)
            self.squareChatMember.write(oprot)
            oprot.writeFieldEnd()
        if self.squareChatStatus is not None:
            oprot.writeFieldBegin('squareChatStatus', TType.STRUCT, 3)
            self.squareChatStatus.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareAuthorityRequest(object):
    """
    Attributes:
     - squareMid

    """

    def __init__(
        self,
        squareMid=None,
    ):
        self.squareMid = squareMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareAuthorityRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareAuthorityResponse(object):
    """
    Attributes:
     - authority

    """

    def __init__(
        self,
        authority=None,
    ):
        self.authority = authority

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.authority = SquareAuthority()
                    self.authority.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareAuthorityResponse')
        if self.authority is not None:
            oprot.writeFieldBegin('authority', TType.STRUCT, 1)
            self.authority.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetJoinedSquaresRequest(object):
    """
    Attributes:
     - continuationToken
     - limit

    """

    def __init__(
        self,
        continuationToken=None,
        limit=None,
    ):
        self.continuationToken = continuationToken
        self.limit = limit

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetJoinedSquaresRequest')
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 3)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetJoinedSquaresResponse(object):
    """
    Attributes:
     - squares
     - members
     - authorities
     - statuses
     - continuationToken
     - noteStatuses

    """

    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 = []
                    (_etype575, _size572) = iprot.readListBegin()
                    for _i576 in range(_size572):
                        _elem577 = Square()
                        _elem577.read(iprot)
                        self.squares.append(_elem577)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.members = {}
                    (_ktype579, _vtype580, _size578) = iprot.readMapBegin()
                    for _i582 in range(_size578):
                        _key583 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val584 = SquareMember()
                        _val584.read(iprot)
                        self.members[_key583] = _val584
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.authorities = {}
                    (_ktype586, _vtype587, _size585) = iprot.readMapBegin()
                    for _i589 in range(_size585):
                        _key590 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val591 = SquareAuthority()
                        _val591.read(iprot)
                        self.authorities[_key590] = _val591
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.MAP:
                    self.statuses = {}
                    (_ktype593, _vtype594, _size592) = iprot.readMapBegin()
                    for _i596 in range(_size592):
                        _key597 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val598 = SquareStatus()
                        _val598.read(iprot)
                        self.statuses[_key597] = _val598
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.MAP:
                    self.noteStatuses = {}
                    (_ktype600, _vtype601, _size599) = iprot.readMapBegin()
                    for _i603 in range(_size599):
                        _key604 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val605 = NoteStatus()
                        _val605.read(iprot)
                        self.noteStatuses[_key604] = _val605
                    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 iter606 in self.squares:
                iter606.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 kiter607, viter608 in self.members.items():
                oprot.writeString(
                    kiter607.encode('utf-8') if sys.version_info[0] == 2 else kiter607
                )
                viter608.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 kiter609, viter610 in self.authorities.items():
                oprot.writeString(
                    kiter609.encode('utf-8') if sys.version_info[0] == 2 else kiter609
                )
                viter610.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 kiter611, viter612 in self.statuses.items():
                oprot.writeString(
                    kiter611.encode('utf-8') if sys.version_info[0] == 2 else kiter611
                )
                viter612.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 kiter613, viter614 in self.noteStatuses.items():
                oprot.writeString(
                    kiter613.encode('utf-8') if sys.version_info[0] == 2 else kiter613
                )
                viter614.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetJoinableSquareChatsRequest(object):
    """
    Attributes:
     - squareMid
     - continuationToken
     - limit

    """

    def __init__(
        self,
        squareMid=None,
        continuationToken=None,
        limit=None,
    ):
        self.squareMid = squareMid
        self.continuationToken = continuationToken
        self.limit = limit

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetJoinableSquareChatsRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 10)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 11)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetJoinableSquareChatsResponse(object):
    """
    Attributes:
     - squareChats
     - continuationToken
     - totalSquareChatCount
     - squareChatStatuses

    """

    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 = []
                    (_etype618, _size615) = iprot.readListBegin()
                    for _i619 in range(_size615):
                        _elem620 = SquareChat()
                        _elem620.read(iprot)
                        self.squareChats.append(_elem620)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.totalSquareChatCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.MAP:
                    self.squareChatStatuses = {}
                    (_ktype622, _vtype623, _size621) = iprot.readMapBegin()
                    for _i625 in range(_size621):
                        _key626 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val627 = SquareChatStatus()
                        _val627.read(iprot)
                        self.squareChatStatuses[_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('GetJoinableSquareChatsResponse')
        if self.squareChats is not None:
            oprot.writeFieldBegin('squareChats', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.squareChats))
            for iter628 in self.squareChats:
                iter628.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 kiter629, viter630 in self.squareChatStatuses.items():
                oprot.writeString(
                    kiter629.encode('utf-8') if sys.version_info[0] == 2 else kiter629
                )
                viter630.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetInvitationTicketUrlRequest(object):
    """
    Attributes:
     - mid

    """

    def __init__(
        self,
        mid=None,
    ):
        self.mid = mid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetInvitationTicketUrlRequest')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 2)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetInvitationTicketUrlResponse(object):
    """
    Attributes:
     - invitationURL

    """

    def __init__(
        self,
        invitationURL=None,
    ):
        self.invitationURL = invitationURL

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.invitationURL = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetInvitationTicketUrlResponse')
        if self.invitationURL is not None:
            oprot.writeFieldBegin('invitationURL', TType.STRING, 1)
            oprot.writeString(
                self.invitationURL.encode('utf-8')
                if sys.version_info[0] == 2
                else self.invitationURL
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class LeaveSquareRequest(object):
    """
    Attributes:
     - squareMid

    """

    def __init__(
        self,
        squareMid=None,
    ):
        self.squareMid = squareMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LeaveSquareRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class LeaveSquareResponse(object):
    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LeaveSquareResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class LeaveSquareChatRequest(object):
    """
    Attributes:
     - squareChatMid
     - sayGoodbye
     - squareChatMemberRevision

    """

    def __init__(
        self,
        squareChatMid=None,
        sayGoodbye=None,
        squareChatMemberRevision=None,
    ):
        self.squareChatMid = squareChatMid
        self.sayGoodbye = sayGoodbye
        self.squareChatMemberRevision = squareChatMemberRevision

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.sayGoodbye = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.squareChatMemberRevision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LeaveSquareChatRequest')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.sayGoodbye is not None:
            oprot.writeFieldBegin('sayGoodbye', TType.BOOL, 3)
            oprot.writeBool(self.sayGoodbye)
            oprot.writeFieldEnd()
        if self.squareChatMemberRevision is not None:
            oprot.writeFieldBegin('squareChatMemberRevision', TType.I64, 4)
            oprot.writeI64(self.squareChatMemberRevision)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class LeaveSquareChatResponse(object):
    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LeaveSquareChatResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareMemberSearchOption(object):
    """
    Attributes:
     - membershipState
     - memberRoles
     - displayName
     - ableToReceiveMessage
     - ableToReceiveFriendRequest
     - chatMidToExcludeMembers
     - includingMe
     - excludeBlockedMembers

    """

    def __init__(
        self,
        membershipState=None,
        memberRoles=None,
        displayName=None,
        ableToReceiveMessage=None,
        ableToReceiveFriendRequest=None,
        chatMidToExcludeMembers=None,
        includingMe=None,
        excludeBlockedMembers=None,
    ):
        self.membershipState = membershipState
        self.memberRoles = memberRoles
        self.displayName = displayName
        self.ableToReceiveMessage = ableToReceiveMessage
        self.ableToReceiveFriendRequest = ableToReceiveFriendRequest
        self.chatMidToExcludeMembers = chatMidToExcludeMembers
        self.includingMe = includingMe
        self.excludeBlockedMembers = excludeBlockedMembers

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.membershipState = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.SET:
                    self.memberRoles = set()
                    (_etype634, _size631) = iprot.readSetBegin()
                    for _i635 in range(_size631):
                        _elem636 = iprot.readI32()
                        self.memberRoles.add(_elem636)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.displayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.ableToReceiveMessage = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.ableToReceiveFriendRequest = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.chatMidToExcludeMembers = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.includingMe = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.BOOL:
                    self.excludeBlockedMembers = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareMemberSearchOption')
        if self.membershipState is not None:
            oprot.writeFieldBegin('membershipState', TType.I32, 1)
            oprot.writeI32(self.membershipState)
            oprot.writeFieldEnd()
        if self.memberRoles is not None:
            oprot.writeFieldBegin('memberRoles', TType.SET, 2)
            oprot.writeSetBegin(TType.I32, len(self.memberRoles))
            for iter637 in self.memberRoles:
                oprot.writeI32(iter637)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 3)
            oprot.writeString(
                self.displayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.displayName
            )
            oprot.writeFieldEnd()
        if self.ableToReceiveMessage is not None:
            oprot.writeFieldBegin('ableToReceiveMessage', TType.I32, 4)
            oprot.writeI32(self.ableToReceiveMessage)
            oprot.writeFieldEnd()
        if self.ableToReceiveFriendRequest is not None:
            oprot.writeFieldBegin('ableToReceiveFriendRequest', TType.I32, 5)
            oprot.writeI32(self.ableToReceiveFriendRequest)
            oprot.writeFieldEnd()
        if self.chatMidToExcludeMembers is not None:
            oprot.writeFieldBegin('chatMidToExcludeMembers', TType.STRING, 6)
            oprot.writeString(
                self.chatMidToExcludeMembers.encode('utf-8')
                if sys.version_info[0] == 2
                else self.chatMidToExcludeMembers
            )
            oprot.writeFieldEnd()
        if self.includingMe is not None:
            oprot.writeFieldBegin('includingMe', TType.BOOL, 7)
            oprot.writeBool(self.includingMe)
            oprot.writeFieldEnd()
        if self.excludeBlockedMembers is not None:
            oprot.writeFieldBegin('excludeBlockedMembers', TType.BOOL, 8)
            oprot.writeBool(self.excludeBlockedMembers)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class FindSquareByInvitationTicketRequest(object):
    """
    Attributes:
     - invitationTicket

    """

    def __init__(
        self,
        invitationTicket=None,
    ):
        self.invitationTicket = invitationTicket

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.invitationTicket = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FindSquareByInvitationTicketRequest')
        if self.invitationTicket is not None:
            oprot.writeFieldBegin('invitationTicket', TType.STRING, 2)
            oprot.writeString(
                self.invitationTicket.encode('utf-8')
                if sys.version_info[0] == 2
                else self.invitationTicket
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class FindSquareByInvitationTicketResponse(object):
    """
    Attributes:
     - square
     - myMembership
     - squareAuthority
     - squareStatus

    """

    def __init__(
        self,
        square=None,
        myMembership=None,
        squareAuthority=None,
        squareStatus=None,
    ):
        self.square = square
        self.myMembership = myMembership
        self.squareAuthority = squareAuthority
        self.squareStatus = squareStatus

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.myMembership = SquareMember()
                    self.myMembership.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareAuthority = SquareAuthority()
                    self.squareAuthority.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.squareStatus = SquareStatus()
                    self.squareStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FindSquareByInvitationTicketResponse')
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 1)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        if self.myMembership is not None:
            oprot.writeFieldBegin('myMembership', TType.STRUCT, 2)
            self.myMembership.write(oprot)
            oprot.writeFieldEnd()
        if self.squareAuthority is not None:
            oprot.writeFieldBegin('squareAuthority', TType.STRUCT, 3)
            self.squareAuthority.write(oprot)
            oprot.writeFieldEnd()
        if self.squareStatus is not None:
            oprot.writeFieldBegin('squareStatus', TType.STRUCT, 4)
            self.squareStatus.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareAuthoritiesRequest(object):
    """
    Attributes:
     - squareMids

    """

    def __init__(
        self,
        squareMids=None,
    ):
        self.squareMids = squareMids

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.SET:
                    self.squareMids = set()
                    (_etype641, _size638) = iprot.readSetBegin()
                    for _i642 in range(_size638):
                        _elem643 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.squareMids.add(_elem643)
                    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('GetSquareAuthoritiesRequest')
        if self.squareMids is not None:
            oprot.writeFieldBegin('squareMids', TType.SET, 2)
            oprot.writeSetBegin(TType.STRING, len(self.squareMids))
            for iter644 in self.squareMids:
                oprot.writeString(
                    iter644.encode('utf-8') if sys.version_info[0] == 2 else iter644
                )
            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 GetSquareAuthoritiesResponse(object):
    """
    Attributes:
     - authorities

    """

    def __init__(
        self,
        authorities=None,
    ):
        self.authorities = authorities

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.authorities = {}
                    (_ktype646, _vtype647, _size645) = iprot.readMapBegin()
                    for _i649 in range(_size645):
                        _key650 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val651 = SquareAuthority()
                        _val651.read(iprot)
                        self.authorities[_key650] = _val651
                    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('GetSquareAuthoritiesResponse')
        if self.authorities is not None:
            oprot.writeFieldBegin('authorities', TType.MAP, 1)
            oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.authorities))
            for kiter652, viter653 in self.authorities.items():
                oprot.writeString(
                    kiter652.encode('utf-8') if sys.version_info[0] == 2 else kiter652
                )
                viter653.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 SquareEventReceiveMessage(object):
    """
    Attributes:
     - squareChatMid
     - squareMessage

    """

    def __init__(
        self,
        squareChatMid=None,
        squareMessage=None,
    ):
        self.squareChatMid = squareChatMid
        self.squareMessage = squareMessage

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareMessage = SquareMessage()
                    self.squareMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventReceiveMessage')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareMessage is not None:
            oprot.writeFieldBegin('squareMessage', TType.STRUCT, 2)
            self.squareMessage.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareChatMemberRequest(object):
    """
    Attributes:
     - squareMemberMid
     - squareChatMid

    """

    def __init__(
        self,
        squareMemberMid=None,
        squareChatMid=None,
    ):
        self.squareMemberMid = squareMemberMid
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareChatMemberRequest')
        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.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 3)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventSendMessage(object):
    """
    Attributes:
     - squareChatMid
     - squareMessage
     - reqSeq

    """

    def __init__(
        self,
        squareChatMid=None,
        squareMessage=None,
        reqSeq=None,
    ):
        self.squareChatMid = squareChatMid
        self.squareMessage = squareMessage
        self.reqSeq = reqSeq

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareMessage = SquareMessage()
                    self.squareMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventSendMessage')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareMessage is not None:
            oprot.writeFieldBegin('squareMessage', TType.STRUCT, 2)
            self.squareMessage.write(oprot)
            oprot.writeFieldEnd()
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 3)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedJoinSquareChat(object):
    """
    Attributes:
     - squareChatMid
     - joinedMember

    """

    def __init__(
        self,
        squareChatMid=None,
        joinedMember=None,
    ):
        self.squareChatMid = squareChatMid
        self.joinedMember = joinedMember

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.joinedMember = SquareMember()
                    self.joinedMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedJoinSquareChat')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.joinedMember is not None:
            oprot.writeFieldBegin('joinedMember', TType.STRUCT, 2)
            self.joinedMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedInviteIntoSquareChat(object):
    """
    Attributes:
     - squareChatMid
     - invitees
     - invitor
     - invitorRelation

    """

    def __init__(
        self,
        squareChatMid=None,
        invitees=None,
        invitor=None,
        invitorRelation=None,
    ):
        self.squareChatMid = squareChatMid
        self.invitees = invitees
        self.invitor = invitor
        self.invitorRelation = invitorRelation

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.invitees = []
                    (_etype657, _size654) = iprot.readListBegin()
                    for _i658 in range(_size654):
                        _elem659 = SquareMember()
                        _elem659.read(iprot)
                        self.invitees.append(_elem659)
                    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 iter660 in self.invitees:
                iter660.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')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.sayGoodbye = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.squareMember = SquareMember()
                    self.squareMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedLeaveSquareChat')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMemberMid
            )
            oprot.writeFieldEnd()
        if self.sayGoodbye is not None:
            oprot.writeFieldBegin('sayGoodbye', TType.BOOL, 3)
            oprot.writeBool(self.sayGoodbye)
            oprot.writeFieldEnd()
        if self.squareMember is not None:
            oprot.writeFieldBegin('squareMember', TType.STRUCT, 4)
            self.squareMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedDestroyMessage(object):
    """
    Attributes:
     - squareChatMid
     - messageId

    """

    def __init__(
        self,
        squareChatMid=None,
        messageId=None,
    ):
        self.squareChatMid = squareChatMid
        self.messageId = messageId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.messageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedDestroyMessage')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.STRING, 3)
            oprot.writeString(
                self.messageId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.messageId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedMarkAsRead(object):
    """
    Attributes:
     - squareChatMid
     - sMemberMid
     - messageId

    """

    def __init__(
        self,
        squareChatMid=None,
        sMemberMid=None,
        messageId=None,
    ):
        self.squareChatMid = squareChatMid
        self.sMemberMid = sMemberMid
        self.messageId = messageId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.sMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.messageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedMarkAsRead')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.sMemberMid is not None:
            oprot.writeFieldBegin('sMemberMid', TType.STRING, 2)
            oprot.writeString(
                self.sMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.sMemberMid
            )
            oprot.writeFieldEnd()
        if self.messageId is not None:
            oprot.writeFieldBegin('messageId', TType.STRING, 4)
            oprot.writeString(
                self.messageId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.messageId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedUpdateSquareMemberProfile(object):
    """
    Attributes:
     - squareChatMid
     - squareMember

    """

    def __init__(
        self,
        squareChatMid=None,
        squareMember=None,
    ):
        self.squareChatMid = squareChatMid
        self.squareMember = squareMember

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareMember = SquareMember()
                    self.squareMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareMemberProfile')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareMember is not None:
            oprot.writeFieldBegin('squareMember', TType.STRUCT, 2)
            self.squareMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedKickoutFromSquare(object):
    """
    Attributes:
     - squareChatMid
     - kickees

    """

    def __init__(
        self,
        squareChatMid=None,
        kickees=None,
    ):
        self.squareChatMid = squareChatMid
        self.kickees = kickees

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.kickees = []
                    (_etype664, _size661) = iprot.readListBegin()
                    for _i665 in range(_size661):
                        _elem666 = SquareMember()
                        _elem666.read(iprot)
                        self.kickees.append(_elem666)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedKickoutFromSquare')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.kickees is not None:
            oprot.writeFieldBegin('kickees', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.kickees))
            for iter667 in self.kickees:
                iter667.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedShutdownSquare(object):
    """
    Attributes:
     - squareChatMid
     - square

    """

    def __init__(
        self,
        squareChatMid=None,
        square=None,
    ):
        self.squareChatMid = squareChatMid
        self.square = square

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedShutdownSquare')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 2)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedDeleteSquareChat(object):
    """
    Attributes:
     - squareChat

    """

    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')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.editor = SquareMember()
                    self.editor.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.updatedChatName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareChatProfileName')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.editor is not None:
            oprot.writeFieldBegin('editor', TType.STRUCT, 2)
            self.editor.write(oprot)
            oprot.writeFieldEnd()
        if self.updatedChatName is not None:
            oprot.writeFieldBegin('updatedChatName', TType.STRING, 3)
            oprot.writeString(
                self.updatedChatName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.updatedChatName
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedUpdateSquareChatProfileImage(object):
    """
    Attributes:
     - squareChatMid
     - editor

    """

    def __init__(
        self,
        squareChatMid=None,
        editor=None,
    ):
        self.squareChatMid = squareChatMid
        self.editor = editor

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.editor = SquareMember()
                    self.editor.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareChatProfileImage')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.editor is not None:
            oprot.writeFieldBegin('editor', TType.STRUCT, 2)
            self.editor.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedUpdateSquareChatStatus(object):
    """
    Attributes:
     - squareChatMid
     - statusWithoutMessage

    """

    def __init__(
        self,
        squareChatMid=None,
        statusWithoutMessage=None,
    ):
        self.squareChatMid = squareChatMid
        self.statusWithoutMessage = statusWithoutMessage

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.statusWithoutMessage = SquareChatStatusWithoutMessage()
                    self.statusWithoutMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareChatStatus')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.statusWithoutMessage is not None:
            oprot.writeFieldBegin('statusWithoutMessage', TType.STRUCT, 2)
            self.statusWithoutMessage.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedUpdateSquareStatus(object):
    """
    Attributes:
     - squareMid
     - squareStatus

    """

    def __init__(
        self,
        squareMid=None,
        squareStatus=None,
    ):
        self.squareMid = squareMid
        self.squareStatus = squareStatus

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareStatus = SquareStatus()
                    self.squareStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareStatus')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.squareStatus is not None:
            oprot.writeFieldBegin('squareStatus', TType.STRUCT, 2)
            self.squareStatus.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedCreateSquareMember(object):
    """
    Attributes:
     - square
     - squareAuthority
     - squareStatus
     - squareMember
     - squareFeatureSet

    """

    def __init__(
        self,
        square=None,
        squareAuthority=None,
        squareStatus=None,
        squareMember=None,
        squareFeatureSet=None,
    ):
        self.square = square
        self.squareAuthority = squareAuthority
        self.squareStatus = squareStatus
        self.squareMember = squareMember
        self.squareFeatureSet = squareFeatureSet

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareAuthority = SquareAuthority()
                    self.squareAuthority.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareStatus = SquareStatus()
                    self.squareStatus.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.squareMember = SquareMember()
                    self.squareMember.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.squareFeatureSet = SquareFeatureSet()
                    self.squareFeatureSet.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedCreateSquareMember')
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 1)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        if self.squareAuthority is not None:
            oprot.writeFieldBegin('squareAuthority', TType.STRUCT, 2)
            self.squareAuthority.write(oprot)
            oprot.writeFieldEnd()
        if self.squareStatus is not None:
            oprot.writeFieldBegin('squareStatus', TType.STRUCT, 3)
            self.squareStatus.write(oprot)
            oprot.writeFieldEnd()
        if self.squareMember is not None:
            oprot.writeFieldBegin('squareMember', TType.STRUCT, 4)
            self.squareMember.write(oprot)
            oprot.writeFieldEnd()
        if self.squareFeatureSet is not None:
            oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 5)
            self.squareFeatureSet.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedCreateSquareChatMember(object):
    """
    Attributes:
     - squareChatMid
     - squareMemberMid
     - squareChatMember

    """

    def __init__(
        self,
        squareChatMid=None,
        squareMemberMid=None,
        squareChatMember=None,
    ):
        self.squareChatMid = squareChatMid
        self.squareMemberMid = squareMemberMid
        self.squareChatMember = squareChatMember

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareChatMember = SquareChatMember()
                    self.squareChatMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedCreateSquareChatMember')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMemberMid
            )
            oprot.writeFieldEnd()
        if self.squareChatMember is not None:
            oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 3)
            self.squareChatMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedUpdateSquareMemberRelation(object):
    """
    Attributes:
     - squareMid
     - myMemberMid
     - targetSquareMemberMid
     - squareMemberRelation

    """

    def __init__(
        self,
        squareMid=None,
        myMemberMid=None,
        targetSquareMemberMid=None,
        squareMemberRelation=None,
    ):
        self.squareMid = squareMid
        self.myMemberMid = myMemberMid
        self.targetSquareMemberMid = targetSquareMemberMid
        self.squareMemberRelation = squareMemberRelation

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.myMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.targetSquareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.squareMemberRelation = SquareMemberRelation()
                    self.squareMemberRelation.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareMemberRelation')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.myMemberMid is not None:
            oprot.writeFieldBegin('myMemberMid', TType.STRING, 2)
            oprot.writeString(
                self.myMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.myMemberMid
            )
            oprot.writeFieldEnd()
        if self.targetSquareMemberMid is not None:
            oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 3)
            oprot.writeString(
                self.targetSquareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.targetSquareMemberMid
            )
            oprot.writeFieldEnd()
        if self.squareMemberRelation is not None:
            oprot.writeFieldBegin('squareMemberRelation', TType.STRUCT, 4)
            self.squareMemberRelation.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedUpdateSquare(object):
    """
    Attributes:
     - squareMid
     - square

    """

    def __init__(
        self,
        squareMid=None,
        square=None,
    ):
        self.squareMid = squareMid
        self.square = square

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquare')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 2)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedUpdateSquareMember(object):
    """
    Attributes:
     - squareMid
     - squareMemberMid
     - squareMember

    """

    def __init__(
        self,
        squareMid=None,
        squareMemberMid=None,
        squareMember=None,
    ):
        self.squareMid = squareMid
        self.squareMemberMid = squareMemberMid
        self.squareMember = squareMember

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareMember = SquareMember()
                    self.squareMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareMember')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMemberMid
            )
            oprot.writeFieldEnd()
        if self.squareMember is not None:
            oprot.writeFieldBegin('squareMember', TType.STRUCT, 3)
            self.squareMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedUpdateSquareChat(object):
    """
    Attributes:
     - squareMid
     - squareChatMid
     - squareChat

    """

    def __init__(
        self,
        squareMid=None,
        squareChatMid=None,
        squareChat=None,
    ):
        self.squareMid = squareMid
        self.squareChatMid = squareChatMid
        self.squareChat = squareChat

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareChat = SquareChat()
                    self.squareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareChat')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareChat is not None:
            oprot.writeFieldBegin('squareChat', TType.STRUCT, 3)
            self.squareChat.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotificationJoinRequest(object):
    """
    Attributes:
     - squareMid
     - squareName
     - requestMemberName
     - profileImageObsHash

    """

    def __init__(
        self,
        squareMid=None,
        squareName=None,
        requestMemberName=None,
        profileImageObsHash=None,
    ):
        self.squareMid = squareMid
        self.squareName = squareName
        self.requestMemberName = requestMemberName
        self.profileImageObsHash = profileImageObsHash

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.requestMemberName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.profileImageObsHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotificationJoinRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.squareName is not None:
            oprot.writeFieldBegin('squareName', TType.STRING, 2)
            oprot.writeString(
                self.squareName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareName
            )
            oprot.writeFieldEnd()
        if self.requestMemberName is not None:
            oprot.writeFieldBegin('requestMemberName', TType.STRING, 3)
            oprot.writeString(
                self.requestMemberName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.requestMemberName
            )
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 4)
            oprot.writeString(
                self.profileImageObsHash.encode('utf-8')
                if sys.version_info[0] == 2
                else self.profileImageObsHash
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotificationMemberUpdate(object):
    """
    Attributes:
     - squareMid
     - squareName
     - profileImageObsHash

    """

    def __init__(
        self,
        squareMid=None,
        squareName=None,
        profileImageObsHash=None,
    ):
        self.squareMid = squareMid
        self.squareName = squareName
        self.profileImageObsHash = profileImageObsHash

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.profileImageObsHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotificationMemberUpdate')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.squareName is not None:
            oprot.writeFieldBegin('squareName', TType.STRING, 2)
            oprot.writeString(
                self.squareName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareName
            )
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 3)
            oprot.writeString(
                self.profileImageObsHash.encode('utf-8')
                if sys.version_info[0] == 2
                else self.profileImageObsHash
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotificationSquareDelete(object):
    """
    Attributes:
     - squareMid
     - squareName
     - profileImageObsHash

    """

    def __init__(
        self,
        squareMid=None,
        squareName=None,
        profileImageObsHash=None,
    ):
        self.squareMid = squareMid
        self.squareName = squareName
        self.profileImageObsHash = profileImageObsHash

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.profileImageObsHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotificationSquareDelete')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.squareName is not None:
            oprot.writeFieldBegin('squareName', TType.STRING, 2)
            oprot.writeString(
                self.squareName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareName
            )
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 3)
            oprot.writeString(
                self.profileImageObsHash.encode('utf-8')
                if sys.version_info[0] == 2
                else self.profileImageObsHash
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotificationSquareChatDelete(object):
    """
    Attributes:
     - squareChatMid
     - squareChatName
     - profileImageObsHash

    """

    def __init__(
        self,
        squareChatMid=None,
        squareChatName=None,
        profileImageObsHash=None,
    ):
        self.squareChatMid = squareChatMid
        self.squareChatName = squareChatName
        self.profileImageObsHash = profileImageObsHash

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.profileImageObsHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotificationSquareChatDelete')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareChatName is not None:
            oprot.writeFieldBegin('squareChatName', TType.STRING, 2)
            oprot.writeString(
                self.squareChatName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatName
            )
            oprot.writeFieldEnd()
        if self.profileImageObsHash is not None:
            oprot.writeFieldBegin('profileImageObsHash', TType.STRING, 3)
            oprot.writeString(
                self.profileImageObsHash.encode('utf-8')
                if sys.version_info[0] == 2
                else self.profileImageObsHash
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotificationMessage(object):
    """
    Attributes:
     - squareChatMid
     - squareMessage
     - senderDisplayName
     - unreadCount
     - requiredToFetchChatEvents

    """

    def __init__(
        self,
        squareChatMid=None,
        squareMessage=None,
        senderDisplayName=None,
        unreadCount=None,
        requiredToFetchChatEvents=None,
    ):
        self.squareChatMid = squareChatMid
        self.squareMessage = squareMessage
        self.senderDisplayName = senderDisplayName
        self.unreadCount = unreadCount
        self.requiredToFetchChatEvents = requiredToFetchChatEvents

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareMessage = SquareMessage()
                    self.squareMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.senderDisplayName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.unreadCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.requiredToFetchChatEvents = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotificationMessage')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareMessage is not None:
            oprot.writeFieldBegin('squareMessage', TType.STRUCT, 2)
            self.squareMessage.write(oprot)
            oprot.writeFieldEnd()
        if self.senderDisplayName is not None:
            oprot.writeFieldBegin('senderDisplayName', TType.STRING, 3)
            oprot.writeString(
                self.senderDisplayName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.senderDisplayName
            )
            oprot.writeFieldEnd()
        if self.unreadCount is not None:
            oprot.writeFieldBegin('unreadCount', TType.I32, 4)
            oprot.writeI32(self.unreadCount)
            oprot.writeFieldEnd()
        if self.requiredToFetchChatEvents is not None:
            oprot.writeFieldBegin('requiredToFetchChatEvents', TType.BOOL, 5)
            oprot.writeBool(self.requiredToFetchChatEvents)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedUpdateSquareChatMember(object):
    """
    Attributes:
     - squareChatMid
     - squareMemberMid
     - squareChatMember

    """

    def __init__(
        self,
        squareChatMid=None,
        squareMemberMid=None,
        squareChatMember=None,
    ):
        self.squareChatMid = squareChatMid
        self.squareMemberMid = squareMemberMid
        self.squareChatMember = squareChatMember

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareChatMember = SquareChatMember()
                    self.squareChatMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareChatMember')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMemberMid
            )
            oprot.writeFieldEnd()
        if self.squareChatMember is not None:
            oprot.writeFieldBegin('squareChatMember', TType.STRUCT, 3)
            self.squareChatMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotificationPostAnnouncement(object):
    """
    Attributes:
     - squareMid
     - squareName
     - squareProfileImageObsHash
     - actionUrl

    """

    def __init__(
        self,
        squareMid=None,
        squareName=None,
        squareProfileImageObsHash=None,
        actionUrl=None,
    ):
        self.squareMid = squareMid
        self.squareName = squareName
        self.squareProfileImageObsHash = squareProfileImageObsHash
        self.actionUrl = actionUrl

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.squareProfileImageObsHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.actionUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('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.actionUrl is not None:
            oprot.writeFieldBegin('actionUrl', TType.STRING, 4)
            oprot.writeString(
                self.actionUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.actionUrl
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareAuthority = SquareAuthority()
                    self.squareAuthority.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareAuthority')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.squareAuthority is not None:
            oprot.writeFieldBegin('squareAuthority', TType.STRUCT, 2)
            self.squareAuthority.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventNotifiedUpdateSquareFeatureSet(object):
    """
    Attributes:
     - squareFeatureSet

    """

    def __init__(
        self,
        squareFeatureSet=None,
    ):
        self.squareFeatureSet = squareFeatureSet

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.squareFeatureSet = SquareFeatureSet()
                    self.squareFeatureSet.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEventNotifiedUpdateSquareFeatureSet')
        if self.squareFeatureSet is not None:
            oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 1)
            self.squareFeatureSet.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SquareEventPayload(object):
    """
    Attributes:
     - receiveMessage
     - sendMessage
     - notifiedJoinSquareChat
     - notifiedInviteIntoSquareChat
     - notifiedLeaveSquareChat
     - notifiedDestroyMessage
     - notifiedMarkAsRead
     - notifiedUpdateSquareMemberProfile
     - notifiedKickoutFromSquare
     - notifiedShutdownSquare
     - notifiedDeleteSquareChat
     - notifiedUpdateSquareChatProfileName
     - notifiedUpdateSquareChatProfileImage
     - notifiedUpdateSquareChatMaxMemberCount
     - notifiedAddBot
     - notifiedRemoveBot
     - notifiedUpdateSquare
     - notifiedUpdateSquareStatus
     - notifiedUpdateSquareMember
     - notifiedUpdateSquareChat
     - notifiedUpdateSquareChatStatus
     - notifiedUpdateSquareChatMember
     - notifiedUpdateSquareAuthority
     - notifiedCreateSquareMember
     - notifiedCreateSquareChatMember
     - notifiedUpdateSquareMemberRelation
     - notifiedUpdateSquareFeatureSet
     - notifiedUpdateSquareNoteStatus
     - notifiedUpdateSquareChatAnnouncement
     - notificationJoinRequest
     - notificationJoined
     - notificationPromoteCoadmin
     - notificationPromoteAdmin
     - notificationDemoteMember
     - notificationKickedOut
     - notificationSquareDelete
     - notificationSquareChatDelete
     - notificationMessage
     - notificationPostAnnouncement

    """

    def __init__(
        self,
        receiveMessage=None,
        sendMessage=None,
        notifiedJoinSquareChat=None,
        notifiedInviteIntoSquareChat=None,
        notifiedLeaveSquareChat=None,
        notifiedDestroyMessage=None,
        notifiedMarkAsRead=None,
        notifiedUpdateSquareMemberProfile=None,
        notifiedKickoutFromSquare=None,
        notifiedShutdownSquare=None,
        notifiedDeleteSquareChat=None,
        notifiedUpdateSquareChatProfileName=None,
        notifiedUpdateSquareChatProfileImage=None,
        notifiedUpdateSquareChatMaxMemberCount=None,
        notifiedAddBot=None,
        notifiedRemoveBot=None,
        notifiedUpdateSquare=None,
        notifiedUpdateSquareStatus=None,
        notifiedUpdateSquareMember=None,
        notifiedUpdateSquareChat=None,
        notifiedUpdateSquareChatStatus=None,
        notifiedUpdateSquareChatMember=None,
        notifiedUpdateSquareAuthority=None,
        notifiedCreateSquareMember=None,
        notifiedCreateSquareChatMember=None,
        notifiedUpdateSquareMemberRelation=None,
        notifiedUpdateSquareFeatureSet=None,
        notifiedUpdateSquareNoteStatus=None,
        notifiedUpdateSquareChatAnnouncement=None,
        notificationJoinRequest=None,
        notificationJoined=None,
        notificationPromoteCoadmin=None,
        notificationPromoteAdmin=None,
        notificationDemoteMember=None,
        notificationKickedOut=None,
        notificationSquareDelete=None,
        notificationSquareChatDelete=None,
        notificationMessage=None,
        notificationPostAnnouncement=None,
    ):
        self.receiveMessage = receiveMessage
        self.sendMessage = sendMessage
        self.notifiedJoinSquareChat = notifiedJoinSquareChat
        self.notifiedInviteIntoSquareChat = notifiedInviteIntoSquareChat
        self.notifiedLeaveSquareChat = notifiedLeaveSquareChat
        self.notifiedDestroyMessage = notifiedDestroyMessage
        self.notifiedMarkAsRead = notifiedMarkAsRead
        self.notifiedUpdateSquareMemberProfile = notifiedUpdateSquareMemberProfile
        self.notifiedKickoutFromSquare = notifiedKickoutFromSquare
        self.notifiedShutdownSquare = notifiedShutdownSquare
        self.notifiedDeleteSquareChat = notifiedDeleteSquareChat
        self.notifiedUpdateSquareChatProfileName = notifiedUpdateSquareChatProfileName
        self.notifiedUpdateSquareChatProfileImage = notifiedUpdateSquareChatProfileImage
        self.notifiedUpdateSquareChatMaxMemberCount = (
            notifiedUpdateSquareChatMaxMemberCount
        )
        self.notifiedAddBot = notifiedAddBot
        self.notifiedRemoveBot = notifiedRemoveBot
        self.notifiedUpdateSquare = notifiedUpdateSquare
        self.notifiedUpdateSquareStatus = notifiedUpdateSquareStatus
        self.notifiedUpdateSquareMember = notifiedUpdateSquareMember
        self.notifiedUpdateSquareChat = notifiedUpdateSquareChat
        self.notifiedUpdateSquareChatStatus = notifiedUpdateSquareChatStatus
        self.notifiedUpdateSquareChatMember = notifiedUpdateSquareChatMember
        self.notifiedUpdateSquareAuthority = notifiedUpdateSquareAuthority
        self.notifiedCreateSquareMember = notifiedCreateSquareMember
        self.notifiedCreateSquareChatMember = notifiedCreateSquareChatMember
        self.notifiedUpdateSquareMemberRelation = notifiedUpdateSquareMemberRelation
        self.notifiedUpdateSquareFeatureSet = notifiedUpdateSquareFeatureSet
        self.notifiedUpdateSquareNoteStatus = notifiedUpdateSquareNoteStatus
        self.notifiedUpdateSquareChatAnnouncement = notifiedUpdateSquareChatAnnouncement
        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.notificationPostAnnouncement = notificationPostAnnouncement

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.receiveMessage = SquareEventReceiveMessage()
                    self.receiveMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.sendMessage = SquareEventSendMessage()
                    self.sendMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.notifiedJoinSquareChat = SquareEventNotifiedJoinSquareChat()
                    self.notifiedJoinSquareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.notifiedInviteIntoSquareChat = (
                        SquareEventNotifiedInviteIntoSquareChat()
                    )
                    self.notifiedInviteIntoSquareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.notifiedLeaveSquareChat = SquareEventNotifiedLeaveSquareChat()
                    self.notifiedLeaveSquareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.notifiedDestroyMessage = SquareEventNotifiedDestroyMessage()
                    self.notifiedDestroyMessage.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRUCT:
                    self.notifiedMarkAsRead = SquareEventNotifiedMarkAsRead()
                    self.notifiedMarkAsRead.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareMemberProfile = (
                        SquareEventNotifiedUpdateSquareMemberProfile()
                    )
                    self.notifiedUpdateSquareMemberProfile.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.STRUCT:
                    self.notifiedKickoutFromSquare = (
                        SquareEventNotifiedKickoutFromSquare()
                    )
                    self.notifiedKickoutFromSquare.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 19:
                if ftype == TType.STRUCT:
                    self.notifiedShutdownSquare = SquareEventNotifiedShutdownSquare()
                    self.notifiedShutdownSquare.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRUCT:
                    self.notifiedDeleteSquareChat = (
                        SquareEventNotifiedDeleteSquareChat()
                    )
                    self.notifiedDeleteSquareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 31:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareChatProfileName = (
                        SquareEventNotifiedUpdateSquareChatProfileName()
                    )
                    self.notifiedUpdateSquareChatProfileName.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 32:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareChatProfileImage = (
                        SquareEventNotifiedUpdateSquareChatProfileImage()
                    )
                    self.notifiedUpdateSquareChatProfileImage.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 38:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareChatMaxMemberCount = (
                        SquareEventNotifiedUpdateSquareChatMaxMemberCount()
                    )
                    self.notifiedUpdateSquareChatMaxMemberCount.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 == 9:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquare = SquareEventNotifiedUpdateSquare()
                    self.notifiedUpdateSquare.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 == 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 == 15:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareChatStatus = (
                        SquareEventNotifiedUpdateSquareChatStatus()
                    )
                    self.notifiedUpdateSquareChatStatus.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 == 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 == 33:
                if ftype == TType.STRUCT:
                    self.notifiedUpdateSquareFeatureSet = (
                        SquareEventNotifiedUpdateSquareFeatureSet()
                    )
                    self.notifiedUpdateSquareFeatureSet.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 == 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 == 39:
                if ftype == TType.STRUCT:
                    self.notificationPostAnnouncement = (
                        SquareEventNotificationPostAnnouncement()
                    )
                    self.notificationPostAnnouncement.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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.eventStatus = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareEvent')
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 2)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 3)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.payload is not None:
            oprot.writeFieldBegin('payload', TType.STRUCT, 4)
            self.payload.write(oprot)
            oprot.writeFieldEnd()
        if self.syncToken is not None:
            oprot.writeFieldBegin('syncToken', TType.STRING, 5)
            oprot.writeString(
                self.syncToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.syncToken
            )
            oprot.writeFieldEnd()
        if self.eventStatus is not None:
            oprot.writeFieldBegin('eventStatus', TType.I32, 6)
            oprot.writeI32(self.eventStatus)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class FetchMyEventsRequest(object):
    """
    Attributes:
     - subscriptionId
     - syncToken
     - limit
     - continuationToken

    """

    def __init__(
        self,
        subscriptionId=None,
        syncToken=None,
        limit=None,
        continuationToken=None,
    ):
        self.subscriptionId = subscriptionId
        self.syncToken = syncToken
        self.limit = limit
        self.continuationToken = continuationToken

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.subscriptionId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.syncToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FetchMyEventsRequest')
        if self.subscriptionId is not None:
            oprot.writeFieldBegin('subscriptionId', TType.I64, 1)
            oprot.writeI64(self.subscriptionId)
            oprot.writeFieldEnd()
        if self.syncToken is not None:
            oprot.writeFieldBegin('syncToken', TType.STRING, 2)
            oprot.writeString(
                self.syncToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.syncToken
            )
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 3)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GeolocationAccuracy(object):
    """
    Attributes:
     - radiusMeters
     - radiusConfidence

    """

    def __init__(
        self,
        radiusMeters=None,
        radiusConfidence=None,
    ):
        self.radiusMeters = radiusMeters
        self.radiusConfidence = radiusConfidence

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is 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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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 = []
                    (_etype671, _size668) = iprot.readListBegin()
                    for _i672 in range(_size668):
                        _elem673 = SquareEvent()
                        _elem673.read(iprot)
                        self.events.append(_elem673)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.syncToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FetchMyEventsResponse')
        if self.subscription is not None:
            oprot.writeFieldBegin('subscription', TType.STRUCT, 1)
            self.subscription.write(oprot)
            oprot.writeFieldEnd()
        if self.events is not None:
            oprot.writeFieldBegin('events', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.events))
            for iter674 in self.events:
                iter674.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.syncToken is not None:
            oprot.writeFieldBegin('syncToken', TType.STRING, 3)
            oprot.writeString(
                self.syncToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.syncToken
            )
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class FetchSquareChatEventsRequest(object):
    """
    Attributes:
     - subscriptionId
     - squareChatMid
     - syncToken
     - limit
     - direction

    """

    def __init__(
        self,
        subscriptionId=None,
        squareChatMid=None,
        syncToken=None,
        limit=None,
        direction=None,
    ):
        self.subscriptionId = subscriptionId
        self.squareChatMid = squareChatMid
        self.syncToken = syncToken
        self.limit = limit
        self.direction = direction

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.subscriptionId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.syncToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.direction = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FetchSquareChatEventsRequest')
        if self.subscriptionId is not None:
            oprot.writeFieldBegin('subscriptionId', TType.I64, 1)
            oprot.writeI64(self.subscriptionId)
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.syncToken is not None:
            oprot.writeFieldBegin('syncToken', TType.STRING, 3)
            oprot.writeString(
                self.syncToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.syncToken
            )
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 4)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        if self.direction is not None:
            oprot.writeFieldBegin('direction', TType.I32, 5)
            oprot.writeI32(self.direction)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class FetchSquareChatEventsResponse(object):
    """
    Attributes:
     - subscription
     - events
     - syncToken
     - continuationToken

    """

    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 = []
                    (_etype678, _size675) = iprot.readListBegin()
                    for _i679 in range(_size675):
                        _elem680 = SquareEvent()
                        _elem680.read(iprot)
                        self.events.append(_elem680)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.syncToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('FetchSquareChatEventsResponse')
        if self.subscription is not None:
            oprot.writeFieldBegin('subscription', TType.STRUCT, 1)
            self.subscription.write(oprot)
            oprot.writeFieldEnd()
        if self.events is not None:
            oprot.writeFieldBegin('events', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.events))
            for iter681 in self.events:
                iter681.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.syncToken is not None:
            oprot.writeFieldBegin('syncToken', TType.STRING, 3)
            oprot.writeString(
                self.syncToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.syncToken
            )
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class InviteToSquareRequest(object):
    """
    Attributes:
     - squareMid
     - invitees
     - squareChatMid

    """

    def __init__(
        self,
        squareMid=None,
        invitees=None,
        squareChatMid=None,
    ):
        self.squareMid = squareMid
        self.invitees = invitees
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.invitees = []
                    (_etype685, _size682) = iprot.readListBegin()
                    for _i686 in range(_size682):
                        _elem687 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.invitees.append(_elem687)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('InviteToSquareRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.invitees is not None:
            oprot.writeFieldBegin('invitees', TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.invitees))
            for iter688 in self.invitees:
                oprot.writeString(
                    iter688.encode('utf-8') if sys.version_info[0] == 2 else iter688
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 4)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class InviteToSquareResponse(object):
    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('InviteToSquareResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class InviteToSquareChatRequest(object):
    """
    Attributes:
     - inviteeMids
     - squareChatMid

    """

    def __init__(
        self,
        inviteeMids=None,
        squareChatMid=None,
    ):
        self.inviteeMids = inviteeMids
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.inviteeMids = []
                    (_etype692, _size689) = iprot.readListBegin()
                    for _i693 in range(_size689):
                        _elem694 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.inviteeMids.append(_elem694)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('InviteToSquareChatRequest')
        if self.inviteeMids is not None:
            oprot.writeFieldBegin('inviteeMids', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.inviteeMids))
            for iter695 in self.inviteeMids:
                oprot.writeString(
                    iter695.encode('utf-8') if sys.version_info[0] == 2 else iter695
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class InviteToSquareChatResponse(object):
    """
    Attributes:
     - inviteeMids

    """

    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 = []
                    (_etype699, _size696) = iprot.readListBegin()
                    for _i700 in range(_size696):
                        _elem701 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.inviteeMids.append(_elem701)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('InviteToSquareChatResponse')
        if self.inviteeMids is not None:
            oprot.writeFieldBegin('inviteeMids', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.inviteeMids))
            for iter702 in self.inviteeMids:
                oprot.writeString(
                    iter702.encode('utf-8') if sys.version_info[0] == 2 else iter702
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareMemberRequest(object):
    """
    Attributes:
     - squareMemberMid

    """

    def __init__(
        self,
        squareMemberMid=None,
    ):
        self.squareMemberMid = squareMemberMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareMemberRequest')
        if self.squareMemberMid is not None:
            oprot.writeFieldBegin('squareMemberMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMemberMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareMemberResponse(object):
    """
    Attributes:
     - squareMember
     - relation
     - oneOnOneChatMid

    """

    def __init__(
        self,
        squareMember=None,
        relation=None,
        oneOnOneChatMid=None,
    ):
        self.squareMember = squareMember
        self.relation = relation
        self.oneOnOneChatMid = oneOnOneChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.squareMember = SquareMember()
                    self.squareMember.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.relation = SquareMemberRelation()
                    self.relation.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.oneOnOneChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareMemberResponse')
        if self.squareMember is not None:
            oprot.writeFieldBegin('squareMember', TType.STRUCT, 1)
            self.squareMember.write(oprot)
            oprot.writeFieldEnd()
        if self.relation is not None:
            oprot.writeFieldBegin('relation', TType.STRUCT, 2)
            self.relation.write(oprot)
            oprot.writeFieldEnd()
        if self.oneOnOneChatMid is not None:
            oprot.writeFieldBegin('oneOnOneChatMid', TType.STRING, 3)
            oprot.writeString(
                self.oneOnOneChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.oneOnOneChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareMembersRequest(object):
    """
    Attributes:
     - mids

    """

    def __init__(
        self,
        mids=None,
    ):
        self.mids = mids

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.SET:
                    self.mids = set()
                    (_etype706, _size703) = iprot.readSetBegin()
                    for _i707 in range(_size703):
                        _elem708 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.mids.add(_elem708)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareMembersRequest')
        if self.mids is not None:
            oprot.writeFieldBegin('mids', TType.SET, 2)
            oprot.writeSetBegin(TType.STRING, len(self.mids))
            for iter709 in self.mids:
                oprot.writeString(
                    iter709.encode('utf-8') if sys.version_info[0] == 2 else iter709
                )
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareMembersResponse(object):
    """
    Attributes:
     - members

    """

    def __init__(
        self,
        members=None,
    ):
        self.members = members

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.members = SquareMember()
                    self.members.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareMembersResponse')
        if self.members is not None:
            oprot.writeFieldBegin('members', TType.STRUCT, 1)
            self.members.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareMemberRelationsRequest(object):
    """
    Attributes:
     - state
     - continuationToken
     - limit

    """

    def __init__(
        self,
        state=None,
        continuationToken=None,
        limit=None,
    ):
        self.state = state
        self.continuationToken = continuationToken
        self.limit = limit

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareMemberRelationsRequest')
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 2)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 3)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 4)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareMemberRelationsResponse(object):
    """
    Attributes:
     - squareMembers
     - relations
     - continuationToken

    """

    def __init__(
        self,
        squareMembers=None,
        relations=None,
        continuationToken=None,
    ):
        self.squareMembers = squareMembers
        self.relations = relations
        self.continuationToken = continuationToken

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.squareMembers = []
                    (_etype713, _size710) = iprot.readListBegin()
                    for _i714 in range(_size710):
                        _elem715 = SquareMember()
                        _elem715.read(iprot)
                        self.squareMembers.append(_elem715)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.relations = {}
                    (_ktype717, _vtype718, _size716) = iprot.readMapBegin()
                    for _i720 in range(_size716):
                        _key721 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val722 = SquareMemberRelation()
                        _val722.read(iprot)
                        self.relations[_key721] = _val722
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareMemberRelationsResponse')
        if self.squareMembers is not None:
            oprot.writeFieldBegin('squareMembers', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.squareMembers))
            for iter723 in self.squareMembers:
                iter723.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.relations is not None:
            oprot.writeFieldBegin('relations', TType.MAP, 2)
            oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.relations))
            for kiter724, viter725 in self.relations.items():
                oprot.writeString(
                    kiter724.encode('utf-8') if sys.version_info[0] == 2 else kiter724
                )
                viter725.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 3)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareMemberRelationRequest(object):
    """
    Attributes:
     - squareMid
     - targetSquareMemberMid

    """

    def __init__(
        self,
        squareMid=None,
        targetSquareMemberMid=None,
    ):
        self.squareMid = squareMid
        self.targetSquareMemberMid = targetSquareMemberMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.targetSquareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareMemberRelationRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.targetSquareMemberMid is not None:
            oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 3)
            oprot.writeString(
                self.targetSquareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.targetSquareMemberMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareMemberRelationResponse(object):
    """
    Attributes:
     - squareMid
     - targetSquareMemberMid
     - relation

    """

    def __init__(
        self,
        squareMid=None,
        targetSquareMemberMid=None,
        relation=None,
    ):
        self.squareMid = squareMid
        self.targetSquareMemberMid = targetSquareMemberMid
        self.relation = relation

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.targetSquareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.relation = SquareMemberRelation()
                    self.relation.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareMemberRelationResponse')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.targetSquareMemberMid is not None:
            oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 2)
            oprot.writeString(
                self.targetSquareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.targetSquareMemberMid
            )
            oprot.writeFieldEnd()
        if self.relation is not None:
            oprot.writeFieldBegin('relation', TType.STRUCT, 3)
            self.relation.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Category(object):
    """
    Attributes:
     - id
     - name

    """

    def __init__(
        self,
        id=None,
        name=None,
    ):
        self.id = id
        self.name = name

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.id = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Category')
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.I32, 1)
            oprot.writeI32(self.id)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareCategoriesRequest(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('GetSquareCategoriesRequest')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareCategoriesResponse(object):
    """
    Attributes:
     - categoryList

    """

    def __init__(
        self,
        categoryList=None,
    ):
        self.categoryList = categoryList

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.categoryList = []
                    (_etype729, _size726) = iprot.readListBegin()
                    for _i730 in range(_size726):
                        _elem731 = Category()
                        _elem731.read(iprot)
                        self.categoryList.append(_elem731)
                    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('GetSquareCategoriesResponse')
        if self.categoryList is not None:
            oprot.writeFieldBegin('categoryList', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.categoryList))
            for iter732 in self.categoryList:
                iter732.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 UpdateSquareRequest(object):
    """
    Attributes:
     - updatedAttrs
     - square

    """

    def __init__(
        self,
        updatedAttrs=None,
        square=None,
    ):
        self.updatedAttrs = updatedAttrs
        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 == 2:
                if ftype == TType.SET:
                    self.updatedAttrs = set()
                    (_etype736, _size733) = iprot.readSetBegin()
                    for _i737 in range(_size733):
                        _elem738 = iprot.readI32()
                        self.updatedAttrs.add(_elem738)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareRequest')
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 2)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter739 in self.updatedAttrs:
                oprot.writeI32(iter739)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 3)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareResponse(object):
    """
    Attributes:
     - updatedAttrs
     - square

    """

    def __init__(
        self,
        updatedAttrs=None,
        square=None,
    ):
        self.updatedAttrs = updatedAttrs
        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.SET:
                    self.updatedAttrs = set()
                    (_etype743, _size740) = iprot.readSetBegin()
                    for _i744 in range(_size740):
                        _elem745 = iprot.readI32()
                        self.updatedAttrs.add(_elem745)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.square = Square()
                    self.square.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareResponse')
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 1)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter746 in self.updatedAttrs:
                oprot.writeI32(iter746)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.square is not None:
            oprot.writeFieldBegin('square', TType.STRUCT, 2)
            self.square.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SearchSquaresRequest(object):
    """
    Attributes:
     - query
     - continuationToken
     - limit

    """

    def __init__(
        self,
        query=None,
        continuationToken=None,
        limit=None,
    ):
        self.query = query
        self.continuationToken = continuationToken
        self.limit = limit

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.query = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SearchSquaresRequest')
        if self.query is not None:
            oprot.writeFieldBegin('query', TType.STRING, 2)
            oprot.writeString(
                self.query.encode('utf-8') if sys.version_info[0] == 2 else self.query
            )
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 3)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 4)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SearchSquaresResponse(object):
    """
    Attributes:
     - squares
     - squareStatuses
     - myMemberships
     - continuationToken
     - noteStatuses

    """

    def __init__(
        self,
        squares=None,
        squareStatuses=None,
        myMemberships=None,
        continuationToken=None,
        noteStatuses=None,
    ):
        self.squares = squares
        self.squareStatuses = squareStatuses
        self.myMemberships = myMemberships
        self.continuationToken = continuationToken
        self.noteStatuses = noteStatuses

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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 = []
                    (_etype750, _size747) = iprot.readListBegin()
                    for _i751 in range(_size747):
                        _elem752 = Square()
                        _elem752.read(iprot)
                        self.squares.append(_elem752)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.squareStatuses = {}
                    (_ktype754, _vtype755, _size753) = iprot.readMapBegin()
                    for _i757 in range(_size753):
                        _key758 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val759 = SquareStatus()
                        _val759.read(iprot)
                        self.squareStatuses[_key758] = _val759
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.myMemberships = {}
                    (_ktype761, _vtype762, _size760) = iprot.readMapBegin()
                    for _i764 in range(_size760):
                        _key765 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val766 = SquareMember()
                        _val766.read(iprot)
                        self.myMemberships[_key765] = _val766
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.MAP:
                    self.noteStatuses = {}
                    (_ktype768, _vtype769, _size767) = iprot.readMapBegin()
                    for _i771 in range(_size767):
                        _key772 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val773 = NoteStatus()
                        _val773.read(iprot)
                        self.noteStatuses[_key772] = _val773
                    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('SearchSquaresResponse')
        if self.squares is not None:
            oprot.writeFieldBegin('squares', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.squares))
            for iter774 in self.squares:
                iter774.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.squareStatuses is not None:
            oprot.writeFieldBegin('squareStatuses', TType.MAP, 2)
            oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.squareStatuses))
            for kiter775, viter776 in self.squareStatuses.items():
                oprot.writeString(
                    kiter775.encode('utf-8') if sys.version_info[0] == 2 else kiter775
                )
                viter776.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.myMemberships is not None:
            oprot.writeFieldBegin('myMemberships', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.myMemberships))
            for kiter777, viter778 in self.myMemberships.items():
                oprot.writeString(
                    kiter777.encode('utf-8') if sys.version_info[0] == 2 else kiter777
                )
                viter778.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        if self.noteStatuses is not None:
            oprot.writeFieldBegin('noteStatuses', TType.MAP, 5)
            oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.noteStatuses))
            for kiter779, viter780 in self.noteStatuses.items():
                oprot.writeString(
                    kiter779.encode('utf-8') if sys.version_info[0] == 2 else kiter779
                )
                viter780.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 GetSquareFeatureSetRequest(object):
    """
    Attributes:
     - squareMid

    """

    def __init__(
        self,
        squareMid=None,
    ):
        self.squareMid = squareMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareFeatureSetRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class 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 UpdateSquareFeatureSetRequest(object):
    """
    Attributes:
     - updateAttributes
     - squareFeatureSet

    """

    def __init__(
        self,
        updateAttributes=None,
        squareFeatureSet=None,
    ):
        self.updateAttributes = updateAttributes
        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 == 2:
                if ftype == TType.SET:
                    self.updateAttributes = set()
                    (_etype784, _size781) = iprot.readSetBegin()
                    for _i785 in range(_size781):
                        _elem786 = iprot.readI32()
                        self.updateAttributes.add(_elem786)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareFeatureSet = SquareFeatureSet()
                    self.squareFeatureSet.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareFeatureSetRequest')
        if self.updateAttributes is not None:
            oprot.writeFieldBegin('updateAttributes', TType.SET, 2)
            oprot.writeSetBegin(TType.I32, len(self.updateAttributes))
            for iter787 in self.updateAttributes:
                oprot.writeI32(iter787)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.squareFeatureSet is not None:
            oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 3)
            self.squareFeatureSet.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareFeatureSetResponse(object):
    """
    Attributes:
     - updateAttributes
     - squareFeatureSet

    """

    def __init__(
        self,
        updateAttributes=None,
        squareFeatureSet=None,
    ):
        self.updateAttributes = updateAttributes
        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.SET:
                    self.updateAttributes = set()
                    (_etype791, _size788) = iprot.readSetBegin()
                    for _i792 in range(_size788):
                        _elem793 = iprot.readI32()
                        self.updateAttributes.add(_elem793)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareFeatureSet = SquareFeatureSet()
                    self.squareFeatureSet.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareFeatureSetResponse')
        if self.updateAttributes is not None:
            oprot.writeFieldBegin('updateAttributes', TType.SET, 1)
            oprot.writeSetBegin(TType.I32, len(self.updateAttributes))
            for iter794 in self.updateAttributes:
                oprot.writeI32(iter794)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.squareFeatureSet is not None:
            oprot.writeFieldBegin('squareFeatureSet', TType.STRUCT, 2)
            self.squareFeatureSet.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareMemberRequest(object):
    """
    Attributes:
     - updatedAttrs
     - updatedPreferenceAttrs
     - squareMember

    """

    def __init__(
        self,
        updatedAttrs=None,
        updatedPreferenceAttrs=None,
        squareMember=None,
    ):
        self.updatedAttrs = updatedAttrs
        self.updatedPreferenceAttrs = updatedPreferenceAttrs
        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 == 2:
                if ftype == TType.SET:
                    self.updatedAttrs = set()
                    (_etype798, _size795) = iprot.readSetBegin()
                    for _i799 in range(_size795):
                        _elem800 = iprot.readI32()
                        self.updatedAttrs.add(_elem800)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.SET:
                    self.updatedPreferenceAttrs = set()
                    (_etype804, _size801) = iprot.readSetBegin()
                    for _i805 in range(_size801):
                        _elem806 = iprot.readI32()
                        self.updatedPreferenceAttrs.add(_elem806)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.squareMember = SquareMember()
                    self.squareMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareMemberRequest')
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 2)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter807 in self.updatedAttrs:
                oprot.writeI32(iter807)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.updatedPreferenceAttrs is not None:
            oprot.writeFieldBegin('updatedPreferenceAttrs', TType.SET, 3)
            oprot.writeSetBegin(TType.I32, len(self.updatedPreferenceAttrs))
            for iter808 in self.updatedPreferenceAttrs:
                oprot.writeI32(iter808)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.squareMember is not None:
            oprot.writeFieldBegin('squareMember', TType.STRUCT, 4)
            self.squareMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareMemberResponse(object):
    """
    Attributes:
     - updatedAttrs
     - squareMember
     - updatedPreferenceAttrs

    """

    def __init__(
        self,
        updatedAttrs=None,
        squareMember=None,
        updatedPreferenceAttrs=None,
    ):
        self.updatedAttrs = updatedAttrs
        self.squareMember = squareMember
        self.updatedPreferenceAttrs = updatedPreferenceAttrs

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.SET:
                    self.updatedAttrs = set()
                    (_etype812, _size809) = iprot.readSetBegin()
                    for _i813 in range(_size809):
                        _elem814 = iprot.readI32()
                        self.updatedAttrs.add(_elem814)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareMember = SquareMember()
                    self.squareMember.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.SET:
                    self.updatedPreferenceAttrs = set()
                    (_etype818, _size815) = iprot.readSetBegin()
                    for _i819 in range(_size815):
                        _elem820 = iprot.readI32()
                        self.updatedPreferenceAttrs.add(_elem820)
                    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('UpdateSquareMemberResponse')
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 1)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter821 in self.updatedAttrs:
                oprot.writeI32(iter821)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.squareMember is not None:
            oprot.writeFieldBegin('squareMember', TType.STRUCT, 2)
            self.squareMember.write(oprot)
            oprot.writeFieldEnd()
        if self.updatedPreferenceAttrs is not None:
            oprot.writeFieldBegin('updatedPreferenceAttrs', TType.SET, 3)
            oprot.writeSetBegin(TType.I32, len(self.updatedPreferenceAttrs))
            for iter822 in self.updatedPreferenceAttrs:
                oprot.writeI32(iter822)
            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 UpdateSquareMembersRequest(object):
    """
    Attributes:
     - updatedAttrs
     - members

    """

    def __init__(
        self,
        updatedAttrs=None,
        members=None,
    ):
        self.updatedAttrs = updatedAttrs
        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 == 2:
                if ftype == TType.SET:
                    self.updatedAttrs = set()
                    (_etype826, _size823) = iprot.readSetBegin()
                    for _i827 in range(_size823):
                        _elem828 = iprot.readI32()
                        self.updatedAttrs.add(_elem828)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.members = []
                    (_etype832, _size829) = iprot.readListBegin()
                    for _i833 in range(_size829):
                        _elem834 = SquareMember()
                        _elem834.read(iprot)
                        self.members.append(_elem834)
                    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('UpdateSquareMembersRequest')
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 2)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter835 in self.updatedAttrs:
                oprot.writeI32(iter835)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.members is not None:
            oprot.writeFieldBegin('members', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.members))
            for iter836 in self.members:
                iter836.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 UpdateSquareMembersResponse(object):
    """
    Attributes:
     - updatedAttrs
     - editor
     - members

    """

    def __init__(
        self,
        updatedAttrs=None,
        editor=None,
        members=None,
    ):
        self.updatedAttrs = updatedAttrs
        self.editor = editor
        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.SET:
                    self.updatedAttrs = set()
                    (_etype840, _size837) = iprot.readSetBegin()
                    for _i841 in range(_size837):
                        _elem842 = iprot.readI32()
                        self.updatedAttrs.add(_elem842)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.editor = SquareMember()
                    self.editor.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.members = {}
                    (_ktype844, _vtype845, _size843) = iprot.readMapBegin()
                    for _i847 in range(_size843):
                        _key848 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val849 = SquareMember()
                        _val849.read(iprot)
                        self.members[_key848] = _val849
                    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('UpdateSquareMembersResponse')
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 1)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter850 in self.updatedAttrs:
                oprot.writeI32(iter850)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.editor is not None:
            oprot.writeFieldBegin('editor', TType.STRUCT, 2)
            self.editor.write(oprot)
            oprot.writeFieldEnd()
        if self.members is not None:
            oprot.writeFieldBegin('members', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.members))
            for kiter851, viter852 in self.members.items():
                oprot.writeString(
                    kiter851.encode('utf-8') if sys.version_info[0] == 2 else kiter851
                )
                viter852.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 RejectSquareMembersRequest(object):
    """
    Attributes:
     - squareMid
     - requestedMemberMids

    """

    def __init__(
        self,
        squareMid=None,
        requestedMemberMids=None,
    ):
        self.squareMid = squareMid
        self.requestedMemberMids = requestedMemberMids

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.requestedMemberMids = []
                    (_etype856, _size853) = iprot.readListBegin()
                    for _i857 in range(_size853):
                        _elem858 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.requestedMemberMids.append(_elem858)
                    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('RejectSquareMembersRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.requestedMemberMids is not None:
            oprot.writeFieldBegin('requestedMemberMids', TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.requestedMemberMids))
            for iter859 in self.requestedMemberMids:
                oprot.writeString(
                    iter859.encode('utf-8') if sys.version_info[0] == 2 else iter859
                )
            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 RejectSquareMembersResponse(object):
    """
    Attributes:
     - rejectedMembers
     - status

    """

    def __init__(
        self,
        rejectedMembers=None,
        status=None,
    ):
        self.rejectedMembers = rejectedMembers
        self.status = status

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.rejectedMembers = []
                    (_etype863, _size860) = iprot.readListBegin()
                    for _i864 in range(_size860):
                        _elem865 = SquareMember()
                        _elem865.read(iprot)
                        self.rejectedMembers.append(_elem865)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.status = SquareStatus()
                    self.status.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('RejectSquareMembersResponse')
        if self.rejectedMembers is not None:
            oprot.writeFieldBegin('rejectedMembers', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.rejectedMembers))
            for iter866 in self.rejectedMembers:
                iter866.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.STRUCT, 2)
            self.status.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class RemoveSubscriptionsRequest(object):
    """
    Attributes:
     - unsubscriptions

    """

    def __init__(
        self,
        unsubscriptions=None,
    ):
        self.unsubscriptions = unsubscriptions

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(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.LIST:
                    self.unsubscriptions = []
                    (_etype870, _size867) = iprot.readListBegin()
                    for _i871 in range(_size867):
                        _elem872 = iprot.readI64()
                        self.unsubscriptions.append(_elem872)
                    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('RemoveSubscriptionsRequest')
        if self.unsubscriptions is not None:
            oprot.writeFieldBegin('unsubscriptions', TType.LIST, 2)
            oprot.writeListBegin(TType.I64, len(self.unsubscriptions))
            for iter873 in self.unsubscriptions:
                oprot.writeI64(iter873)
            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 RemoveSubscriptionsResponse(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('RemoveSubscriptionsResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class RefreshSubscriptionsRequest(object):
    """
    Attributes:
     - subscriptions

    """

    def __init__(
        self,
        subscriptions=None,
    ):
        self.subscriptions = subscriptions

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(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.LIST:
                    self.subscriptions = []
                    (_etype877, _size874) = iprot.readListBegin()
                    for _i878 in range(_size874):
                        _elem879 = iprot.readI64()
                        self.subscriptions.append(_elem879)
                    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('RefreshSubscriptionsRequest')
        if self.subscriptions is not None:
            oprot.writeFieldBegin('subscriptions', TType.LIST, 2)
            oprot.writeListBegin(TType.I64, len(self.subscriptions))
            for iter880 in self.subscriptions:
                oprot.writeI64(iter880)
            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 RefreshSubscriptionsResponse(object):
    """
    Attributes:
     - ttlMillis
     - subscriptionStates

    """

    def __init__(
        self,
        ttlMillis=None,
        subscriptionStates=None,
    ):
        self.ttlMillis = ttlMillis
        self.subscriptionStates = subscriptionStates

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.ttlMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.subscriptionStates = {}
                    (_ktype882, _vtype883, _size881) = iprot.readMapBegin()
                    for _i885 in range(_size881):
                        _key886 = iprot.readI64()
                        _val887 = SubscriptionState()
                        _val887.read(iprot)
                        self.subscriptionStates[_key886] = _val887
                    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('RefreshSubscriptionsResponse')
        if self.ttlMillis is not None:
            oprot.writeFieldBegin('ttlMillis', TType.I64, 1)
            oprot.writeI64(self.ttlMillis)
            oprot.writeFieldEnd()
        if self.subscriptionStates is not None:
            oprot.writeFieldBegin('subscriptionStates', TType.MAP, 2)
            oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.subscriptionStates))
            for kiter888, viter889 in self.subscriptionStates.items():
                oprot.writeI64(kiter888)
                viter889.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 UpdateSquareChatRequest(object):
    """
    Attributes:
     - updatedAttrs
     - squareChat

    """

    def __init__(
        self,
        updatedAttrs=None,
        squareChat=None,
    ):
        self.updatedAttrs = updatedAttrs
        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 == 2:
                if ftype == TType.SET:
                    self.updatedAttrs = set()
                    (_etype893, _size890) = iprot.readSetBegin()
                    for _i894 in range(_size890):
                        _elem895 = iprot.readI32()
                        self.updatedAttrs.add(_elem895)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareChat = SquareChat()
                    self.squareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareChatRequest')
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 2)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter896 in self.updatedAttrs:
                oprot.writeI32(iter896)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.squareChat is not None:
            oprot.writeFieldBegin('squareChat', TType.STRUCT, 3)
            self.squareChat.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareChatResponse(object):
    """
    Attributes:
     - updatedAttrs
     - squareChat

    """

    def __init__(
        self,
        updatedAttrs=None,
        squareChat=None,
    ):
        self.updatedAttrs = updatedAttrs
        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.SET:
                    self.updatedAttrs = set()
                    (_etype900, _size897) = iprot.readSetBegin()
                    for _i901 in range(_size897):
                        _elem902 = iprot.readI32()
                        self.updatedAttrs.add(_elem902)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.squareChat = SquareChat()
                    self.squareChat.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareChatResponse')
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 1)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter903 in self.updatedAttrs:
                oprot.writeI32(iter903)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.squareChat is not None:
            oprot.writeFieldBegin('squareChat', TType.STRUCT, 2)
            self.squareChat.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DeleteSquareChatRequest(object):
    """
    Attributes:
     - squareChatMid
     - revision

    """

    def __init__(
        self,
        squareChatMid=None,
        revision=None,
    ):
        self.squareChatMid = squareChatMid
        self.revision = revision

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('DeleteSquareChatRequest')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DeleteSquareChatResponse(object):
    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('DeleteSquareChatResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareChatMemberRequest(object):
    """
    Attributes:
     - updatedAttrs
     - chatMember

    """

    def __init__(
        self,
        updatedAttrs=None,
        chatMember=None,
    ):
        self.updatedAttrs = updatedAttrs
        self.chatMember = chatMember

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.SET:
                    self.updatedAttrs = set()
                    (_etype907, _size904) = iprot.readSetBegin()
                    for _i908 in range(_size904):
                        _elem909 = iprot.readI32()
                        self.updatedAttrs.add(_elem909)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.chatMember = SquareChatMember()
                    self.chatMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareChatMemberRequest')
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 2)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter910 in self.updatedAttrs:
                oprot.writeI32(iter910)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.chatMember is not None:
            oprot.writeFieldBegin('chatMember', TType.STRUCT, 3)
            self.chatMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareChatMemberResponse(object):
    """
    Attributes:
     - updatedChatMember

    """

    def __init__(
        self,
        updatedChatMember=None,
    ):
        self.updatedChatMember = updatedChatMember

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.updatedChatMember = SquareChatMember()
                    self.updatedChatMember.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareChatMemberResponse')
        if self.updatedChatMember is not None:
            oprot.writeFieldBegin('updatedChatMember', TType.STRUCT, 1)
            self.updatedChatMember.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareAuthorityRequest(object):
    """
    Attributes:
     - updateAttributes
     - authority

    """

    def __init__(
        self,
        updateAttributes=None,
        authority=None,
    ):
        self.updateAttributes = updateAttributes
        self.authority = authority

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.SET:
                    self.updateAttributes = set()
                    (_etype914, _size911) = iprot.readSetBegin()
                    for _i915 in range(_size911):
                        _elem916 = iprot.readI32()
                        self.updateAttributes.add(_elem916)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.authority = SquareAuthority()
                    self.authority.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareAuthorityRequest')
        if self.updateAttributes is not None:
            oprot.writeFieldBegin('updateAttributes', TType.SET, 2)
            oprot.writeSetBegin(TType.I32, len(self.updateAttributes))
            for iter917 in self.updateAttributes:
                oprot.writeI32(iter917)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.authority is not None:
            oprot.writeFieldBegin('authority', TType.STRUCT, 3)
            self.authority.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareAuthorityResponse(object):
    """
    Attributes:
     - updatdAttributes
     - authority

    """

    def __init__(
        self,
        updatdAttributes=None,
        authority=None,
    ):
        self.updatdAttributes = updatdAttributes
        self.authority = authority

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.SET:
                    self.updatdAttributes = set()
                    (_etype921, _size918) = iprot.readSetBegin()
                    for _i922 in range(_size918):
                        _elem923 = iprot.readI32()
                        self.updatdAttributes.add(_elem923)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.authority = SquareAuthority()
                    self.authority.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareAuthorityResponse')
        if self.updatdAttributes is not None:
            oprot.writeFieldBegin('updatdAttributes', TType.SET, 1)
            oprot.writeSetBegin(TType.I32, len(self.updatdAttributes))
            for iter924 in self.updatdAttributes:
                oprot.writeI32(iter924)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.authority is not None:
            oprot.writeFieldBegin('authority', TType.STRUCT, 2)
            self.authority.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareMemberRelationRequest(object):
    """
    Attributes:
     - squareMid
     - targetSquareMemberMid
     - updatedAttrs
     - relation

    """

    def __init__(
        self,
        squareMid=None,
        targetSquareMemberMid=None,
        updatedAttrs=None,
        relation=None,
    ):
        self.squareMid = squareMid
        self.targetSquareMemberMid = targetSquareMemberMid
        self.updatedAttrs = updatedAttrs
        self.relation = relation

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.targetSquareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.SET:
                    self.updatedAttrs = set()
                    (_etype928, _size925) = iprot.readSetBegin()
                    for _i929 in range(_size925):
                        _elem930 = iprot.readI32()
                        self.updatedAttrs.add(_elem930)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.relation = SquareMemberRelation()
                    self.relation.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareMemberRelationRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.targetSquareMemberMid is not None:
            oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 3)
            oprot.writeString(
                self.targetSquareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.targetSquareMemberMid
            )
            oprot.writeFieldEnd()
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 4)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter931 in self.updatedAttrs:
                oprot.writeI32(iter931)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.relation is not None:
            oprot.writeFieldBegin('relation', TType.STRUCT, 5)
            self.relation.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateSquareMemberRelationResponse(object):
    """
    Attributes:
     - squareMid
     - targetSquareMemberMid
     - updatedAttrs
     - relation

    """

    def __init__(
        self,
        squareMid=None,
        targetSquareMemberMid=None,
        updatedAttrs=None,
        relation=None,
    ):
        self.squareMid = squareMid
        self.targetSquareMemberMid = targetSquareMemberMid
        self.updatedAttrs = updatedAttrs
        self.relation = relation

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.targetSquareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.SET:
                    self.updatedAttrs = set()
                    (_etype935, _size932) = iprot.readSetBegin()
                    for _i936 in range(_size932):
                        _elem937 = iprot.readI32()
                        self.updatedAttrs.add(_elem937)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.relation = SquareMemberRelation()
                    self.relation.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateSquareMemberRelationResponse')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 1)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        if self.targetSquareMemberMid is not None:
            oprot.writeFieldBegin('targetSquareMemberMid', TType.STRING, 2)
            oprot.writeString(
                self.targetSquareMemberMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.targetSquareMemberMid
            )
            oprot.writeFieldEnd()
        if self.updatedAttrs is not None:
            oprot.writeFieldBegin('updatedAttrs', TType.SET, 3)
            oprot.writeSetBegin(TType.I32, len(self.updatedAttrs))
            for iter938 in self.updatedAttrs:
                oprot.writeI32(iter938)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.relation is not None:
            oprot.writeFieldBegin('relation', TType.STRUCT, 4)
            self.relation.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReportSquareRequest(object):
    """
    Attributes:
     - squareMid
     - reportType
     - otherReason

    """

    def __init__(
        self,
        squareMid=None,
        reportType=None,
        otherReason=None,
    ):
        self.squareMid = squareMid
        self.reportType = reportType
        self.otherReason = otherReason

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.reportType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.otherReason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ReportSquareRequest')
        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.reportType is not None:
            oprot.writeFieldBegin('reportType', TType.I32, 3)
            oprot.writeI32(self.reportType)
            oprot.writeFieldEnd()
        if self.otherReason is not None:
            oprot.writeFieldBegin('otherReason', TType.STRING, 4)
            oprot.writeString(
                self.otherReason.encode('utf-8')
                if sys.version_info[0] == 2
                else self.otherReason
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReportSquareResponse(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('ReportSquareResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReportSquareChatRequest(object):
    """
    Attributes:
     - squareMid
     - squareChatMid
     - reportType
     - otherReason

    """

    def __init__(
        self,
        squareMid=None,
        squareChatMid=None,
        reportType=None,
        otherReason=None,
    ):
        self.squareMid = squareMid
        self.squareChatMid = squareChatMid
        self.reportType = reportType
        self.otherReason = otherReason

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.reportType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.otherReason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ReportSquareChatRequest')
        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.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 3)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.reportType is not None:
            oprot.writeFieldBegin('reportType', TType.I32, 5)
            oprot.writeI32(self.reportType)
            oprot.writeFieldEnd()
        if self.otherReason is not None:
            oprot.writeFieldBegin('otherReason', TType.STRING, 6)
            oprot.writeString(
                self.otherReason.encode('utf-8')
                if sys.version_info[0] == 2
                else self.otherReason
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReportSquareChatResponse(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('ReportSquareChatResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReportSquareMessageRequest(object):
    """
    Attributes:
     - squareMid
     - squareChatMid
     - squareMessageId
     - reportType
     - otherReason

    """

    def __init__(
        self,
        squareMid=None,
        squareChatMid=None,
        squareMessageId=None,
        reportType=None,
        otherReason=None,
    ):
        self.squareMid = squareMid
        self.squareChatMid = squareChatMid
        self.squareMessageId = squareMessageId
        self.reportType = reportType
        self.otherReason = otherReason

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.squareMessageId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.reportType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.otherReason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ReportSquareMessageRequest')
        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.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 3)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareMessageId is not None:
            oprot.writeFieldBegin('squareMessageId', TType.STRING, 4)
            oprot.writeString(
                self.squareMessageId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMessageId
            )
            oprot.writeFieldEnd()
        if self.reportType is not None:
            oprot.writeFieldBegin('reportType', TType.I32, 5)
            oprot.writeI32(self.reportType)
            oprot.writeFieldEnd()
        if self.otherReason is not None:
            oprot.writeFieldBegin('otherReason', TType.STRING, 6)
            oprot.writeString(
                self.otherReason.encode('utf-8')
                if sys.version_info[0] == 2
                else self.otherReason
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReportSquareMessageResponse(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('ReportSquareMessageResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReportSquareMemberRequest(object):
    """
    Attributes:
     - squareMemberMid
     - reportType
     - otherReason
     - squareChatMid

    """

    def __init__(
        self,
        squareMemberMid=None,
        reportType=None,
        otherReason=None,
        squareChatMid=None,
    ):
        self.squareMemberMid = squareMemberMid
        self.reportType = reportType
        self.otherReason = otherReason
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMemberMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.reportType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.otherReason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ReportSquareMemberRequest')
        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.reportType is not None:
            oprot.writeFieldBegin('reportType', TType.I32, 3)
            oprot.writeI32(self.reportType)
            oprot.writeFieldEnd()
        if self.otherReason is not None:
            oprot.writeFieldBegin('otherReason', TType.STRING, 4)
            oprot.writeString(
                self.otherReason.encode('utf-8')
                if sys.version_info[0] == 2
                else self.otherReason
            )
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 5)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReportSquareMemberResponse(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('ReportSquareMemberResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareRequest(object):
    """
    Attributes:
     - mid

    """

    def __init__(
        self,
        mid=None,
    ):
        self.mid = mid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.mid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareRequest')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 2)
            oprot.writeString(
                self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class 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 GetSquareStatusRequest(object):
    """
    Attributes:
     - squareMid

    """

    def __init__(
        self,
        squareMid=None,
    ):
        self.squareMid = squareMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareStatusRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareStatusResponse(object):
    """
    Attributes:
     - squareStatus

    """

    def __init__(
        self,
        squareStatus=None,
    ):
        self.squareStatus = squareStatus

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.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('GetSquareStatusResponse')
        if self.squareStatus is not None:
            oprot.writeFieldBegin('squareStatus', TType.STRUCT, 1)
            self.squareStatus.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetNoteStatusRequest(object):
    """
    Attributes:
     - squareMid

    """

    def __init__(
        self,
        squareMid=None,
    ):
        self.squareMid = squareMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetNoteStatusRequest')
        if self.squareMid is not None:
            oprot.writeFieldBegin('squareMid', TType.STRING, 2)
            oprot.writeString(
                self.squareMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetNoteStatusResponse(object):
    """
    Attributes:
     - squareMid
     - status

    """

    def __init__(
        self,
        squareMid=None,
        status=None,
    ):
        self.squareMid = squareMid
        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.squareMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.status = NoteStatus()
                    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('GetNoteStatusResponse')
        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.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 CreateSquareChatAnnouncementRequest(object):
    """
    Attributes:
     - reqSeq
     - squareChatMid
     - squareChatAnnouncement

    """

    def __init__(
        self,
        reqSeq=None,
        squareChatMid=None,
        squareChatAnnouncement=None,
    ):
        self.reqSeq = reqSeq
        self.squareChatMid = squareChatMid
        self.squareChatAnnouncement = squareChatAnnouncement

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareChatAnnouncement = SquareChatAnnouncement()
                    self.squareChatAnnouncement.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('CreateSquareChatAnnouncementRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        if self.squareChatAnnouncement is not None:
            oprot.writeFieldBegin('squareChatAnnouncement', TType.STRUCT, 3)
            self.squareChatAnnouncement.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CreateSquareChatAnnouncementResponse(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.STRUCT:
                    self.announcement = SquareChatAnnouncement()
                    self.announcement.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('CreateSquareChatAnnouncementResponse')
        if self.announcement is not None:
            oprot.writeFieldBegin('announcement', TType.STRUCT, 1)
            self.announcement.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DeleteSquareChatAnnouncementRequest(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 == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.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('DeleteSquareChatAnnouncementRequest')
        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.announcementSeq is not None:
            oprot.writeFieldBegin('announcementSeq', TType.I64, 3)
            oprot.writeI64(self.announcementSeq)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DeleteSquareChatAnnouncementResponse(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('DeleteSquareChatAnnouncementResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareChatAnnouncementsRequest(object):
    """
    Attributes:
     - squareChatMid

    """

    def __init__(
        self,
        squareChatMid=None,
    ):
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetSquareChatAnnouncementsRequest')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 2)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class 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 = []
                    (_etype942, _size939) = iprot.readListBegin()
                    for _i943 in range(_size939):
                        _elem944 = SquareChatAnnouncement()
                        _elem944.read(iprot)
                        self.announcements.append(_elem944)
                    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 iter945 in self.announcements:
                iter945.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 GetJoinedSquareChatsRequest(object):
    """
    Attributes:
     - continuationToken
     - limit

    """

    def __init__(
        self,
        continuationToken=None,
        limit=None,
    ):
        self.continuationToken = continuationToken
        self.limit = limit

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetJoinedSquareChatsRequest')
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
            oprot.writeString(
                self.continuationToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.continuationToken
            )
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 3)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetJoinedSquareChatsResponse(object):
    """
    Attributes:
     - chats
     - chatMembers
     - statuses
     - continuationToken

    """

    def __init__(
        self,
        chats=None,
        chatMembers=None,
        statuses=None,
        continuationToken=None,
    ):
        self.chats = chats
        self.chatMembers = chatMembers
        self.statuses = statuses
        self.continuationToken = continuationToken

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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 = []
                    (_etype949, _size946) = iprot.readListBegin()
                    for _i950 in range(_size946):
                        _elem951 = SquareChat()
                        _elem951.read(iprot)
                        self.chats.append(_elem951)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.chatMembers = {}
                    (_ktype953, _vtype954, _size952) = iprot.readMapBegin()
                    for _i956 in range(_size952):
                        _key957 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val958 = SquareChatMember()
                        _val958.read(iprot)
                        self.chatMembers[_key957] = _val958
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.statuses = {}
                    (_ktype960, _vtype961, _size959) = iprot.readMapBegin()
                    for _i963 in range(_size959):
                        _key964 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val965 = SquareChatStatus()
                        _val965.read(iprot)
                        self.statuses[_key964] = _val965
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.continuationToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetJoinedSquareChatsResponse')
        if self.chats is not None:
            oprot.writeFieldBegin('chats', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.chats))
            for iter966 in self.chats:
                iter966.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.chatMembers is not None:
            oprot.writeFieldBegin('chatMembers', TType.MAP, 2)
            oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.chatMembers))
            for kiter967, viter968 in self.chatMembers.items():
                oprot.writeString(
                    kiter967.encode('utf-8') if sys.version_info[0] == 2 else kiter967
                )
                viter968.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.statuses is not None:
            oprot.writeFieldBegin('statuses', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.statuses))
            for kiter969, viter970 in self.statuses.items():
                oprot.writeString(
                    kiter969.encode('utf-8') if sys.version_info[0] == 2 else kiter969
                )
                viter970.write(oprot)
            oprot.writeMapEnd()
            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 ApplicationVersionRange(object):
    """
    Attributes:
     - lowerBound
     - lowerBoundInclusive
     - upperBound
     - upperBoundInclusive

    """

    def __init__(
        self,
        lowerBound=None,
        lowerBoundInclusive=None,
        upperBound=None,
        upperBoundInclusive=None,
    ):
        self.lowerBound = lowerBound
        self.lowerBoundInclusive = lowerBoundInclusive
        self.upperBound = upperBound
        self.upperBoundInclusive = upperBoundInclusive

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.lowerBound = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.lowerBoundInclusive = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.upperBound = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.upperBoundInclusive = 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('ApplicationVersionRange')
        if self.lowerBound is not None:
            oprot.writeFieldBegin('lowerBound', TType.STRING, 1)
            oprot.writeString(
                self.lowerBound.encode('utf-8')
                if sys.version_info[0] == 2
                else self.lowerBound
            )
            oprot.writeFieldEnd()
        if self.lowerBoundInclusive is not None:
            oprot.writeFieldBegin('lowerBoundInclusive', TType.BOOL, 2)
            oprot.writeBool(self.lowerBoundInclusive)
            oprot.writeFieldEnd()
        if self.upperBound is not None:
            oprot.writeFieldBegin('upperBound', TType.STRING, 3)
            oprot.writeString(
                self.upperBound.encode('utf-8')
                if sys.version_info[0] == 2
                else self.upperBound
            )
            oprot.writeFieldEnd()
        if self.upperBoundInclusive is not None:
            oprot.writeFieldBegin('upperBoundInclusive', TType.BOOL, 4)
            oprot.writeBool(self.upperBoundInclusive)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AutoSuggestionShowcaseRequest(object):
    """
    Attributes:
     - productType

    """

    def __init__(
        self,
        productType=None,
    ):
        self.productType = productType

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('AutoSuggestionShowcaseRequest')
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 1)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AutoSuggestionShowcaseResponse(object):
    """
    Attributes:
     - productList
     - totalSize

    """

    def __init__(
        self,
        productList=None,
        totalSize=None,
    ):
        self.productList = productList
        self.totalSize = totalSize

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.productList = []
                    (_etype974, _size971) = iprot.readListBegin()
                    for _i975 in range(_size971):
                        _elem976 = ProductSummaryForAutoSuggest()
                        _elem976.read(iprot)
                        self.productList.append(_elem976)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.totalSize = 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('AutoSuggestionShowcaseResponse')
        if self.productList is not None:
            oprot.writeFieldBegin('productList', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.productList))
            for iter977 in self.productList:
                iter977.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.totalSize is not None:
            oprot.writeFieldBegin('totalSize', TType.I64, 2)
            oprot.writeI64(self.totalSize)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class BuyMustbuyRequest(object):
    """
    Attributes:
     - productType
     - productId
     - serialNumber

    """

    def __init__(
        self,
        productType=None,
        productId=None,
        serialNumber=None,
    ):
        self.productType = productType
        self.productId = productId
        self.serialNumber = serialNumber

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.productId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.serialNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('BuyMustbuyRequest')
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 1)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 2)
            oprot.writeString(
                self.productId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productId
            )
            oprot.writeFieldEnd()
        if self.serialNumber is not None:
            oprot.writeFieldBegin('serialNumber', TType.STRING, 3)
            oprot.writeString(
                self.serialNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.serialNumber
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DetailedProductList(object):
    """
    Attributes:
     - productList
     - offset
     - totalSize

    """

    def __init__(
        self,
        productList=None,
        offset=None,
        totalSize=None,
    ):
        self.productList = productList
        self.offset = offset
        self.totalSize = totalSize

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.productList = []
                    (_etype981, _size978) = iprot.readListBegin()
                    for _i982 in range(_size978):
                        _elem983 = ProductDetail()
                        _elem983.read(iprot)
                        self.productList.append(_elem983)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.offset = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.totalSize = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('DetailedProductList')
        if self.productList is not None:
            oprot.writeFieldBegin('productList', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.productList))
            for iter984 in self.productList:
                iter984.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.offset is not None:
            oprot.writeFieldBegin('offset', TType.I32, 2)
            oprot.writeI32(self.offset)
            oprot.writeFieldEnd()
        if self.totalSize is not None:
            oprot.writeFieldBegin('totalSize', TType.I32, 3)
            oprot.writeI32(self.totalSize)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetOldSticonMappingRequest(object):
    """
    Attributes:
     - lastUpdatedTimeMillis

    """

    def __init__(
        self,
        lastUpdatedTimeMillis=None,
    ):
        self.lastUpdatedTimeMillis = lastUpdatedTimeMillis

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.lastUpdatedTimeMillis = 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('GetOldSticonMappingRequest')
        if self.lastUpdatedTimeMillis is not None:
            oprot.writeFieldBegin('lastUpdatedTimeMillis', TType.I64, 1)
            oprot.writeI64(self.lastUpdatedTimeMillis)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetOldSticonMappingResponse(object):
    """
    Attributes:
     - sticonProductMappings
     - updatedTimeMillis
     - updated

    """

    def __init__(
        self,
        sticonProductMappings=None,
        updatedTimeMillis=None,
        updated=None,
    ):
        self.sticonProductMappings = sticonProductMappings
        self.updatedTimeMillis = updatedTimeMillis
        self.updated = updated

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.sticonProductMappings = []
                    (_etype988, _size985) = iprot.readListBegin()
                    for _i989 in range(_size985):
                        _elem990 = SticonProductMapping()
                        _elem990.read(iprot)
                        self.sticonProductMappings.append(_elem990)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.updatedTimeMillis = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.updated = 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('GetOldSticonMappingResponse')
        if self.sticonProductMappings is not None:
            oprot.writeFieldBegin('sticonProductMappings', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.sticonProductMappings))
            for iter991 in self.sticonProductMappings:
                iter991.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.updatedTimeMillis is not None:
            oprot.writeFieldBegin('updatedTimeMillis', TType.I64, 2)
            oprot.writeI64(self.updatedTimeMillis)
            oprot.writeFieldEnd()
        if self.updated is not None:
            oprot.writeFieldBegin('updated', TType.BOOL, 3)
            oprot.writeBool(self.updated)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetProductRequest(object):
    """
    Attributes:
     - productType
     - productId
     - carrierCode
     - saveBrowsingHistory

    """

    def __init__(
        self,
        productType=None,
        productId=None,
        carrierCode=None,
        saveBrowsingHistory=None,
    ):
        self.productType = productType
        self.productId = productId
        self.carrierCode = carrierCode
        self.saveBrowsingHistory = saveBrowsingHistory

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.productId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.carrierCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.saveBrowsingHistory = 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('GetProductRequest')
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 1)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 2)
            oprot.writeString(
                self.productId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productId
            )
            oprot.writeFieldEnd()
        if self.carrierCode is not None:
            oprot.writeFieldBegin('carrierCode', TType.STRING, 3)
            oprot.writeString(
                self.carrierCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.carrierCode
            )
            oprot.writeFieldEnd()
        if self.saveBrowsingHistory is not None:
            oprot.writeFieldBegin('saveBrowsingHistory', TType.BOOL, 4)
            oprot.writeBool(self.saveBrowsingHistory)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetProductResponse(object):
    """
    Attributes:
     - productDetail

    """

    def __init__(
        self,
        productDetail=None,
    ):
        self.productDetail = productDetail

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.productDetail = ProductDetail()
                    self.productDetail.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('GetProductResponse')
        if self.productDetail is not None:
            oprot.writeFieldBegin('productDetail', TType.STRUCT, 1)
            self.productDetail.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 GetRecommendOaRequest(object):
    """
    Attributes:
     - productType
     - productId

    """

    def __init__(
        self,
        productType=None,
        productId=None,
    ):
        self.productType = productType
        self.productId = productId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.productId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetRecommendOaRequest')
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 1)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 2)
            oprot.writeString(
                self.productId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetRecommendOaResponse(object):
    """
    Attributes:
     - buddyMids

    """

    def __init__(
        self,
        buddyMids=None,
    ):
        self.buddyMids = buddyMids

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.buddyMids = []
                    (_etype995, _size992) = iprot.readListBegin()
                    for _i996 in range(_size992):
                        _elem997 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.buddyMids.append(_elem997)
                    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('GetRecommendOaResponse')
        if self.buddyMids is not None:
            oprot.writeFieldBegin('buddyMids', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.buddyMids))
            for iter998 in self.buddyMids:
                oprot.writeString(
                    iter998.encode('utf-8') if sys.version_info[0] == 2 else iter998
                )
            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 GetRecommendationRequest(object):
    """
    Attributes:
     - continuationToken
     - limit
     - productType
     - recommendationType
     - productId
     - subtypes

    """

    def __init__(
        self,
        continuationToken=None,
        limit=None,
        productType=None,
        recommendationType=None,
        productId=None,
        subtypes=None,
    ):
        self.continuationToken = continuationToken
        self.limit = limit
        self.productType = productType
        self.recommendationType = recommendationType
        self.productId = productId
        self.subtypes = subtypes

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.recommendationType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.productId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.SET:
                    self.subtypes = set()
                    (_etype1002, _size999) = iprot.readSetBegin()
                    for _i1003 in range(_size999):
                        _elem1004 = iprot.readI32()
                        self.subtypes.add(_elem1004)
                    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('GetRecommendationRequest')
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 1)
            oprot.writeBinary(self.continuationToken)
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 2)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 3)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        if self.recommendationType is not None:
            oprot.writeFieldBegin('recommendationType', TType.I32, 4)
            oprot.writeI32(self.recommendationType)
            oprot.writeFieldEnd()
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 5)
            oprot.writeString(
                self.productId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productId
            )
            oprot.writeFieldEnd()
        if self.subtypes is not None:
            oprot.writeFieldBegin('subtypes', TType.SET, 6)
            oprot.writeSetBegin(TType.I32, len(self.subtypes))
            for iter1005 in self.subtypes:
                oprot.writeI32(iter1005)
            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 GetRecommendationResponse(object):
    """
    Attributes:
     - results
     - continuationToken
     - totalSize

    """

    def __init__(
        self,
        results=None,
        continuationToken=None,
        totalSize=None,
    ):
        self.results = results
        self.continuationToken = continuationToken
        self.totalSize = totalSize

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.results = []
                    (_etype1009, _size1006) = iprot.readListBegin()
                    for _i1010 in range(_size1006):
                        _elem1011 = ProductSearchSummary()
                        _elem1011.read(iprot)
                        self.results.append(_elem1011)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.totalSize = 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('GetRecommendationResponse')
        if self.results is not None:
            oprot.writeFieldBegin('results', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.results))
            for iter1012 in self.results:
                iter1012.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
            oprot.writeBinary(self.continuationToken)
            oprot.writeFieldEnd()
        if self.totalSize is not None:
            oprot.writeFieldBegin('totalSize', TType.I64, 3)
            oprot.writeI64(self.totalSize)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSuggestDictionarySettingRequest(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('GetSuggestDictionarySettingRequest')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSuggestDictionarySettingResponse(object):
    """
    Attributes:
     - results

    """

    def __init__(
        self,
        results=None,
    ):
        self.results = results

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.results = []
                    (_etype1016, _size1013) = iprot.readListBegin()
                    for _i1017 in range(_size1013):
                        _elem1018 = SuggestDictionarySetting()
                        _elem1018.read(iprot)
                        self.results.append(_elem1018)
                    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('GetSuggestDictionarySettingResponse')
        if self.results is not None:
            oprot.writeFieldBegin('results', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.results))
            for iter1019 in self.results:
                iter1019.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 GetSuggestResourcesV2Request(object):
    """
    Attributes:
     - productType
     - productIds

    """

    def __init__(
        self,
        productType=None,
        productIds=None,
    ):
        self.productType = productType
        self.productIds = productIds

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.productIds = []
                    (_etype1023, _size1020) = iprot.readListBegin()
                    for _i1024 in range(_size1020):
                        _elem1025 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.productIds.append(_elem1025)
                    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('GetSuggestResourcesV2Request')
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 1)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        if self.productIds is not None:
            oprot.writeFieldBegin('productIds', TType.LIST, 2)
            oprot.writeListBegin(TType.STRING, len(self.productIds))
            for iter1026 in self.productIds:
                oprot.writeString(
                    iter1026.encode('utf-8') if sys.version_info[0] == 2 else iter1026
                )
            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 GetSuggestResourcesV2Response(object):
    """
    Attributes:
     - suggestResources

    """

    def __init__(
        self,
        suggestResources=None,
    ):
        self.suggestResources = suggestResources

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.suggestResources = {}
                    (_ktype1028, _vtype1029, _size1027) = iprot.readMapBegin()
                    for _i1031 in range(_size1027):
                        _key1032 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1033 = SuggestResource()
                        _val1033.read(iprot)
                        self.suggestResources[_key1032] = _val1033
                    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('GetSuggestResourcesV2Response')
        if self.suggestResources is not None:
            oprot.writeFieldBegin('suggestResources', TType.MAP, 1)
            oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.suggestResources))
            for kiter1034, viter1035 in self.suggestResources.items():
                oprot.writeString(
                    kiter1034.encode('utf-8') if sys.version_info[0] == 2 else kiter1034
                )
                viter1035.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 Locale(object):
    """
    Attributes:
     - language
     - country

    """

    def __init__(
        self,
        language=None,
        country=None,
    ):
        self.language = language
        self.country = country

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.language = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.country = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Locale')
        if self.language is not None:
            oprot.writeFieldBegin('language', TType.STRING, 1)
            oprot.writeString(
                self.language.encode('utf-8')
                if sys.version_info[0] == 2
                else self.language
            )
            oprot.writeFieldEnd()
        if self.country is not None:
            oprot.writeFieldBegin('country', TType.STRING, 2)
            oprot.writeString(
                self.country.encode('utf-8')
                if sys.version_info[0] == 2
                else self.country
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Price(object):
    """
    Attributes:
     - currency
     - amount
     - priceString

    """

    def __init__(
        self,
        currency=None,
        amount=None,
        priceString=None,
    ):
        self.currency = currency
        self.amount = amount
        self.priceString = priceString

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.currency = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.amount = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.priceString = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('Price')
        if self.currency is not None:
            oprot.writeFieldBegin('currency', TType.STRING, 1)
            oprot.writeString(
                self.currency.encode('utf-8')
                if sys.version_info[0] == 2
                else self.currency
            )
            oprot.writeFieldEnd()
        if self.amount is not None:
            oprot.writeFieldBegin('amount', TType.STRING, 2)
            oprot.writeString(
                self.amount.encode('utf-8') if sys.version_info[0] == 2 else self.amount
            )
            oprot.writeFieldEnd()
        if self.priceString is not None:
            oprot.writeFieldBegin('priceString', TType.STRING, 3)
            oprot.writeString(
                self.priceString.encode('utf-8')
                if sys.version_info[0] == 2
                else self.priceString
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProductDetail(object):
    """
    Attributes:
     - id
     - billingItemId
     - billingCpId
     - type
     - subtype
     - name
     - author
     - detailEntry
     - copyright
     - notice
     - promotionInfo
     - latestVersion
     - latestVersionString
     - version
     - versionString
     - applicationVersionRange
     - owned
     - grantedByDefault
     - validFor
     - validUntil
     - onSale
     - salesFlags
     - availableForPresent
     - availableForMyself
     - priceTier
     - price
     - priceInLineCoin
     - localizedPrice
     - images
     - attributes
     - authorId
     - stickerResourceType
     - productProperty
     - productSalesState
     - installedTime

    """

    def __init__(
        self,
        id=None,
        billingItemId=None,
        billingCpId=None,
        type=None,
        subtype=None,
        name=None,
        author=None,
        detailEntry=None,
        copyright=None,
        notice=None,
        promotionInfo=None,
        latestVersion=None,
        latestVersionString=None,
        version=None,
        versionString=None,
        applicationVersionRange=None,
        owned=None,
        grantedByDefault=None,
        validFor=None,
        validUntil=None,
        onSale=None,
        salesFlags=None,
        availableForPresent=None,
        availableForMyself=None,
        priceTier=None,
        price=None,
        priceInLineCoin=None,
        localizedPrice=None,
        images=None,
        attributes=None,
        authorId=None,
        stickerResourceType=None,
        productProperty=None,
        productSalesState=None,
        installedTime=None,
    ):
        self.id = id
        self.billingItemId = billingItemId
        self.billingCpId = billingCpId
        self.type = type
        self.subtype = subtype
        self.name = name
        self.author = author
        self.detailEntry = detailEntry
        self.copyright = copyright
        self.notice = notice
        self.promotionInfo = promotionInfo
        self.latestVersion = latestVersion
        self.latestVersionString = latestVersionString
        self.version = version
        self.versionString = versionString
        self.applicationVersionRange = applicationVersionRange
        self.owned = owned
        self.grantedByDefault = grantedByDefault
        self.validFor = validFor
        self.validUntil = validUntil
        self.onSale = onSale
        self.salesFlags = salesFlags
        self.availableForPresent = availableForPresent
        self.availableForMyself = availableForMyself
        self.priceTier = priceTier
        self.price = price
        self.priceInLineCoin = priceInLineCoin
        self.localizedPrice = localizedPrice
        self.images = images
        self.attributes = attributes
        self.authorId = authorId
        self.stickerResourceType = stickerResourceType
        self.productProperty = productProperty
        self.productSalesState = productSalesState
        self.installedTime = installedTime

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.billingItemId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.billingCpId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.type = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.subtype = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.author = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRING:
                    self.detailEntry = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRING:
                    self.copyright = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.STRING:
                    self.notice = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.STRUCT:
                    self.promotionInfo = PromotionInfo()
                    self.promotionInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.I64:
                    self.latestVersion = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.latestVersionString = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.I64:
                    self.version = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.STRING:
                    self.versionString = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 25:
                if ftype == TType.STRUCT:
                    self.applicationVersionRange = ApplicationVersionRange()
                    self.applicationVersionRange.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 31:
                if ftype == TType.BOOL:
                    self.owned = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 32:
                if ftype == TType.BOOL:
                    self.grantedByDefault = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 41:
                if ftype == TType.I32:
                    self.validFor = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 42:
                if ftype == TType.I64:
                    self.validUntil = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 51:
                if ftype == TType.BOOL:
                    self.onSale = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 52:
                if ftype == TType.SET:
                    self.salesFlags = set()
                    (_etype1039, _size1036) = iprot.readSetBegin()
                    for _i1040 in range(_size1036):
                        _elem1041 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.salesFlags.add(_elem1041)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 53:
                if ftype == TType.BOOL:
                    self.availableForPresent = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 54:
                if ftype == TType.BOOL:
                    self.availableForMyself = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 61:
                if ftype == TType.I32:
                    self.priceTier = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 62:
                if ftype == TType.STRUCT:
                    self.price = Price()
                    self.price.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 63:
                if ftype == TType.STRING:
                    self.priceInLineCoin = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 64:
                if ftype == TType.STRUCT:
                    self.localizedPrice = Price()
                    self.localizedPrice.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 91:
                if ftype == TType.MAP:
                    self.images = {}
                    (_ktype1043, _vtype1044, _size1042) = iprot.readMapBegin()
                    for _i1046 in range(_size1042):
                        _key1047 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1048 = []
                        (_etype1052, _size1049) = iprot.readListBegin()
                        for _i1053 in range(_size1049):
                            _elem1054 = (
                                iprot.readString().decode('utf-8')
                                if sys.version_info[0] == 2
                                else iprot.readString()
                            )
                            _val1048.append(_elem1054)
                        iprot.readListEnd()
                        self.images[_key1047] = _val1048
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 92:
                if ftype == TType.MAP:
                    self.attributes = {}
                    (_ktype1056, _vtype1057, _size1055) = iprot.readMapBegin()
                    for _i1059 in range(_size1055):
                        _key1060 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1061 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.attributes[_key1060] = _val1061
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 93:
                if ftype == TType.STRING:
                    self.authorId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 94:
                if ftype == TType.I32:
                    self.stickerResourceType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 95:
                if ftype == TType.STRUCT:
                    self.productProperty = ProductProperty()
                    self.productProperty.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 96:
                if ftype == TType.I32:
                    self.productSalesState = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 97:
                if ftype == TType.I64:
                    self.installedTime = 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('ProductDetail')
        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.billingItemId is not None:
            oprot.writeFieldBegin('billingItemId', TType.STRING, 2)
            oprot.writeString(
                self.billingItemId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.billingItemId
            )
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.STRING, 3)
            oprot.writeString(
                self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type
            )
            oprot.writeFieldEnd()
        if self.subtype is not None:
            oprot.writeFieldBegin('subtype', TType.I32, 4)
            oprot.writeI32(self.subtype)
            oprot.writeFieldEnd()
        if self.billingCpId is not None:
            oprot.writeFieldBegin('billingCpId', TType.STRING, 5)
            oprot.writeString(
                self.billingCpId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.billingCpId
            )
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 11)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.author is not None:
            oprot.writeFieldBegin('author', TType.STRING, 12)
            oprot.writeString(
                self.author.encode('utf-8') if sys.version_info[0] == 2 else self.author
            )
            oprot.writeFieldEnd()
        if self.detailEntry is not None:
            oprot.writeFieldBegin('detailEntry', TType.STRING, 13)
            oprot.writeString(
                self.detailEntry.encode('utf-8')
                if sys.version_info[0] == 2
                else self.detailEntry
            )
            oprot.writeFieldEnd()
        if self.copyright is not None:
            oprot.writeFieldBegin('copyright', TType.STRING, 14)
            oprot.writeString(
                self.copyright.encode('utf-8')
                if sys.version_info[0] == 2
                else self.copyright
            )
            oprot.writeFieldEnd()
        if self.notice is not None:
            oprot.writeFieldBegin('notice', TType.STRING, 15)
            oprot.writeString(
                self.notice.encode('utf-8') if sys.version_info[0] == 2 else self.notice
            )
            oprot.writeFieldEnd()
        if self.promotionInfo is not None:
            oprot.writeFieldBegin('promotionInfo', TType.STRUCT, 16)
            self.promotionInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.latestVersion is not None:
            oprot.writeFieldBegin('latestVersion', TType.I64, 21)
            oprot.writeI64(self.latestVersion)
            oprot.writeFieldEnd()
        if self.latestVersionString is not None:
            oprot.writeFieldBegin('latestVersionString', TType.STRING, 22)
            oprot.writeString(
                self.latestVersionString.encode('utf-8')
                if sys.version_info[0] == 2
                else self.latestVersionString
            )
            oprot.writeFieldEnd()
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.I64, 23)
            oprot.writeI64(self.version)
            oprot.writeFieldEnd()
        if self.versionString is not None:
            oprot.writeFieldBegin('versionString', TType.STRING, 24)
            oprot.writeString(
                self.versionString.encode('utf-8')
                if sys.version_info[0] == 2
                else self.versionString
            )
            oprot.writeFieldEnd()
        if self.applicationVersionRange is not None:
            oprot.writeFieldBegin('applicationVersionRange', TType.STRUCT, 25)
            self.applicationVersionRange.write(oprot)
            oprot.writeFieldEnd()
        if self.owned is not None:
            oprot.writeFieldBegin('owned', TType.BOOL, 31)
            oprot.writeBool(self.owned)
            oprot.writeFieldEnd()
        if self.grantedByDefault is not None:
            oprot.writeFieldBegin('grantedByDefault', TType.BOOL, 32)
            oprot.writeBool(self.grantedByDefault)
            oprot.writeFieldEnd()
        if self.validFor is not None:
            oprot.writeFieldBegin('validFor', TType.I32, 41)
            oprot.writeI32(self.validFor)
            oprot.writeFieldEnd()
        if self.validUntil is not None:
            oprot.writeFieldBegin('validUntil', TType.I64, 42)
            oprot.writeI64(self.validUntil)
            oprot.writeFieldEnd()
        if self.onSale is not None:
            oprot.writeFieldBegin('onSale', TType.BOOL, 51)
            oprot.writeBool(self.onSale)
            oprot.writeFieldEnd()
        if self.salesFlags is not None:
            oprot.writeFieldBegin('salesFlags', TType.SET, 52)
            oprot.writeSetBegin(TType.STRING, len(self.salesFlags))
            for iter1062 in self.salesFlags:
                oprot.writeString(
                    iter1062.encode('utf-8') if sys.version_info[0] == 2 else iter1062
                )
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.availableForPresent is not None:
            oprot.writeFieldBegin('availableForPresent', TType.BOOL, 53)
            oprot.writeBool(self.availableForPresent)
            oprot.writeFieldEnd()
        if self.availableForMyself is not None:
            oprot.writeFieldBegin('availableForMyself', TType.BOOL, 54)
            oprot.writeBool(self.availableForMyself)
            oprot.writeFieldEnd()
        if self.priceTier is not None:
            oprot.writeFieldBegin('priceTier', TType.I32, 61)
            oprot.writeI32(self.priceTier)
            oprot.writeFieldEnd()
        if self.price is not None:
            oprot.writeFieldBegin('price', TType.STRUCT, 62)
            self.price.write(oprot)
            oprot.writeFieldEnd()
        if self.priceInLineCoin is not None:
            oprot.writeFieldBegin('priceInLineCoin', TType.STRING, 63)
            oprot.writeString(
                self.priceInLineCoin.encode('utf-8')
                if sys.version_info[0] == 2
                else self.priceInLineCoin
            )
            oprot.writeFieldEnd()
        if self.localizedPrice is not None:
            oprot.writeFieldBegin('localizedPrice', TType.STRUCT, 64)
            self.localizedPrice.write(oprot)
            oprot.writeFieldEnd()
        if self.images is not None:
            oprot.writeFieldBegin('images', TType.MAP, 91)
            oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.images))
            for kiter1063, viter1064 in self.images.items():
                oprot.writeString(
                    kiter1063.encode('utf-8') if sys.version_info[0] == 2 else kiter1063
                )
                oprot.writeListBegin(TType.STRING, len(viter1064))
                for iter1065 in viter1064:
                    oprot.writeString(
                        iter1065.encode('utf-8')
                        if sys.version_info[0] == 2
                        else iter1065
                    )
                oprot.writeListEnd()
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.attributes is not None:
            oprot.writeFieldBegin('attributes', TType.MAP, 92)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes))
            for kiter1066, viter1067 in self.attributes.items():
                oprot.writeString(
                    kiter1066.encode('utf-8') if sys.version_info[0] == 2 else kiter1066
                )
                oprot.writeString(
                    viter1067.encode('utf-8') if sys.version_info[0] == 2 else viter1067
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.authorId is not None:
            oprot.writeFieldBegin('authorId', TType.STRING, 93)
            oprot.writeString(
                self.authorId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authorId
            )
            oprot.writeFieldEnd()
        if self.stickerResourceType is not None:
            oprot.writeFieldBegin('stickerResourceType', TType.I32, 94)
            oprot.writeI32(self.stickerResourceType)
            oprot.writeFieldEnd()
        if self.productProperty is not None:
            oprot.writeFieldBegin('productProperty', TType.STRUCT, 95)
            self.productProperty.write(oprot)
            oprot.writeFieldEnd()
        if self.productSalesState is not None:
            oprot.writeFieldBegin('productSalesState', TType.I32, 96)
            oprot.writeI32(self.productSalesState)
            oprot.writeFieldEnd()
        if self.installedTime is not None:
            oprot.writeFieldBegin('installedTime', TType.I64, 97)
            oprot.writeI64(self.installedTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProductListV2(object):
    """
    Attributes:
     - ProductListV2
     - offset
     - totalSize
     - titleEntry

    """

    def __init__(
        self,
        ProductListV2=None,
        offset=None,
        totalSize=None,
        titleEntry=None,
    ):
        self.ProductListV2 = ProductListV2
        self.offset = offset
        self.totalSize = totalSize
        self.titleEntry = titleEntry

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.ProductListV2 = []
                    (_etype1071, _size1068) = iprot.readListBegin()
                    for _i1072 in range(_size1068):
                        _elem1073 = ProductDetail()
                        _elem1073.read(iprot)
                        self.ProductListV2.append(_elem1073)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.offset = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.totalSize = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.titleEntry = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ProductListV2')
        if self.ProductListV2 is not None:
            oprot.writeFieldBegin('ProductListV2', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.ProductListV2))
            for iter1074 in self.ProductListV2:
                iter1074.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.offset is not None:
            oprot.writeFieldBegin('offset', TType.I32, 2)
            oprot.writeI32(self.offset)
            oprot.writeFieldEnd()
        if self.totalSize is not None:
            oprot.writeFieldBegin('totalSize', TType.I32, 3)
            oprot.writeI32(self.totalSize)
            oprot.writeFieldEnd()
        if self.titleEntry is not None:
            oprot.writeFieldBegin('titleEntry', TType.STRING, 11)
            oprot.writeString(
                self.titleEntry.encode('utf-8')
                if sys.version_info[0] == 2
                else self.titleEntry
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProductListByAuthorRequest(object):
    """
    Attributes:
     - productType
     - authorId
     - offset
     - limit

    """

    def __init__(
        self,
        productType=None,
        authorId=None,
        offset=None,
        limit=None,
    ):
        self.productType = productType
        self.authorId = authorId
        self.offset = offset
        self.limit = limit

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.authorId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.offset = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ProductListByAuthorRequest')
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 1)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        if self.authorId is not None:
            oprot.writeFieldBegin('authorId', TType.STRING, 2)
            oprot.writeString(
                self.authorId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authorId
            )
            oprot.writeFieldEnd()
        if self.offset is not None:
            oprot.writeFieldBegin('offset', TType.I32, 3)
            oprot.writeI32(self.offset)
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 4)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProductProperty(object):
    """
    Attributes:
     - stickerProperty
     - themeProperty
     - sticonProperty

    """

    def __init__(
        self,
        stickerProperty=None,
        themeProperty=None,
        sticonProperty=None,
    ):
        self.stickerProperty = stickerProperty
        self.themeProperty = themeProperty
        self.sticonProperty = sticonProperty

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.stickerProperty = StickerProperty()
                    self.stickerProperty.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.themeProperty = ThemeProperty()
                    self.themeProperty.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.sticonProperty = SticonProperty()
                    self.sticonProperty.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('ProductProperty')
        if self.stickerProperty is not None:
            oprot.writeFieldBegin('stickerProperty', TType.STRUCT, 1)
            self.stickerProperty.write(oprot)
            oprot.writeFieldEnd()
        if self.themeProperty is not None:
            oprot.writeFieldBegin('themeProperty', TType.STRUCT, 2)
            self.themeProperty.write(oprot)
            oprot.writeFieldEnd()
        if self.sticonProperty is not None:
            oprot.writeFieldBegin('sticonProperty', TType.STRUCT, 3)
            self.sticonProperty.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 ProductSearchSummary(object):
    """
    Attributes:
     - id
     - type
     - name
     - author
     - promotionInfo
     - version
     - newFlag
     - priceTier
     - priceInLineCoin
     - property
     - subType
     - onSale
     - availableForPresent
     - availableForPurchase
     - validDays
     - authorId
     - bargainFlag

    """

    def __init__(
        self,
        id=None,
        type=None,
        name=None,
        author=None,
        promotionInfo=None,
        version=None,
        newFlag=None,
        priceTier=None,
        priceInLineCoin=None,
        property=None,
        subType=None,
        onSale=None,
        availableForPresent=None,
        availableForPurchase=None,
        validDays=None,
        authorId=None,
        bargainFlag=None,
    ):
        self.id = id
        self.type = type
        self.name = name
        self.author = author
        self.promotionInfo = promotionInfo
        self.version = version
        self.newFlag = newFlag
        self.priceTier = priceTier
        self.priceInLineCoin = priceInLineCoin
        self.property = property
        self.subType = subType
        self.onSale = onSale
        self.availableForPresent = availableForPresent
        self.availableForPurchase = availableForPurchase
        self.validDays = validDays
        self.authorId = authorId
        self.bargainFlag = bargainFlag

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.author = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.promotionInfo = PromotionInfo()
                    self.promotionInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.version = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.newFlag = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.priceTier = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.priceInLineCoin = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRUCT:
                    self.property = ProductProperty()
                    self.property.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I32:
                    self.subType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.BOOL:
                    self.onSale = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.BOOL:
                    self.availableForPresent = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.BOOL:
                    self.availableForPurchase = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I32:
                    self.validDays = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.STRING:
                    self.authorId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.BOOL:
                    self.bargainFlag = 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('ProductSearchSummary')
        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.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 2)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 3)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.author is not None:
            oprot.writeFieldBegin('author', TType.STRING, 4)
            oprot.writeString(
                self.author.encode('utf-8') if sys.version_info[0] == 2 else self.author
            )
            oprot.writeFieldEnd()
        if self.promotionInfo is not None:
            oprot.writeFieldBegin('promotionInfo', TType.STRUCT, 5)
            self.promotionInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.I64, 6)
            oprot.writeI64(self.version)
            oprot.writeFieldEnd()
        if self.newFlag is not None:
            oprot.writeFieldBegin('newFlag', TType.BOOL, 7)
            oprot.writeBool(self.newFlag)
            oprot.writeFieldEnd()
        if self.priceTier is not None:
            oprot.writeFieldBegin('priceTier', TType.I32, 8)
            oprot.writeI32(self.priceTier)
            oprot.writeFieldEnd()
        if self.priceInLineCoin is not None:
            oprot.writeFieldBegin('priceInLineCoin', TType.STRING, 9)
            oprot.writeString(
                self.priceInLineCoin.encode('utf-8')
                if sys.version_info[0] == 2
                else self.priceInLineCoin
            )
            oprot.writeFieldEnd()
        if self.property is not None:
            oprot.writeFieldBegin('property', TType.STRUCT, 10)
            self.property.write(oprot)
            oprot.writeFieldEnd()
        if self.subType is not None:
            oprot.writeFieldBegin('subType', TType.I32, 11)
            oprot.writeI32(self.subType)
            oprot.writeFieldEnd()
        if self.onSale is not None:
            oprot.writeFieldBegin('onSale', TType.BOOL, 12)
            oprot.writeBool(self.onSale)
            oprot.writeFieldEnd()
        if self.availableForPresent is not None:
            oprot.writeFieldBegin('availableForPresent', TType.BOOL, 13)
            oprot.writeBool(self.availableForPresent)
            oprot.writeFieldEnd()
        if self.availableForPurchase is not None:
            oprot.writeFieldBegin('availableForPurchase', TType.BOOL, 14)
            oprot.writeBool(self.availableForPurchase)
            oprot.writeFieldEnd()
        if self.validDays is not None:
            oprot.writeFieldBegin('validDays', TType.I32, 15)
            oprot.writeI32(self.validDays)
            oprot.writeFieldEnd()
        if self.authorId is not None:
            oprot.writeFieldBegin('authorId', TType.STRING, 16)
            oprot.writeString(
                self.authorId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authorId
            )
            oprot.writeFieldEnd()
        if self.bargainFlag is not None:
            oprot.writeFieldBegin('bargainFlag', TType.BOOL, 17)
            oprot.writeBool(self.bargainFlag)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProductSummary(object):
    """
    Attributes:
     - id
     - name
     - latestVersion
     - applicationVersionRange
     - grantedByDefault
     - attributes
     - productTypeSummary
     - validUntil

    """

    def __init__(
        self,
        id=None,
        name=None,
        latestVersion=None,
        applicationVersionRange=None,
        grantedByDefault=None,
        attributes=None,
        productTypeSummary=None,
        validUntil=None,
    ):
        self.id = id
        self.name = name
        self.latestVersion = latestVersion
        self.applicationVersionRange = applicationVersionRange
        self.grantedByDefault = grantedByDefault
        self.attributes = attributes
        self.productTypeSummary = productTypeSummary
        self.validUntil = validUntil

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.I64:
                    self.latestVersion = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 25:
                if ftype == TType.STRUCT:
                    self.applicationVersionRange = ApplicationVersionRange()
                    self.applicationVersionRange.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 32:
                if ftype == TType.BOOL:
                    self.grantedByDefault = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 92:
                if ftype == TType.MAP:
                    self.attributes = {}
                    (_ktype1076, _vtype1077, _size1075) = iprot.readMapBegin()
                    for _i1079 in range(_size1075):
                        _key1080 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1081 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.attributes[_key1080] = _val1081
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 93:
                if ftype == TType.STRUCT:
                    self.productTypeSummary = ProductTypeSummary()
                    self.productTypeSummary.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 94:
                if ftype == TType.I64:
                    self.validUntil = 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('ProductSummary')
        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.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 11)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.latestVersion is not None:
            oprot.writeFieldBegin('latestVersion', TType.I64, 21)
            oprot.writeI64(self.latestVersion)
            oprot.writeFieldEnd()
        if self.applicationVersionRange is not None:
            oprot.writeFieldBegin('applicationVersionRange', TType.STRUCT, 25)
            self.applicationVersionRange.write(oprot)
            oprot.writeFieldEnd()
        if self.grantedByDefault is not None:
            oprot.writeFieldBegin('grantedByDefault', TType.BOOL, 32)
            oprot.writeBool(self.grantedByDefault)
            oprot.writeFieldEnd()
        if self.attributes is not None:
            oprot.writeFieldBegin('attributes', TType.MAP, 92)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes))
            for kiter1082, viter1083 in self.attributes.items():
                oprot.writeString(
                    kiter1082.encode('utf-8') if sys.version_info[0] == 2 else kiter1082
                )
                oprot.writeString(
                    viter1083.encode('utf-8') if sys.version_info[0] == 2 else viter1083
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.productTypeSummary is not None:
            oprot.writeFieldBegin('productTypeSummary', TType.STRUCT, 93)
            self.productTypeSummary.write(oprot)
            oprot.writeFieldEnd()
        if self.validUntil is not None:
            oprot.writeFieldBegin('validUntil', TType.I64, 94)
            oprot.writeI64(self.validUntil)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProductSummaryForAutoSuggest(object):
    """
    Attributes:
     - id
     - version
     - name
     - stickerResourceType
     - suggestVersion

    """

    def __init__(
        self,
        id=None,
        version=None,
        name=None,
        stickerResourceType=None,
        suggestVersion=None,
    ):
        self.id = id
        self.version = version
        self.name = name
        self.stickerResourceType = stickerResourceType
        self.suggestVersion = suggestVersion

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.id = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.version = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.stickerResourceType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.suggestVersion = 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('ProductSummaryForAutoSuggest')
        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.version is not None:
            oprot.writeFieldBegin('version', TType.I64, 2)
            oprot.writeI64(self.version)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 3)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.stickerResourceType is not None:
            oprot.writeFieldBegin('stickerResourceType', TType.I32, 4)
            oprot.writeI32(self.stickerResourceType)
            oprot.writeFieldEnd()
        if self.suggestVersion is not None:
            oprot.writeFieldBegin('suggestVersion', TType.I64, 5)
            oprot.writeI64(self.suggestVersion)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProductSummaryList(object):
    """
    Attributes:
     - productList
     - offset
     - totalSize

    """

    def __init__(
        self,
        productList=None,
        offset=None,
        totalSize=None,
    ):
        self.productList = productList
        self.offset = offset
        self.totalSize = totalSize

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.productList = []
                    (_etype1087, _size1084) = iprot.readListBegin()
                    for _i1088 in range(_size1084):
                        _elem1089 = ProductSummary()
                        _elem1089.read(iprot)
                        self.productList.append(_elem1089)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.offset = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.totalSize = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ProductSummaryList')
        if self.productList is not None:
            oprot.writeFieldBegin('productList', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.productList))
            for iter1090 in self.productList:
                iter1090.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.offset is not None:
            oprot.writeFieldBegin('offset', TType.I32, 2)
            oprot.writeI32(self.offset)
            oprot.writeFieldEnd()
        if self.totalSize is not None:
            oprot.writeFieldBegin('totalSize', TType.I32, 3)
            oprot.writeI32(self.totalSize)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProductTypeSummary(object):
    """
    Attributes:
     - stickerSummary
     - themeSummary
     - sticonSummary

    """

    def __init__(
        self,
        stickerSummary=None,
        themeSummary=None,
        sticonSummary=None,
    ):
        self.stickerSummary = stickerSummary
        self.themeSummary = themeSummary
        self.sticonSummary = sticonSummary

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.stickerSummary = StickerSummary()
                    self.stickerSummary.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.themeSummary = ThemeSummary()
                    self.themeSummary.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.sticonSummary = SticonSummary()
                    self.sticonSummary.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('ProductTypeSummary')
        if self.stickerSummary is not None:
            oprot.writeFieldBegin('stickerSummary', TType.STRUCT, 1)
            self.stickerSummary.write(oprot)
            oprot.writeFieldEnd()
        if self.themeSummary is not None:
            oprot.writeFieldBegin('themeSummary', TType.STRUCT, 2)
            self.themeSummary.write(oprot)
            oprot.writeFieldEnd()
        if self.sticonSummary is not None:
            oprot.writeFieldBegin('sticonSummary', TType.STRUCT, 3)
            self.sticonSummary.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 ProductValidationRequest(object):
    """
    Attributes:
     - validationScheme
     - authCode

    """

    def __init__(
        self,
        validationScheme=None,
        authCode=None,
    ):
        self.validationScheme = validationScheme
        self.authCode = authCode

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.validationScheme = ProductValidationScheme()
                    self.validationScheme.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.authCode = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ProductValidationRequest')
        if self.validationScheme is not None:
            oprot.writeFieldBegin('validationScheme', TType.STRUCT, 1)
            self.validationScheme.write(oprot)
            oprot.writeFieldEnd()
        if self.authCode is not None:
            oprot.writeFieldBegin('authCode', TType.STRING, 10)
            oprot.writeString(
                self.authCode.encode('utf-8')
                if sys.version_info[0] == 2
                else self.authCode
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProductValidationResult(object):
    """
    Attributes:
     - validated

    """

    def __init__(
        self,
        validated=None,
    ):
        self.validated = validated

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.validated = 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('ProductValidationResult')
        if self.validated is not None:
            oprot.writeFieldBegin('validated', TType.BOOL, 1)
            oprot.writeBool(self.validated)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProductValidationScheme(object):
    """
    Attributes:
     - key
     - offset
     - size

    """

    def __init__(
        self,
        key=None,
        offset=None,
        size=None,
    ):
        self.key = key
        self.offset = offset
        self.size = size

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 10:
                if ftype == TType.STRING:
                    self.key = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.offset = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I64:
                    self.size = 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('ProductValidationScheme')
        if self.key is not None:
            oprot.writeFieldBegin('key', TType.STRING, 10)
            oprot.writeString(
                self.key.encode('utf-8') if sys.version_info[0] == 2 else self.key
            )
            oprot.writeFieldEnd()
        if self.offset is not None:
            oprot.writeFieldBegin('offset', TType.I64, 11)
            oprot.writeI64(self.offset)
            oprot.writeFieldEnd()
        if self.size is not None:
            oprot.writeFieldBegin('size', TType.I64, 12)
            oprot.writeI64(self.size)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PromotionBuddyInfo(object):
    """
    Attributes:
     - buddyMid

    """

    def __init__(
        self,
        buddyMid=None,
    ):
        self.buddyMid = buddyMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.buddyMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PromotionBuddyInfo')
        if self.buddyMid is not None:
            oprot.writeFieldBegin('buddyMid', TType.STRING, 1)
            oprot.writeString(
                self.buddyMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.buddyMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PromotionDetail(object):
    """
    Attributes:
     - promotionBuddyInfo
     - promotionInstallInfo
     - promotionMissionInfo

    """

    def __init__(
        self,
        promotionBuddyInfo=None,
        promotionInstallInfo=None,
        promotionMissionInfo=None,
    ):
        self.promotionBuddyInfo = promotionBuddyInfo
        self.promotionInstallInfo = promotionInstallInfo
        self.promotionMissionInfo = promotionMissionInfo

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.promotionBuddyInfo = PromotionBuddyInfo()
                    self.promotionBuddyInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.promotionInstallInfo = PromotionInstallInfo()
                    self.promotionInstallInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.promotionMissionInfo = PromotionMissionInfo()
                    self.promotionMissionInfo.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('PromotionDetail')
        if self.promotionBuddyInfo is not None:
            oprot.writeFieldBegin('promotionBuddyInfo', TType.STRUCT, 1)
            self.promotionBuddyInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.promotionInstallInfo is not None:
            oprot.writeFieldBegin('promotionInstallInfo', TType.STRUCT, 2)
            self.promotionInstallInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.promotionMissionInfo is not None:
            oprot.writeFieldBegin('promotionMissionInfo', TType.STRUCT, 3)
            self.promotionMissionInfo.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 PromotionInfo(object):
    """
    Attributes:
     - promotionType
     - buddyInfo
     - promotionDetail

    """

    def __init__(
        self,
        promotionType=None,
        buddyInfo=None,
        promotionDetail=None,
    ):
        self.promotionType = promotionType
        self.buddyInfo = buddyInfo
        self.promotionDetail = promotionDetail

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.promotionType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 51:
                if ftype == TType.STRUCT:
                    self.buddyInfo = PromotionBuddyInfo()
                    self.buddyInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.promotionDetail = PromotionDetail()
                    self.promotionDetail.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('PromotionInfo')
        if self.promotionType is not None:
            oprot.writeFieldBegin('promotionType', TType.I32, 1)
            oprot.writeI32(self.promotionType)
            oprot.writeFieldEnd()
        if self.promotionDetail is not None:
            oprot.writeFieldBegin('promotionDetail', TType.STRUCT, 2)
            self.promotionDetail.write(oprot)
            oprot.writeFieldEnd()
        if self.buddyInfo is not None:
            oprot.writeFieldBegin('buddyInfo', TType.STRUCT, 51)
            self.buddyInfo.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 PromotionInstallInfo(object):
    """
    Attributes:
     - downloadUrl
     - customUrlSchema

    """

    def __init__(
        self,
        downloadUrl=None,
        customUrlSchema=None,
    ):
        self.downloadUrl = downloadUrl
        self.customUrlSchema = customUrlSchema

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.downloadUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.customUrlSchema = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PromotionInstallInfo')
        if self.downloadUrl is not None:
            oprot.writeFieldBegin('downloadUrl', TType.STRING, 1)
            oprot.writeString(
                self.downloadUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.downloadUrl
            )
            oprot.writeFieldEnd()
        if self.customUrlSchema is not None:
            oprot.writeFieldBegin('customUrlSchema', TType.STRING, 2)
            oprot.writeString(
                self.customUrlSchema.encode('utf-8')
                if sys.version_info[0] == 2
                else self.customUrlSchema
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PromotionMissionInfo(object):
    """
    Attributes:
     - promotionMissionType
     - missionCompleted
     - downloadUrl
     - customUrlSchema

    """

    def __init__(
        self,
        promotionMissionType=None,
        missionCompleted=None,
        downloadUrl=None,
        customUrlSchema=None,
    ):
        self.promotionMissionType = promotionMissionType
        self.missionCompleted = missionCompleted
        self.downloadUrl = downloadUrl
        self.customUrlSchema = customUrlSchema

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.promotionMissionType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.missionCompleted = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.downloadUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.customUrlSchema = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PromotionMissionInfo')
        if self.promotionMissionType is not None:
            oprot.writeFieldBegin('promotionMissionType', TType.I32, 1)
            oprot.writeI32(self.promotionMissionType)
            oprot.writeFieldEnd()
        if self.missionCompleted is not None:
            oprot.writeFieldBegin('missionCompleted', TType.BOOL, 2)
            oprot.writeBool(self.missionCompleted)
            oprot.writeFieldEnd()
        if self.downloadUrl is not None:
            oprot.writeFieldBegin('downloadUrl', TType.STRING, 3)
            oprot.writeString(
                self.downloadUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.downloadUrl
            )
            oprot.writeFieldEnd()
        if self.customUrlSchema is not None:
            oprot.writeFieldBegin('customUrlSchema', TType.STRING, 4)
            oprot.writeString(
                self.customUrlSchema.encode('utf-8')
                if sys.version_info[0] == 2
                else self.customUrlSchema
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PurchaseOrder(object):
    """
    Attributes:
     - shopId
     - productId
     - recipientMid
     - price
     - enableLinePointAutoExchange
     - locale
     - presentAttributes

    """

    def __init__(
        self,
        shopId=None,
        productId=None,
        recipientMid=None,
        price=None,
        enableLinePointAutoExchange=None,
        locale=None,
        presentAttributes=None,
    ):
        self.shopId = shopId
        self.productId = productId
        self.recipientMid = recipientMid
        self.price = price
        self.enableLinePointAutoExchange = enableLinePointAutoExchange
        self.locale = locale
        self.presentAttributes = presentAttributes

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.shopId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.productId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.recipientMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRUCT:
                    self.price = Price()
                    self.price.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.BOOL:
                    self.enableLinePointAutoExchange = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRUCT:
                    self.locale = Locale()
                    self.locale.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 31:
                if ftype == TType.MAP:
                    self.presentAttributes = {}
                    (_ktype1092, _vtype1093, _size1091) = iprot.readMapBegin()
                    for _i1095 in range(_size1091):
                        _key1096 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1097 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.presentAttributes[_key1096] = _val1097
                    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('PurchaseOrder')
        if self.shopId is not None:
            oprot.writeFieldBegin('shopId', TType.STRING, 1)
            oprot.writeString(
                self.shopId.encode('utf-8') if sys.version_info[0] == 2 else self.shopId
            )
            oprot.writeFieldEnd()
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 2)
            oprot.writeString(
                self.productId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productId
            )
            oprot.writeFieldEnd()
        if self.recipientMid is not None:
            oprot.writeFieldBegin('recipientMid', TType.STRING, 5)
            oprot.writeString(
                self.recipientMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.recipientMid
            )
            oprot.writeFieldEnd()
        if self.price is not None:
            oprot.writeFieldBegin('price', TType.STRUCT, 11)
            self.price.write(oprot)
            oprot.writeFieldEnd()
        if self.enableLinePointAutoExchange is not None:
            oprot.writeFieldBegin('enableLinePointAutoExchange', TType.BOOL, 12)
            oprot.writeBool(self.enableLinePointAutoExchange)
            oprot.writeFieldEnd()
        if self.locale is not None:
            oprot.writeFieldBegin('locale', TType.STRUCT, 21)
            self.locale.write(oprot)
            oprot.writeFieldEnd()
        if self.presentAttributes is not None:
            oprot.writeFieldBegin('presentAttributes', TType.MAP, 31)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.presentAttributes))
            for kiter1098, viter1099 in self.presentAttributes.items():
                oprot.writeString(
                    kiter1098.encode('utf-8') if sys.version_info[0] == 2 else kiter1098
                )
                oprot.writeString(
                    viter1099.encode('utf-8') if sys.version_info[0] == 2 else viter1099
                )
            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 PurchaseOrderResponse(object):
    """
    Attributes:
     - orderId
     - attributes
     - billingConfirmUrl

    """

    def __init__(
        self,
        orderId=None,
        attributes=None,
        billingConfirmUrl=None,
    ):
        self.orderId = orderId
        self.attributes = attributes
        self.billingConfirmUrl = billingConfirmUrl

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.orderId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.MAP:
                    self.attributes = {}
                    (_ktype1101, _vtype1102, _size1100) = iprot.readMapBegin()
                    for _i1104 in range(_size1100):
                        _key1105 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1106 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.attributes[_key1105] = _val1106
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.billingConfirmUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PurchaseOrderResponse')
        if self.orderId is not None:
            oprot.writeFieldBegin('orderId', TType.STRING, 1)
            oprot.writeString(
                self.orderId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.orderId
            )
            oprot.writeFieldEnd()
        if self.attributes is not None:
            oprot.writeFieldBegin('attributes', TType.MAP, 11)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes))
            for kiter1107, viter1108 in self.attributes.items():
                oprot.writeString(
                    kiter1107.encode('utf-8') if sys.version_info[0] == 2 else kiter1107
                )
                oprot.writeString(
                    viter1108.encode('utf-8') if sys.version_info[0] == 2 else viter1108
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.billingConfirmUrl is not None:
            oprot.writeFieldBegin('billingConfirmUrl', TType.STRING, 12)
            oprot.writeString(
                self.billingConfirmUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.billingConfirmUrl
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PurchaseRecord(object):
    """
    Attributes:
     - productDetail
     - purchasedTime
     - giver
     - recipient
     - purchasedPrice

    """

    def __init__(
        self,
        productDetail=None,
        purchasedTime=None,
        giver=None,
        recipient=None,
        purchasedPrice=None,
    ):
        self.productDetail = productDetail
        self.purchasedTime = purchasedTime
        self.giver = giver
        self.recipient = recipient
        self.purchasedPrice = purchasedPrice

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.productDetail = ProductDetail()
                    self.productDetail.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.purchasedTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRING:
                    self.giver = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.recipient = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 31:
                if ftype == TType.STRUCT:
                    self.purchasedPrice = Price()
                    self.purchasedPrice.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('PurchaseRecord')
        if self.productDetail is not None:
            oprot.writeFieldBegin('productDetail', TType.STRUCT, 1)
            self.productDetail.write(oprot)
            oprot.writeFieldEnd()
        if self.purchasedTime is not None:
            oprot.writeFieldBegin('purchasedTime', TType.I64, 11)
            oprot.writeI64(self.purchasedTime)
            oprot.writeFieldEnd()
        if self.giver is not None:
            oprot.writeFieldBegin('giver', TType.STRING, 21)
            oprot.writeString(
                self.giver.encode('utf-8') if sys.version_info[0] == 2 else self.giver
            )
            oprot.writeFieldEnd()
        if self.recipient is not None:
            oprot.writeFieldBegin('recipient', TType.STRING, 22)
            oprot.writeString(
                self.recipient.encode('utf-8')
                if sys.version_info[0] == 2
                else self.recipient
            )
            oprot.writeFieldEnd()
        if self.purchasedPrice is not None:
            oprot.writeFieldBegin('purchasedPrice', TType.STRUCT, 31)
            self.purchasedPrice.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 PurchaseRecordList(object):
    """
    Attributes:
     - purchaseRecords
     - offset
     - totalSize

    """

    def __init__(
        self,
        purchaseRecords=None,
        offset=None,
        totalSize=None,
    ):
        self.purchaseRecords = purchaseRecords
        self.offset = offset
        self.totalSize = totalSize

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.purchaseRecords = []
                    (_etype1112, _size1109) = iprot.readListBegin()
                    for _i1113 in range(_size1109):
                        _elem1114 = PurchaseRecord()
                        _elem1114.read(iprot)
                        self.purchaseRecords.append(_elem1114)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.offset = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.totalSize = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PurchaseRecordList')
        if self.purchaseRecords is not None:
            oprot.writeFieldBegin('purchaseRecords', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.purchaseRecords))
            for iter1115 in self.purchaseRecords:
                iter1115.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.offset is not None:
            oprot.writeFieldBegin('offset', TType.I32, 2)
            oprot.writeI32(self.offset)
            oprot.writeFieldEnd()
        if self.totalSize is not None:
            oprot.writeFieldBegin('totalSize', TType.I32, 3)
            oprot.writeI32(self.totalSize)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ShopUpdates(object):
    """
    Attributes:
     - shopId
     - latestUpdateTime

    """

    def __init__(
        self,
        shopId=None,
        latestUpdateTime=None,
    ):
        self.shopId = shopId
        self.latestUpdateTime = latestUpdateTime

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.shopId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.latestUpdateTime = 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('ShopUpdates')
        if self.shopId is not None:
            oprot.writeFieldBegin('shopId', TType.STRING, 1)
            oprot.writeString(
                self.shopId.encode('utf-8') if sys.version_info[0] == 2 else self.shopId
            )
            oprot.writeFieldEnd()
        if self.latestUpdateTime is not None:
            oprot.writeFieldBegin('latestUpdateTime', TType.I64, 11)
            oprot.writeI64(self.latestUpdateTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ShowcaseRequest(object):
    """
    Attributes:
     - productType
     - showcaseType
     - subType
     - continuationToken
     - limit

    """

    def __init__(
        self,
        productType=None,
        showcaseType=None,
        subType=None,
        continuationToken=None,
        limit=None,
    ):
        self.productType = productType
        self.showcaseType = showcaseType
        self.subType = subType
        self.continuationToken = continuationToken
        self.limit = limit

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.productType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.showcaseType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.subType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ShowcaseRequest')
        if self.productType is not None:
            oprot.writeFieldBegin('productType', TType.I32, 1)
            oprot.writeI32(self.productType)
            oprot.writeFieldEnd()
        if self.showcaseType is not None:
            oprot.writeFieldBegin('showcaseType', TType.I32, 2)
            oprot.writeI32(self.showcaseType)
            oprot.writeFieldEnd()
        if self.subType is not None:
            oprot.writeFieldBegin('subType', TType.I32, 3)
            oprot.writeI32(self.subType)
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 4)
            oprot.writeBinary(self.continuationToken)
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin('limit', TType.I32, 5)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ShowcaseV3(object):
    """
    Attributes:
     - productList
     - continuationToken
     - totalSize

    """

    def __init__(
        self,
        productList=None,
        continuationToken=None,
        totalSize=None,
    ):
        self.productList = productList
        self.continuationToken = continuationToken
        self.totalSize = totalSize

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.productList = []
                    (_etype1119, _size1116) = iprot.readListBegin()
                    for _i1120 in range(_size1116):
                        _elem1121 = ProductSearchSummary()
                        _elem1121.read(iprot)
                        self.productList.append(_elem1121)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.continuationToken = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.totalSize = 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('ShowcaseV3')
        if self.productList is not None:
            oprot.writeFieldBegin('productList', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.productList))
            for iter1122 in self.productList:
                iter1122.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.continuationToken is not None:
            oprot.writeFieldBegin('continuationToken', TType.STRING, 2)
            oprot.writeBinary(self.continuationToken)
            oprot.writeFieldEnd()
        if self.totalSize is not None:
            oprot.writeFieldBegin('totalSize', TType.I64, 3)
            oprot.writeI64(self.totalSize)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class StickerProperty(object):
    """
    Attributes:
     - hasAnimation
     - hasSound
     - hasPopup
     - stickerResourceType
     - stickerOptions
     - compactStickerOptions
     - stickerHash
     - stickerIds

    """

    def __init__(
        self,
        hasAnimation=None,
        hasSound=None,
        hasPopup=None,
        stickerResourceType=None,
        stickerOptions=None,
        compactStickerOptions=None,
        stickerHash=None,
        stickerIds=None,
    ):
        self.hasAnimation = hasAnimation
        self.hasSound = hasSound
        self.hasPopup = hasPopup
        self.stickerResourceType = stickerResourceType
        self.stickerOptions = stickerOptions
        self.compactStickerOptions = compactStickerOptions
        self.stickerHash = stickerHash
        self.stickerIds = stickerIds

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.hasAnimation = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.hasSound = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.hasPopup = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.stickerResourceType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.stickerOptions = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.compactStickerOptions = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.stickerHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.LIST:
                    self.stickerIds = []
                    (_etype1126, _size1123) = iprot.readListBegin()
                    for _i1127 in range(_size1123):
                        _elem1128 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.stickerIds.append(_elem1128)
                    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('StickerProperty')
        if self.hasAnimation is not None:
            oprot.writeFieldBegin('hasAnimation', TType.BOOL, 1)
            oprot.writeBool(self.hasAnimation)
            oprot.writeFieldEnd()
        if self.hasSound is not None:
            oprot.writeFieldBegin('hasSound', TType.BOOL, 2)
            oprot.writeBool(self.hasSound)
            oprot.writeFieldEnd()
        if self.hasPopup is not None:
            oprot.writeFieldBegin('hasPopup', TType.BOOL, 3)
            oprot.writeBool(self.hasPopup)
            oprot.writeFieldEnd()
        if self.stickerResourceType is not None:
            oprot.writeFieldBegin('stickerResourceType', TType.I32, 4)
            oprot.writeI32(self.stickerResourceType)
            oprot.writeFieldEnd()
        if self.stickerOptions is not None:
            oprot.writeFieldBegin('stickerOptions', TType.STRING, 5)
            oprot.writeString(
                self.stickerOptions.encode('utf-8')
                if sys.version_info[0] == 2
                else self.stickerOptions
            )
            oprot.writeFieldEnd()
        if self.compactStickerOptions is not None:
            oprot.writeFieldBegin('compactStickerOptions', TType.I32, 6)
            oprot.writeI32(self.compactStickerOptions)
            oprot.writeFieldEnd()
        if self.stickerHash is not None:
            oprot.writeFieldBegin('stickerHash', TType.STRING, 7)
            oprot.writeString(
                self.stickerHash.encode('utf-8')
                if sys.version_info[0] == 2
                else self.stickerHash
            )
            oprot.writeFieldEnd()
        if self.stickerIds is not None:
            oprot.writeFieldBegin('stickerIds', TType.LIST, 9)
            oprot.writeListBegin(TType.STRING, len(self.stickerIds))
            for iter1129 in self.stickerIds:
                oprot.writeString(
                    iter1129.encode('utf-8') if sys.version_info[0] == 2 else iter1129
                )
            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 StickerSummary(object):
    """
    Attributes:
     - stickerIdRanges
     - suggestVersion
     - stickerHash
     - defaultDisplayOnKeyboard
     - stickerResourceType

    """

    def __init__(
        self,
        stickerIdRanges=None,
        suggestVersion=None,
        stickerHash=None,
        defaultDisplayOnKeyboard=None,
        stickerResourceType=None,
    ):
        self.stickerIdRanges = stickerIdRanges
        self.suggestVersion = suggestVersion
        self.stickerHash = stickerHash
        self.defaultDisplayOnKeyboard = defaultDisplayOnKeyboard
        self.stickerResourceType = stickerResourceType

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.stickerIdRanges = []
                    (_etype1133, _size1130) = iprot.readListBegin()
                    for _i1134 in range(_size1130):
                        _elem1135 = StickerIdRange()
                        _elem1135.read(iprot)
                        self.stickerIdRanges.append(_elem1135)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.suggestVersion = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.stickerHash = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.defaultDisplayOnKeyboard = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.stickerResourceType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('StickerSummary')
        if self.stickerIdRanges is not None:
            oprot.writeFieldBegin('stickerIdRanges', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.stickerIdRanges))
            for iter1136 in self.stickerIdRanges:
                iter1136.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.suggestVersion is not None:
            oprot.writeFieldBegin('suggestVersion', TType.I64, 2)
            oprot.writeI64(self.suggestVersion)
            oprot.writeFieldEnd()
        if self.stickerHash is not None:
            oprot.writeFieldBegin('stickerHash', TType.STRING, 3)
            oprot.writeString(
                self.stickerHash.encode('utf-8')
                if sys.version_info[0] == 2
                else self.stickerHash
            )
            oprot.writeFieldEnd()
        if self.defaultDisplayOnKeyboard is not None:
            oprot.writeFieldBegin('defaultDisplayOnKeyboard', TType.BOOL, 4)
            oprot.writeBool(self.defaultDisplayOnKeyboard)
            oprot.writeFieldEnd()
        if self.stickerResourceType is not None:
            oprot.writeFieldBegin('stickerResourceType', TType.I32, 5)
            oprot.writeI32(self.stickerResourceType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SticonProductMapping(object):
    """
    Attributes:
     - productId
     - oldProductId
     - newToOldSticonIdMapping
     - oldPackageVersion
     - oldMetaVersion
     - stickerPackageId
     - stickerPackageVersion
     - stickerIds

    """

    def __init__(
        self,
        productId=None,
        oldProductId=None,
        newToOldSticonIdMapping=None,
        oldPackageVersion=None,
        oldMetaVersion=None,
        stickerPackageId=None,
        stickerPackageVersion=None,
        stickerIds=None,
    ):
        self.productId = productId
        self.oldProductId = oldProductId
        self.newToOldSticonIdMapping = newToOldSticonIdMapping
        self.oldPackageVersion = oldPackageVersion
        self.oldMetaVersion = oldMetaVersion
        self.stickerPackageId = stickerPackageId
        self.stickerPackageVersion = stickerPackageVersion
        self.stickerIds = stickerIds

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.productId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.oldProductId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.newToOldSticonIdMapping = {}
                    (_ktype1138, _vtype1139, _size1137) = iprot.readMapBegin()
                    for _i1141 in range(_size1137):
                        _key1142 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1143 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.newToOldSticonIdMapping[_key1142] = _val1143
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.oldPackageVersion = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.oldMetaVersion = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.stickerPackageId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.stickerPackageVersion = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.MAP:
                    self.stickerIds = {}
                    (_ktype1145, _vtype1146, _size1144) = iprot.readMapBegin()
                    for _i1148 in range(_size1144):
                        _key1149 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1150 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.stickerIds[_key1149] = _val1150
                    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('SticonProductMapping')
        if self.productId is not None:
            oprot.writeFieldBegin('productId', TType.STRING, 1)
            oprot.writeString(
                self.productId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.productId
            )
            oprot.writeFieldEnd()
        if self.oldProductId is not None:
            oprot.writeFieldBegin('oldProductId', TType.STRING, 2)
            oprot.writeString(
                self.oldProductId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.oldProductId
            )
            oprot.writeFieldEnd()
        if self.newToOldSticonIdMapping is not None:
            oprot.writeFieldBegin('newToOldSticonIdMapping', TType.MAP, 3)
            oprot.writeMapBegin(
                TType.STRING, TType.STRING, len(self.newToOldSticonIdMapping)
            )
            for kiter1151, viter1152 in self.newToOldSticonIdMapping.items():
                oprot.writeString(
                    kiter1151.encode('utf-8') if sys.version_info[0] == 2 else kiter1151
                )
                oprot.writeString(
                    viter1152.encode('utf-8') if sys.version_info[0] == 2 else viter1152
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.oldPackageVersion is not None:
            oprot.writeFieldBegin('oldPackageVersion', TType.I32, 4)
            oprot.writeI32(self.oldPackageVersion)
            oprot.writeFieldEnd()
        if self.oldMetaVersion is not None:
            oprot.writeFieldBegin('oldMetaVersion', TType.I32, 5)
            oprot.writeI32(self.oldMetaVersion)
            oprot.writeFieldEnd()
        if self.stickerPackageId is not None:
            oprot.writeFieldBegin('stickerPackageId', TType.I64, 6)
            oprot.writeI64(self.stickerPackageId)
            oprot.writeFieldEnd()
        if self.stickerPackageVersion is not None:
            oprot.writeFieldBegin('stickerPackageVersion', TType.I32, 7)
            oprot.writeI32(self.stickerPackageVersion)
            oprot.writeFieldEnd()
        if self.stickerIds is not None:
            oprot.writeFieldBegin('stickerIds', TType.MAP, 8)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.stickerIds))
            for kiter1153, viter1154 in self.stickerIds.items():
                oprot.writeString(
                    kiter1153.encode('utf-8') if sys.version_info[0] == 2 else kiter1153
                )
                oprot.writeString(
                    viter1154.encode('utf-8') if sys.version_info[0] == 2 else viter1154
                )
            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 SticonProperty(object):
    """
    Attributes:
     - sticonIds

    """

    def __init__(
        self,
        sticonIds=None,
    ):
        self.sticonIds = sticonIds

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.STRING:
                    self.sticonIds = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SticonProperty')
        if self.sticonIds is not None:
            oprot.writeFieldBegin('sticonIds', TType.STRING, 2)
            oprot.writeString(
                self.sticonIds.encode('utf-8')
                if sys.version_info[0] == 2
                else self.sticonIds
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SticonSummary(object):
    """
    Attributes:
     - suggestVersion

    """

    def __init__(
        self,
        suggestVersion=None,
    ):
        self.suggestVersion = suggestVersion

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.suggestVersion = 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('SticonSummary')
        if self.suggestVersion is not None:
            oprot.writeFieldBegin('suggestVersion', TType.I64, 1)
            oprot.writeI64(self.suggestVersion)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SuggestDictionarySetting(object):
    """
    Attributes:
     - language
     - name
     - preload
     - suggestResource
     - patch
     - suggestTagResource
     - tagPatch

    """

    def __init__(
        self,
        language=None,
        name=None,
        preload=None,
        suggestResource=None,
        patch=None,
        suggestTagResource=None,
        tagPatch=None,
    ):
        self.language = language
        self.name = name
        self.preload = preload
        self.suggestResource = suggestResource
        self.patch = patch
        self.suggestTagResource = suggestTagResource
        self.tagPatch = tagPatch

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.language = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.preload = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.suggestResource = SuggestResource()
                    self.suggestResource.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.MAP:
                    self.patch = {}
                    (_ktype1156, _vtype1157, _size1155) = iprot.readMapBegin()
                    for _i1159 in range(_size1155):
                        _key1160 = iprot.readI64()
                        _val1161 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.patch[_key1160] = _val1161
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.suggestTagResource = SuggestResource()
                    self.suggestTagResource.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.MAP:
                    self.tagPatch = {}
                    (_ktype1163, _vtype1164, _size1162) = iprot.readMapBegin()
                    for _i1166 in range(_size1162):
                        _key1167 = iprot.readI64()
                        _val1168 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.tagPatch[_key1167] = _val1168
                    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('SuggestDictionarySetting')
        if self.language is not None:
            oprot.writeFieldBegin('language', TType.STRING, 1)
            oprot.writeString(
                self.language.encode('utf-8')
                if sys.version_info[0] == 2
                else self.language
            )
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(
                self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name
            )
            oprot.writeFieldEnd()
        if self.preload is not None:
            oprot.writeFieldBegin('preload', TType.BOOL, 3)
            oprot.writeBool(self.preload)
            oprot.writeFieldEnd()
        if self.suggestResource is not None:
            oprot.writeFieldBegin('suggestResource', TType.STRUCT, 4)
            self.suggestResource.write(oprot)
            oprot.writeFieldEnd()
        if self.patch is not None:
            oprot.writeFieldBegin('patch', TType.MAP, 5)
            oprot.writeMapBegin(TType.I64, TType.STRING, len(self.patch))
            for kiter1169, viter1170 in self.patch.items():
                oprot.writeI64(kiter1169)
                oprot.writeString(
                    viter1170.encode('utf-8') if sys.version_info[0] == 2 else viter1170
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.suggestTagResource is not None:
            oprot.writeFieldBegin('suggestTagResource', TType.STRUCT, 6)
            self.suggestTagResource.write(oprot)
            oprot.writeFieldEnd()
        if self.tagPatch is not None:
            oprot.writeFieldBegin('tagPatch', TType.MAP, 7)
            oprot.writeMapBegin(TType.I64, TType.STRING, len(self.tagPatch))
            for kiter1171, viter1172 in self.tagPatch.items():
                oprot.writeI64(kiter1171)
                oprot.writeString(
                    viter1172.encode('utf-8') if sys.version_info[0] == 2 else viter1172
                )
            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 SuggestResource(object):
    """
    Attributes:
     - dataUrl
     - version
     - updatedTime

    """

    def __init__(
        self,
        dataUrl=None,
        version=None,
        updatedTime=None,
    ):
        self.dataUrl = dataUrl
        self.version = version
        self.updatedTime = updatedTime

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.dataUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.version = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.updatedTime = 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('SuggestResource')
        if self.dataUrl is not None:
            oprot.writeFieldBegin('dataUrl', TType.STRING, 1)
            oprot.writeString(
                self.dataUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.dataUrl
            )
            oprot.writeFieldEnd()
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.I64, 2)
            oprot.writeI64(self.version)
            oprot.writeFieldEnd()
        if self.updatedTime is not None:
            oprot.writeFieldBegin('updatedTime', TType.I64, 3)
            oprot.writeI64(self.updatedTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ThemeProperty(object):
    """
    Attributes:
     - thumbnailUrl
     - themeResourceType

    """

    def __init__(
        self,
        thumbnailUrl=None,
        themeResourceType=None,
    ):
        self.thumbnailUrl = thumbnailUrl
        self.themeResourceType = themeResourceType

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.thumbnailUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.themeResourceType = 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('ThemeProperty')
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 1)
            oprot.writeString(
                self.thumbnailUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.thumbnailUrl
            )
            oprot.writeFieldEnd()
        if self.themeResourceType is not None:
            oprot.writeFieldBegin('themeResourceType', TType.I32, 2)
            oprot.writeI32(self.themeResourceType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ThemeSummary(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('ThemeSummary')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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,
    ):
        self.code = code
        self.reason = reason
        self.parameterMap = parameterMap

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.reason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype1174, _vtype1175, _size1173) = iprot.readMapBegin()
                    for _i1177 in range(_size1173):
                        _key1178 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1179 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameterMap[_key1178] = _val1179
                    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('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 kiter1180, viter1181 in self.parameterMap.items():
                oprot.writeString(
                    kiter1180.encode('utf-8') if sys.version_info[0] == 2 else kiter1180
                )
                oprot.writeString(
                    viter1181.encode('utf-8') if sys.version_info[0] == 2 else viter1181
                )
            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 TalkException(TException):
    """
    Attributes:
     - code
     - reason
     - parameterMap

    """

    def __init__(
        self,
        code=None,
        reason=None,
        parameterMap=None,
    ):
        self.code = code
        self.reason = reason
        self.parameterMap = parameterMap

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.reason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype1183, _vtype1184, _size1182) = iprot.readMapBegin()
                    for _i1186 in range(_size1182):
                        _key1187 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1188 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameterMap[_key1187] = _val1188
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('TalkException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.reason is not None:
            oprot.writeFieldBegin('reason', TType.STRING, 2)
            oprot.writeString(
                self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason
            )
            oprot.writeFieldEnd()
        if self.parameterMap is not None:
            oprot.writeFieldBegin('parameterMap', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameterMap))
            for kiter1189, viter1190 in self.parameterMap.items():
                oprot.writeString(
                    kiter1189.encode('utf-8') if sys.version_info[0] == 2 else kiter1189
                )
                oprot.writeString(
                    viter1190.encode('utf-8') if sys.version_info[0] == 2 else viter1190
                )
            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 LiffException(TException):
    """
    Attributes:
     - code
     - message
     - payload

    """

    def __init__(
        self,
        code=None,
        message=None,
        payload=None,
    ):
        self.code = code
        self.message = message
        self.payload = payload

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.message = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.payload = LiffErrorPayload()
                    self.payload.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('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 BotException(TException):
    """
    Attributes:
     - errorCode
     - reason
     - parameterMap

    """

    def __init__(
        self,
        errorCode=None,
        reason=None,
        parameterMap=None,
    ):
        self.errorCode = errorCode
        self.reason = reason
        self.parameterMap = parameterMap

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.errorCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.reason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype1192, _vtype1193, _size1191) = iprot.readMapBegin()
                    for _i1195 in range(_size1191):
                        _key1196 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1197 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameterMap[_key1196] = _val1197
                    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('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 kiter1198, viter1199 in self.parameterMap.items():
                oprot.writeString(
                    kiter1198.encode('utf-8') if sys.version_info[0] == 2 else kiter1198
                )
                oprot.writeString(
                    viter1199.encode('utf-8') if sys.version_info[0] == 2 else viter1199
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ShouldSyncException(TException):
    """
    Attributes:
     - syncOpRevision
     - syncScope
     - syncReason
     - message

    """

    def __init__(
        self,
        syncOpRevision=None,
        syncScope=None,
        syncReason=None,
        message=None,
    ):
        self.syncOpRevision = syncOpRevision
        self.syncScope = syncScope
        self.syncReason = syncReason
        self.message = message

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.syncOpRevision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.syncScope = SyncScope()
                    self.syncScope.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.syncReason = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.message = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ShouldSyncException')
        if self.syncOpRevision is not None:
            oprot.writeFieldBegin('syncOpRevision', TType.I64, 1)
            oprot.writeI64(self.syncOpRevision)
            oprot.writeFieldEnd()
        if self.syncScope is not None:
            oprot.writeFieldBegin('syncScope', TType.STRUCT, 2)
            self.syncScope.write(oprot)
            oprot.writeFieldEnd()
        if self.syncReason is not None:
            oprot.writeFieldBegin('syncReason', TType.I32, 3)
            oprot.writeI32(self.syncReason)
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 4)
            oprot.writeString(
                self.message.encode('utf-8')
                if sys.version_info[0] == 2
                else self.message
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PointException(TException):
    """
    Attributes:
     - code
     - reason
     - extra

    """

    def __init__(
        self,
        code=None,
        reason=None,
        extra=None,
    ):
        self.code = code
        self.reason = reason
        self.extra = extra

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.reason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.extra = {}
                    (_ktype1201, _vtype1202, _size1200) = iprot.readMapBegin()
                    for _i1204 in range(_size1200):
                        _key1205 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1206 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.extra[_key1205] = _val1206
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('PointException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.reason is not None:
            oprot.writeFieldBegin('reason', TType.STRING, 2)
            oprot.writeString(
                self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason
            )
            oprot.writeFieldEnd()
        if self.extra is not None:
            oprot.writeFieldBegin('extra', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extra))
            for kiter1207, viter1208 in self.extra.items():
                oprot.writeString(
                    kiter1207.encode('utf-8') if sys.version_info[0] == 2 else kiter1207
                )
                oprot.writeString(
                    viter1208.encode('utf-8') if sys.version_info[0] == 2 else viter1208
                )
            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,
    ):
        self.code = code
        self.reason = reason
        self.parameterMap = parameterMap

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.reason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype1210, _vtype1211, _size1209) = iprot.readMapBegin()
                    for _i1213 in range(_size1209):
                        _key1214 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1215 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameterMap[_key1214] = _val1215
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ChannelException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.reason is not None:
            oprot.writeFieldBegin('reason', TType.STRING, 2)
            oprot.writeString(
                self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason
            )
            oprot.writeFieldEnd()
        if self.parameterMap is not None:
            oprot.writeFieldBegin('parameterMap', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameterMap))
            for kiter1216, viter1217 in self.parameterMap.items():
                oprot.writeString(
                    kiter1216.encode('utf-8') if sys.version_info[0] == 2 else kiter1216
                )
                oprot.writeString(
                    viter1217.encode('utf-8') if sys.version_info[0] == 2 else viter1217
                )
            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,
    ):
        self.errorCode = errorCode
        self.errorExtraInfo = errorExtraInfo
        self.reason = reason

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.errorCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.errorExtraInfo = ErrorExtraInfo()
                    self.errorExtraInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.reason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('SquareException')
        if self.errorCode is not None:
            oprot.writeFieldBegin('errorCode', TType.I32, 1)
            oprot.writeI32(self.errorCode)
            oprot.writeFieldEnd()
        if self.errorExtraInfo is not None:
            oprot.writeFieldBegin('errorExtraInfo', TType.STRUCT, 2)
            self.errorExtraInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.reason is not None:
            oprot.writeFieldBegin('reason', TType.STRING, 3)
            oprot.writeString(
                self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UniversalNotificationServiceException(TException):
    """
    Attributes:
     - code
     - reason
     - parameterMap

    """

    def __init__(
        self,
        code=None,
        reason=None,
        parameterMap=None,
    ):
        self.code = code
        self.reason = reason
        self.parameterMap = parameterMap

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.reason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype1219, _vtype1220, _size1218) = iprot.readMapBegin()
                    for _i1222 in range(_size1218):
                        _key1223 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1224 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameterMap[_key1223] = _val1224
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UniversalNotificationServiceException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.reason is not None:
            oprot.writeFieldBegin('reason', TType.STRING, 2)
            oprot.writeString(
                self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason
            )
            oprot.writeFieldEnd()
        if self.parameterMap is not None:
            oprot.writeFieldBegin('parameterMap', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameterMap))
            for kiter1225, viter1226 in self.parameterMap.items():
                oprot.writeString(
                    kiter1225.encode('utf-8') if sys.version_info[0] == 2 else kiter1225
                )
                oprot.writeString(
                    viter1226.encode('utf-8') if sys.version_info[0] == 2 else viter1226
                )
            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,
    ):
        self.code = code
        self.reason = reason
        self.parameterMap = parameterMap

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.reason = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype1228, _vtype1229, _size1227) = iprot.readMapBegin()
                    for _i1231 in range(_size1227):
                        _key1232 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1233 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameterMap[_key1232] = _val1233
                    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('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 kiter1234, viter1235 in self.parameterMap.items():
                oprot.writeString(
                    kiter1234.encode('utf-8') if sys.version_info[0] == 2 else kiter1234
                )
                oprot.writeString(
                    viter1235.encode('utf-8') if sys.version_info[0] == 2 else viter1235
                )
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateBuddyProfileResult(object):
    """
    Attributes:
     - requestId
     - state
     - eventNo
     - receiverCount
     - successCount
     - failCount
     - cancelCount
     - unregisterCount
     - timestamp
     - message

    """

    def __init__(
        self,
        requestId=None,
        state=None,
        eventNo=None,
        receiverCount=None,
        successCount=None,
        failCount=None,
        cancelCount=None,
        unregisterCount=None,
        timestamp=None,
        message=None,
    ):
        self.requestId = requestId
        self.state = state
        self.eventNo = eventNo
        self.receiverCount = receiverCount
        self.successCount = successCount
        self.failCount = failCount
        self.cancelCount = cancelCount
        self.unregisterCount = unregisterCount
        self.timestamp = timestamp
        self.message = message

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.requestId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.eventNo = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.receiverCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I64:
                    self.successCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I64:
                    self.failCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.I64:
                    self.cancelCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I64:
                    self.unregisterCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.I64:
                    self.timestamp = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.STRING:
                    self.message = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UpdateBuddyProfileResult')
        if self.requestId is not None:
            oprot.writeFieldBegin('requestId', TType.STRING, 1)
            oprot.writeString(
                self.requestId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.requestId
            )
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 2)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.eventNo is not None:
            oprot.writeFieldBegin('eventNo', TType.I32, 3)
            oprot.writeI32(self.eventNo)
            oprot.writeFieldEnd()
        if self.receiverCount is not None:
            oprot.writeFieldBegin('receiverCount', TType.I64, 11)
            oprot.writeI64(self.receiverCount)
            oprot.writeFieldEnd()
        if self.successCount is not None:
            oprot.writeFieldBegin('successCount', TType.I64, 12)
            oprot.writeI64(self.successCount)
            oprot.writeFieldEnd()
        if self.failCount is not None:
            oprot.writeFieldBegin('failCount', TType.I64, 13)
            oprot.writeI64(self.failCount)
            oprot.writeFieldEnd()
        if self.cancelCount is not None:
            oprot.writeFieldBegin('cancelCount', TType.I64, 14)
            oprot.writeI64(self.cancelCount)
            oprot.writeFieldEnd()
        if self.unregisterCount is not None:
            oprot.writeFieldBegin('unregisterCount', TType.I64, 15)
            oprot.writeI64(self.unregisterCount)
            oprot.writeFieldEnd()
        if self.timestamp is not None:
            oprot.writeFieldBegin('timestamp', TType.I64, 21)
            oprot.writeI64(self.timestamp)
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 22)
            oprot.writeString(
                self.message.encode('utf-8')
                if sys.version_info[0] == 2
                else self.message
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UserAuthStatus(object):
    """
    Attributes:
     - phoneNumberRegistered
     - registeredSnsIdTypes

    """

    def __init__(
        self,
        phoneNumberRegistered=None,
        registeredSnsIdTypes=None,
    ):
        self.phoneNumberRegistered = phoneNumberRegistered
        self.registeredSnsIdTypes = registeredSnsIdTypes

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.phoneNumberRegistered = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.registeredSnsIdTypes = []
                    (_etype1239, _size1236) = iprot.readListBegin()
                    for _i1240 in range(_size1236):
                        _elem1241 = iprot.readI32()
                        self.registeredSnsIdTypes.append(_elem1241)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UserAuthStatus')
        if self.phoneNumberRegistered is not None:
            oprot.writeFieldBegin('phoneNumberRegistered', TType.BOOL, 1)
            oprot.writeBool(self.phoneNumberRegistered)
            oprot.writeFieldEnd()
        if self.registeredSnsIdTypes is not None:
            oprot.writeFieldBegin('registeredSnsIdTypes', TType.LIST, 2)
            oprot.writeListBegin(TType.I32, len(self.registeredSnsIdTypes))
            for iter1242 in self.registeredSnsIdTypes:
                oprot.writeI32(iter1242)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class WapInvitation(object):
    """
    Attributes:
     - type
     - inviteeEmail
     - inviterMid
     - roomMid

    """

    def __init__(
        self,
        type=None,
        inviteeEmail=None,
        inviterMid=None,
        roomMid=None,
    ):
        self.type = type
        self.inviteeEmail = inviteeEmail
        self.inviterMid = inviterMid
        self.roomMid = roomMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.inviteeEmail = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.inviterMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.roomMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('WapInvitation')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.inviteeEmail is not None:
            oprot.writeFieldBegin('inviteeEmail', TType.STRING, 10)
            oprot.writeString(
                self.inviteeEmail.encode('utf-8')
                if sys.version_info[0] == 2
                else self.inviteeEmail
            )
            oprot.writeFieldEnd()
        if self.inviterMid is not None:
            oprot.writeFieldBegin('inviterMid', TType.STRING, 11)
            oprot.writeString(
                self.inviterMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.inviterMid
            )
            oprot.writeFieldEnd()
        if self.roomMid is not None:
            oprot.writeFieldBegin('roomMid', TType.STRING, 12)
            oprot.writeString(
                self.roomMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.roomMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GroupCall(object):
    """
    Attributes:
     - online
     - chatMid
     - hostMids
     - memberMids
     - started
     - mediaType

    """

    def __init__(
        self,
        online=None,
        chatMid=None,
        hostMids=None,
        memberMids=None,
        started=None,
        mediaType=None,
    ):
        self.online = online
        self.chatMid = chatMid
        self.hostMids = hostMids
        self.memberMids = memberMids
        self.started = started
        self.mediaType = mediaType

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.online = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.chatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.hostMids = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.memberMids = []
                    (_etype1246, _size1243) = iprot.readListBegin()
                    for _i1247 in range(_size1243):
                        _elem1248 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.memberMids.append(_elem1248)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.started = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.mediaType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GroupCall')
        if self.online is not None:
            oprot.writeFieldBegin('online', TType.BOOL, 1)
            oprot.writeBool(self.online)
            oprot.writeFieldEnd()
        if self.chatMid is not None:
            oprot.writeFieldBegin('chatMid', TType.STRING, 2)
            oprot.writeString(
                self.chatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.chatMid
            )
            oprot.writeFieldEnd()
        if self.hostMids is not None:
            oprot.writeFieldBegin('hostMids', TType.STRING, 3)
            oprot.writeString(
                self.hostMids.encode('utf-8')
                if sys.version_info[0] == 2
                else self.hostMids
            )
            oprot.writeFieldEnd()
        if self.memberMids is not None:
            oprot.writeFieldBegin('memberMids', TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.memberMids))
            for iter1249 in self.memberMids:
                oprot.writeString(
                    iter1249.encode('utf-8') if sys.version_info[0] == 2 else iter1249
                )
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.started is not None:
            oprot.writeFieldBegin('started', TType.I64, 5)
            oprot.writeI64(self.started)
            oprot.writeFieldEnd()
        if self.mediaType is not None:
            oprot.writeFieldBegin('mediaType', TType.I32, 6)
            oprot.writeI32(self.mediaType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GroupCallRoute(object):
    """
    Attributes:
     - token
     - cscf
     - mix

    """

    def __init__(
        self,
        token=None,
        cscf=None,
        mix=None,
    ):
        self.token = token
        self.cscf = cscf
        self.mix = mix

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.token = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.cscf = CallHost()
                    self.cscf.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.mix = CallHost()
                    self.mix.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GroupCallRoute')
        if self.token is not None:
            oprot.writeFieldBegin('token', TType.STRING, 1)
            oprot.writeString(
                self.token.encode('utf-8') if sys.version_info[0] == 2 else self.token
            )
            oprot.writeFieldEnd()
        if self.cscf is not None:
            oprot.writeFieldBegin('cscf', TType.STRUCT, 2)
            self.cscf.write(oprot)
            oprot.writeFieldEnd()
        if self.mix is not None:
            oprot.writeFieldBegin('mix', TType.STRUCT, 3)
            self.mix.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class LiffChatContext(object):
    """
    Attributes:
     - chatMid

    """

    def __init__(
        self,
        chatMid=None,
    ):
        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.STRING:
                    self.chatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LiffChatContext')
        if self.chatMid is not None:
            oprot.writeFieldBegin('chatMid', TType.STRING, 1)
            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 LiffContext(object):
    """
    Attributes:
     - none
     - chat
     - squareChat

    """

    def __init__(
        self,
        none=None,
        chat=None,
        squareChat=None,
    ):
        self.none = none
        self.chat = chat
        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.none = LiffNoneContext()
                    self.none.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.chat = LiffChatContext()
                    self.chat.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.squareChat = LiffSquareChatContext()
                    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('LiffContext')
        if self.none is not None:
            oprot.writeFieldBegin('none', TType.STRUCT, 1)
            self.none.write(oprot)
            oprot.writeFieldEnd()
        if self.chat is not None:
            oprot.writeFieldBegin('chat', TType.STRUCT, 2)
            self.chat.write(oprot)
            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 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')
                        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')
                        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 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 LiffNoneContext(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('LiffNoneContext')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class LiffSquareChatContext(object):
    """
    Attributes:
     - squareChatMid

    """

    def __init__(
        self,
        squareChatMid=None,
    ):
        self.squareChatMid = squareChatMid

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.squareChatMid = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LiffSquareChatContext')
        if self.squareChatMid is not None:
            oprot.writeFieldBegin('squareChatMid', TType.STRING, 1)
            oprot.writeString(
                self.squareChatMid.encode('utf-8')
                if sys.version_info[0] == 2
                else self.squareChatMid
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class LiffView(object):
    """
    Attributes:
     - type
     - url
     - trustedDomain
     - titleIconUrl
     - titleTextColor
     - titleSubtextColor
     - titleButtonColor
     - titleBackgroundColor
     - progressBarColor
     - progressBackgroundColor

    """

    def __init__(
        self,
        type=None,
        url=None,
        trustedDomain=None,
        titleIconUrl=None,
        titleTextColor=None,
        titleSubtextColor=None,
        titleButtonColor=None,
        titleBackgroundColor=None,
        progressBarColor=None,
        progressBackgroundColor=None,
    ):
        self.type = type
        self.url = url
        self.trustedDomain = trustedDomain
        self.titleIconUrl = titleIconUrl
        self.titleTextColor = titleTextColor
        self.titleSubtextColor = titleSubtextColor
        self.titleButtonColor = titleButtonColor
        self.titleBackgroundColor = titleBackgroundColor
        self.progressBarColor = progressBarColor
        self.progressBackgroundColor = progressBackgroundColor

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.type = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.url = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.BOOL:
                    self.trustedDomain = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.titleIconUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.titleTextColor = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.titleSubtextColor = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.titleButtonColor = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.titleBackgroundColor = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I32:
                    self.progressBarColor = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I32:
                    self.progressBackgroundColor = 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('LiffView')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.STRING, 1)
            oprot.writeString(
                self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type
            )
            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()
        if self.titleTextColor is not None:
            oprot.writeFieldBegin('titleTextColor', TType.I32, 4)
            oprot.writeI32(self.titleTextColor)
            oprot.writeFieldEnd()
        if self.titleBackgroundColor is not None:
            oprot.writeFieldBegin('titleBackgroundColor', TType.I32, 5)
            oprot.writeI32(self.titleBackgroundColor)
            oprot.writeFieldEnd()
        if self.titleIconUrl is not None:
            oprot.writeFieldBegin('titleIconUrl', TType.STRING, 6)
            oprot.writeString(
                self.titleIconUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.titleIconUrl
            )
            oprot.writeFieldEnd()
        if self.titleSubtextColor is not None:
            oprot.writeFieldBegin('titleSubtextColor', TType.I32, 7)
            oprot.writeI32(self.titleSubtextColor)
            oprot.writeFieldEnd()
        if self.titleButtonColor is not None:
            oprot.writeFieldBegin('titleButtonColor', TType.I32, 8)
            oprot.writeI32(self.titleButtonColor)
            oprot.writeFieldEnd()
        if self.progressBarColor is not None:
            oprot.writeFieldBegin('progressBarColor', TType.I32, 9)
            oprot.writeI32(self.progressBarColor)
            oprot.writeFieldEnd()
        if self.progressBackgroundColor is not None:
            oprot.writeFieldBegin('progressBackgroundColor', TType.I32, 10)
            oprot.writeI32(self.progressBackgroundColor)
            oprot.writeFieldEnd()
        if self.trustedDomain is not None:
            oprot.writeFieldBegin('trustedDomain', TType.BOOL, 11)
            oprot.writeBool(self.trustedDomain)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class LiffViewRequest(object):
    """
    Attributes:
     - liffId
     - context

    """

    def __init__(
        self,
        liffId=None,
        context=None,
    ):
        self.liffId = liffId
        self.context = context

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.liffId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.context = LiffContext()
                    self.context.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('LiffViewRequest')
        if self.liffId is not None:
            oprot.writeFieldBegin('liffId', TType.STRING, 1)
            oprot.writeString(
                self.liffId.encode('utf-8') if sys.version_info[0] == 2 else self.liffId
            )
            oprot.writeFieldEnd()
        if self.context is not None:
            oprot.writeFieldBegin('context', TType.STRUCT, 2)
            self.context.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 LiffViewResponse(object):
    """
    Attributes:
     - view
     - contextToken
     - accessToken
     - featureToken
     - features
     - channelId

    """

    def __init__(
        self,
        view=None,
        contextToken=None,
        accessToken=None,
        featureToken=None,
        features=None,
        channelId=None,
    ):
        self.view = view
        self.contextToken = contextToken
        self.accessToken = accessToken
        self.featureToken = featureToken
        self.features = features
        self.channelId = channelId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.view = LiffView()
                    self.view.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.contextToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.accessToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.featureToken = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.features = []
                    (_etype1253, _size1250) = iprot.readListBegin()
                    for _i1254 in range(_size1250):
                        _elem1255 = iprot.readI32()
                        self.features.append(_elem1255)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.channelId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('LiffViewResponse')
        if self.view is not None:
            oprot.writeFieldBegin('view', TType.STRUCT, 1)
            self.view.write(oprot)
            oprot.writeFieldEnd()
        if self.contextToken is not None:
            oprot.writeFieldBegin('contextToken', TType.STRING, 2)
            oprot.writeString(
                self.contextToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.contextToken
            )
            oprot.writeFieldEnd()
        if self.accessToken is not None:
            oprot.writeFieldBegin('accessToken', TType.STRING, 3)
            oprot.writeString(
                self.accessToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.accessToken
            )
            oprot.writeFieldEnd()
        if self.featureToken is not None:
            oprot.writeFieldBegin('featureToken', TType.STRING, 4)
            oprot.writeString(
                self.featureToken.encode('utf-8')
                if sys.version_info[0] == 2
                else self.featureToken
            )
            oprot.writeFieldEnd()
        if self.features is not None:
            oprot.writeFieldBegin('features', TType.LIST, 5)
            oprot.writeListBegin(TType.I32, len(self.features))
            for iter1256 in self.features:
                oprot.writeI32(iter1256)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.channelId is not None:
            oprot.writeFieldBegin('channelId', TType.STRING, 6)
            oprot.writeString(
                self.channelId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.channelId
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Admission(object):
    """
    Attributes:
     - admissionTime

    """

    def __init__(
        self,
        admissionTime=None,
    ):
        self.admissionTime = admissionTime

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.admissionTime = 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('Admission')
        if self.admissionTime is not None:
            oprot.writeFieldBegin('admissionTime', TType.I64, 1)
            oprot.writeI64(self.admissionTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetReservationRequest(object):
    """
    Attributes:
     - reservationNumber

    """

    def __init__(
        self,
        reservationNumber=None,
    ):
        self.reservationNumber = reservationNumber

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.reservationNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('GetReservationRequest')
        if self.reservationNumber is not None:
            oprot.writeFieldBegin('reservationNumber', TType.STRING, 1)
            oprot.writeString(
                self.reservationNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.reservationNumber
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetReservationResponse(object):
    """
    Attributes:
     - reservation

    """

    def __init__(
        self,
        reservation=None,
    ):
        self.reservation = reservation

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.reservation = Reservation()
                    self.reservation.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('GetReservationResponse')
        if self.reservation is not None:
            oprot.writeFieldBegin('reservation', TType.STRUCT, 1)
            self.reservation.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 GetReservationsRequest(object):
    """
    Attributes:
     - lastFetchTimeStamp

    """

    def __init__(
        self,
        lastFetchTimeStamp=None,
    ):
        self.lastFetchTimeStamp = lastFetchTimeStamp

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.lastFetchTimeStamp = 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('GetReservationsRequest')
        if self.lastFetchTimeStamp is not None:
            oprot.writeFieldBegin('lastFetchTimeStamp', TType.I64, 1)
            oprot.writeI64(self.lastFetchTimeStamp)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetReservationsResponse(object):
    """
    Attributes:
     - reservations

    """

    def __init__(
        self,
        reservations=None,
    ):
        self.reservations = reservations

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.reservations = []
                    (_etype1260, _size1257) = iprot.readListBegin()
                    for _i1261 in range(_size1257):
                        _elem1262 = Reservation()
                        _elem1262.read(iprot)
                        self.reservations.append(_elem1262)
                    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('GetReservationsResponse')
        if self.reservations is not None:
            oprot.writeFieldBegin('reservations', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.reservations))
            for iter1263 in self.reservations:
                iter1263.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 NotifyEnteringRequest(object):
    """
    Attributes:
     - ticketIds

    """

    def __init__(
        self,
        ticketIds=None,
    ):
        self.ticketIds = ticketIds

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.ticketIds = []
                    (_etype1267, _size1264) = iprot.readListBegin()
                    for _i1268 in range(_size1264):
                        _elem1269 = (
                            iprot.readString().decode('utf-8')
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.ticketIds.append(_elem1269)
                    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('NotifyEnteringRequest')
        if self.ticketIds is not None:
            oprot.writeFieldBegin('ticketIds', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.ticketIds))
            for iter1270 in self.ticketIds:
                oprot.writeString(
                    iter1270.encode('utf-8') if sys.version_info[0] == 2 else iter1270
                )
            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 NotifyEnteringResponse(object):
    """
    Attributes:
     - admissionTime

    """

    def __init__(
        self,
        admissionTime=None,
    ):
        self.admissionTime = admissionTime

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.admissionTime = 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('NotifyEnteringResponse')
        if self.admissionTime is not None:
            oprot.writeFieldBegin('admissionTime', TType.I64, 1)
            oprot.writeI64(self.admissionTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Reservation(object):
    """
    Attributes:
     - reservationNumber
     - offlineEnabled
     - eventTitle
     - eventVenue
     - artistName
     - eventImgUrl
     - startDate
     - startTime
     - doorTime
     - enableDoorTime
     - validLimitTime
     - deletableTime
     - entryCheckMethod
     - eventDesc
     - commEventDesc
     - uiInfo
     - tickets
     - admission

    """

    def __init__(
        self,
        reservationNumber=None,
        offlineEnabled=None,
        eventTitle=None,
        eventVenue=None,
        artistName=None,
        eventImgUrl=None,
        startDate=None,
        startTime=None,
        doorTime=None,
        enableDoorTime=None,
        validLimitTime=None,
        deletableTime=None,
        entryCheckMethod=None,
        eventDesc=None,
        commEventDesc=None,
        uiInfo=None,
        tickets=None,
        admission=None,
    ):
        self.reservationNumber = reservationNumber
        self.offlineEnabled = offlineEnabled
        self.eventTitle = eventTitle
        self.eventVenue = eventVenue
        self.artistName = artistName
        self.eventImgUrl = eventImgUrl
        self.startDate = startDate
        self.startTime = startTime
        self.doorTime = doorTime
        self.enableDoorTime = enableDoorTime
        self.validLimitTime = validLimitTime
        self.deletableTime = deletableTime
        self.entryCheckMethod = entryCheckMethod
        self.eventDesc = eventDesc
        self.commEventDesc = commEventDesc
        self.uiInfo = uiInfo
        self.tickets = tickets
        self.admission = admission

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.reservationNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.offlineEnabled = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.eventTitle = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.eventVenue = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.artistName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.eventImgUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.startDate = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I64:
                    self.startTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I64:
                    self.doorTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I64:
                    self.enableDoorTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.validLimitTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I64:
                    self.deletableTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I32:
                    self.entryCheckMethod = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRING:
                    self.eventDesc = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.STRING:
                    self.commEventDesc = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.STRUCT:
                    self.uiInfo = UIInfo()
                    self.uiInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.LIST:
                    self.tickets = []
                    (_etype1274, _size1271) = iprot.readListBegin()
                    for _i1275 in range(_size1271):
                        _elem1276 = Tickets()
                        _elem1276.read(iprot)
                        self.tickets.append(_elem1276)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 18:
                if ftype == TType.STRUCT:
                    self.admission = Admission()
                    self.admission.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('Reservation')
        if self.reservationNumber is not None:
            oprot.writeFieldBegin('reservationNumber', TType.STRING, 1)
            oprot.writeString(
                self.reservationNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.reservationNumber
            )
            oprot.writeFieldEnd()
        if self.offlineEnabled is not None:
            oprot.writeFieldBegin('offlineEnabled', TType.I32, 2)
            oprot.writeI32(self.offlineEnabled)
            oprot.writeFieldEnd()
        if self.eventTitle is not None:
            oprot.writeFieldBegin('eventTitle', TType.STRING, 3)
            oprot.writeString(
                self.eventTitle.encode('utf-8')
                if sys.version_info[0] == 2
                else self.eventTitle
            )
            oprot.writeFieldEnd()
        if self.eventVenue is not None:
            oprot.writeFieldBegin('eventVenue', TType.STRING, 4)
            oprot.writeString(
                self.eventVenue.encode('utf-8')
                if sys.version_info[0] == 2
                else self.eventVenue
            )
            oprot.writeFieldEnd()
        if self.artistName is not None:
            oprot.writeFieldBegin('artistName', TType.STRING, 5)
            oprot.writeString(
                self.artistName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.artistName
            )
            oprot.writeFieldEnd()
        if self.eventImgUrl is not None:
            oprot.writeFieldBegin('eventImgUrl', TType.STRING, 6)
            oprot.writeString(
                self.eventImgUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.eventImgUrl
            )
            oprot.writeFieldEnd()
        if self.startDate is not None:
            oprot.writeFieldBegin('startDate', TType.I64, 7)
            oprot.writeI64(self.startDate)
            oprot.writeFieldEnd()
        if self.startTime is not None:
            oprot.writeFieldBegin('startTime', TType.I64, 8)
            oprot.writeI64(self.startTime)
            oprot.writeFieldEnd()
        if self.doorTime is not None:
            oprot.writeFieldBegin('doorTime', TType.I64, 9)
            oprot.writeI64(self.doorTime)
            oprot.writeFieldEnd()
        if self.enableDoorTime is not None:
            oprot.writeFieldBegin('enableDoorTime', TType.I64, 10)
            oprot.writeI64(self.enableDoorTime)
            oprot.writeFieldEnd()
        if self.validLimitTime is not None:
            oprot.writeFieldBegin('validLimitTime', TType.I64, 11)
            oprot.writeI64(self.validLimitTime)
            oprot.writeFieldEnd()
        if self.deletableTime is not None:
            oprot.writeFieldBegin('deletableTime', TType.I64, 12)
            oprot.writeI64(self.deletableTime)
            oprot.writeFieldEnd()
        if self.entryCheckMethod is not None:
            oprot.writeFieldBegin('entryCheckMethod', TType.I32, 13)
            oprot.writeI32(self.entryCheckMethod)
            oprot.writeFieldEnd()
        if self.eventDesc is not None:
            oprot.writeFieldBegin('eventDesc', TType.STRING, 14)
            oprot.writeString(
                self.eventDesc.encode('utf-8')
                if sys.version_info[0] == 2
                else self.eventDesc
            )
            oprot.writeFieldEnd()
        if self.commEventDesc is not None:
            oprot.writeFieldBegin('commEventDesc', TType.STRING, 15)
            oprot.writeString(
                self.commEventDesc.encode('utf-8')
                if sys.version_info[0] == 2
                else self.commEventDesc
            )
            oprot.writeFieldEnd()
        if self.uiInfo is not None:
            oprot.writeFieldBegin('uiInfo', TType.STRUCT, 16)
            self.uiInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.tickets is not None:
            oprot.writeFieldBegin('tickets', TType.LIST, 17)
            oprot.writeListBegin(TType.STRUCT, len(self.tickets))
            for iter1277 in self.tickets:
                iter1277.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.admission is not None:
            oprot.writeFieldBegin('admission', TType.STRUCT, 18)
            self.admission.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 ReturnTicketRequest(object):
    """
    Attributes:
     - reservationNumber

    """

    def __init__(
        self,
        reservationNumber=None,
    ):
        self.reservationNumber = reservationNumber

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.reservationNumber = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('ReturnTicketRequest')
        if self.reservationNumber is not None:
            oprot.writeFieldBegin('reservationNumber', TType.STRING, 1)
            oprot.writeString(
                self.reservationNumber.encode('utf-8')
                if sys.version_info[0] == 2
                else self.reservationNumber
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReturnTicketResponse(object):
    """
    Attributes:
     - returnTicketTime

    """

    def __init__(
        self,
        returnTicketTime=None,
    ):
        self.returnTicketTime = returnTicketTime

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.returnTicketTime = 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('ReturnTicketResponse')
        if self.returnTicketTime is not None:
            oprot.writeFieldBegin('returnTicketTime', TType.I64, 1)
            oprot.writeI64(self.returnTicketTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Tickets(object):
    """
    Attributes:
     - ticketId
     - displayOrder
     - ownerName
     - ticketClass
     - seatClass
     - seatInfoPrimary
     - seatInfoSecondary
     - fcId
     - priceString
     - ticketDesc
     - qrCodeId
     - qrCodeValue
     - qrCodeType
     - facePhotoUrl
     - uiInfo

    """

    def __init__(
        self,
        ticketId=None,
        displayOrder=None,
        ownerName=None,
        ticketClass=None,
        seatClass=None,
        seatInfoPrimary=None,
        seatInfoSecondary=None,
        fcId=None,
        priceString=None,
        ticketDesc=None,
        qrCodeId=None,
        qrCodeValue=None,
        qrCodeType=None,
        facePhotoUrl=None,
        uiInfo=None,
    ):
        self.ticketId = ticketId
        self.displayOrder = displayOrder
        self.ownerName = ownerName
        self.ticketClass = ticketClass
        self.seatClass = seatClass
        self.seatInfoPrimary = seatInfoPrimary
        self.seatInfoSecondary = seatInfoSecondary
        self.fcId = fcId
        self.priceString = priceString
        self.ticketDesc = ticketDesc
        self.qrCodeId = qrCodeId
        self.qrCodeValue = qrCodeValue
        self.qrCodeType = qrCodeType
        self.facePhotoUrl = facePhotoUrl
        self.uiInfo = uiInfo

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_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')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.displayOrder = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.ownerName = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.ticketClass = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.seatClass = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.seatInfoPrimary = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.seatInfoSecondary = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.fcId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.priceString = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.ticketDesc = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.qrCodeId = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.qrCodeValue = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRING:
                    self.qrCodeType = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRING:
                    self.facePhotoUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.STRUCT:
                    self.uiInfo = UIInfo()
                    self.uiInfo.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('Tickets')
        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()
        if self.displayOrder is not None:
            oprot.writeFieldBegin('displayOrder', TType.I32, 2)
            oprot.writeI32(self.displayOrder)
            oprot.writeFieldEnd()
        if self.ownerName is not None:
            oprot.writeFieldBegin('ownerName', TType.STRING, 3)
            oprot.writeString(
                self.ownerName.encode('utf-8')
                if sys.version_info[0] == 2
                else self.ownerName
            )
            oprot.writeFieldEnd()
        if self.ticketClass is not None:
            oprot.writeFieldBegin('ticketClass', TType.STRING, 4)
            oprot.writeString(
                self.ticketClass.encode('utf-8')
                if sys.version_info[0] == 2
                else self.ticketClass
            )
            oprot.writeFieldEnd()
        if self.seatClass is not None:
            oprot.writeFieldBegin('seatClass', TType.STRING, 5)
            oprot.writeString(
                self.seatClass.encode('utf-8')
                if sys.version_info[0] == 2
                else self.seatClass
            )
            oprot.writeFieldEnd()
        if self.seatInfoPrimary is not None:
            oprot.writeFieldBegin('seatInfoPrimary', TType.STRING, 6)
            oprot.writeString(
                self.seatInfoPrimary.encode('utf-8')
                if sys.version_info[0] == 2
                else self.seatInfoPrimary
            )
            oprot.writeFieldEnd()
        if self.seatInfoSecondary is not None:
            oprot.writeFieldBegin('seatInfoSecondary', TType.STRING, 7)
            oprot.writeString(
                self.seatInfoSecondary.encode('utf-8')
                if sys.version_info[0] == 2
                else self.seatInfoSecondary
            )
            oprot.writeFieldEnd()
        if self.fcId is not None:
            oprot.writeFieldBegin('fcId', TType.STRING, 8)
            oprot.writeString(
                self.fcId.encode('utf-8') if sys.version_info[0] == 2 else self.fcId
            )
            oprot.writeFieldEnd()
        if self.priceString is not None:
            oprot.writeFieldBegin('priceString', TType.STRING, 9)
            oprot.writeString(
                self.priceString.encode('utf-8')
                if sys.version_info[0] == 2
                else self.priceString
            )
            oprot.writeFieldEnd()
        if self.ticketDesc is not None:
            oprot.writeFieldBegin('ticketDesc', TType.STRING, 10)
            oprot.writeString(
                self.ticketDesc.encode('utf-8')
                if sys.version_info[0] == 2
                else self.ticketDesc
            )
            oprot.writeFieldEnd()
        if self.qrCodeId is not None:
            oprot.writeFieldBegin('qrCodeId', TType.STRING, 11)
            oprot.writeString(
                self.qrCodeId.encode('utf-8')
                if sys.version_info[0] == 2
                else self.qrCodeId
            )
            oprot.writeFieldEnd()
        if self.qrCodeValue is not None:
            oprot.writeFieldBegin('qrCodeValue', TType.STRING, 12)
            oprot.writeString(
                self.qrCodeValue.encode('utf-8')
                if sys.version_info[0] == 2
                else self.qrCodeValue
            )
            oprot.writeFieldEnd()
        if self.qrCodeType is not None:
            oprot.writeFieldBegin('qrCodeType', TType.STRING, 13)
            oprot.writeString(
                self.qrCodeType.encode('utf-8')
                if sys.version_info[0] == 2
                else self.qrCodeType
            )
            oprot.writeFieldEnd()
        if self.facePhotoUrl is not None:
            oprot.writeFieldBegin('facePhotoUrl', TType.STRING, 14)
            oprot.writeString(
                self.facePhotoUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.facePhotoUrl
            )
            oprot.writeFieldEnd()
        if self.uiInfo is not None:
            oprot.writeFieldBegin('uiInfo', TType.STRUCT, 15)
            self.uiInfo.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 UIInfo(object):
    """
    Attributes:
     - uiFormat
     - schemeVersion
     - bgColor
     - fgColor
     - bgImgUrl
     - fgImgUrl
     - extData

    """

    def __init__(
        self,
        uiFormat=None,
        schemeVersion=None,
        bgColor=None,
        fgColor=None,
        bgImgUrl=None,
        fgImgUrl=None,
        extData=None,
    ):
        self.uiFormat = uiFormat
        self.schemeVersion = schemeVersion
        self.bgColor = bgColor
        self.fgColor = fgColor
        self.bgImgUrl = bgImgUrl
        self.fgImgUrl = fgImgUrl
        self.extData = extData

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.uiFormat = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.schemeVersion = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.bgColor = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.fgColor = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.bgImgUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.fgImgUrl = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.extData = (
                        iprot.readString().decode('utf-8')
                        if sys.version_info[0] == 2
                        else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(
                oprot._fast_encode(self, [self.__class__, self.thrift_spec])
            )
            return
        oprot.writeStructBegin('UIInfo')
        if self.uiFormat is not None:
            oprot.writeFieldBegin('uiFormat', TType.STRING, 1)
            oprot.writeString(
                self.uiFormat.encode('utf-8')
                if sys.version_info[0] == 2
                else self.uiFormat
            )
            oprot.writeFieldEnd()
        if self.schemeVersion is not None:
            oprot.writeFieldBegin('schemeVersion', TType.I32, 2)
            oprot.writeI32(self.schemeVersion)
            oprot.writeFieldEnd()
        if self.bgColor is not None:
            oprot.writeFieldBegin('bgColor', TType.STRING, 3)
            oprot.writeString(
                self.bgColor.encode('utf-8')
                if sys.version_info[0] == 2
                else self.bgColor
            )
            oprot.writeFieldEnd()
        if self.fgColor is not None:
            oprot.writeFieldBegin('fgColor', TType.STRING, 4)
            oprot.writeString(
                self.fgColor.encode('utf-8')
                if sys.version_info[0] == 2
                else self.fgColor
            )
            oprot.writeFieldEnd()
        if self.bgImgUrl is not None:
            oprot.writeFieldBegin('bgImgUrl', TType.STRING, 5)
            oprot.writeString(
                self.bgImgUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.bgImgUrl
            )
            oprot.writeFieldEnd()
        if self.fgImgUrl is not None:
            oprot.writeFieldBegin('fgImgUrl', TType.STRING, 6)
            oprot.writeString(
                self.fgImgUrl.encode('utf-8')
                if sys.version_info[0] == 2
                else self.fgImgUrl
            )
            oprot.writeFieldEnd()
        if self.extData is not None:
            oprot.writeFieldBegin('extData', TType.STRING, 7)
            oprot.writeString(
                self.extData.encode('utf-8')
                if sys.version_info[0] == 2
                else self.extData
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSquareBotResponse(object):
    """
    Attributes:
     - squareBot

    """

    def __init__(
        self,
        squareBot=None,
    ):
        self.squareBot = squareBot

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, [self.__class__, 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.squareBot = SquareBot()
                    self.squareBot.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('GetSquareBotResponse')
        if self.squareBot is not None:
            oprot.writeFieldBegin('squareBot', TType.STRUCT, 1)
            self.squareBot.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)


all_structs.append(GetSquareBotRequest)
GetSquareBotRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'botMid',
        'UTF8',
        None,
    ),  # 1
)
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
)
all_structs.append(RevokeTokenRequest)
RevokeTokenRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'accessToken',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(SquareBot)
SquareBot.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'botMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'active',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'displayName',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'profileImageObsHash',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'iconType',
        None,
        None,
    ),  # 5
    (
        6,
        TType.I64,
        'lastModifiedAt',
        None,
        None,
    ),  # 6
    (
        7,
        TType.I64,
        'expiredIn',
        None,
        None,
    ),  # 7
)
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(SendPostbackRequest)
SendPostbackRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'messageId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'ImagesContractUrl',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'chatMID',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'originMID',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(MessageCommitResult)
MessageCommitResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'requestId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'state',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'messageStoreRequestId',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        'messageIds',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.I64,
        'receiverCount',
        None,
        None,
    ),  # 11
    (
        12,
        TType.I64,
        'successCount',
        None,
        None,
    ),  # 12
    (
        13,
        TType.I64,
        'failCount',
        None,
        None,
    ),  # 13
    (
        14,
        TType.I64,
        'blockCount',
        None,
        None,
    ),  # 14
    (
        15,
        TType.I64,
        'unregisteredCount',
        None,
        None,
    ),  # 15
    (
        16,
        TType.I64,
        'unrelatedCount',
        None,
        None,
    ),  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    (
        21,
        TType.STRING,
        'errorDescription',
        'UTF8',
        None,
    ),  # 21
)
all_structs.append(CallHost)
CallHost.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'host',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'port',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'zone',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(AgeCheckDocomoResult)
AgeCheckDocomoResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'authUrl',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'userAgeType',
        None,
        None,
    ),  # 2
)
all_structs.append(AgeCheckRequestResult)
AgeCheckRequestResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'authUrl',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'sessionId',
        'UTF8',
        None,
    ),  # 2
)
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
)
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
)
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(DestroyMessagesRequest)
DestroyMessagesRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
    None,  # 3
    (
        4,
        TType.SET,
        'messageIds',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 4
)
all_structs.append(FindSquareByEmidRequest)
FindSquareByEmidRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'emid',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(FindSquareByEmidResponse)
FindSquareByEmidResponse.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(DestroyMessagesResponse)
DestroyMessagesResponse.thrift_spec = ()
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(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(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(SquareChatAnnouncementContents)
SquareChatAnnouncementContents.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'textMessageAnnouncementContents',
        [TextMessageAnnouncementContents, None],
        None,
    ),  # 1
)
all_structs.append(Announcement)
Announcement.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'index',
        None,
        None,
    ),  # 1
    None,  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.BOOL,
        'forceUpdate',
        None,
        None,
    ),  # 10
    (
        11,
        TType.STRING,
        'title',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'text',
        'UTF8',
        None,
    ),  # 12
    (
        13,
        TType.I64,
        'createdTime',
        None,
        None,
    ),  # 13
    (
        14,
        TType.STRING,
        'pictureUrl',
        'UTF8',
        None,
    ),  # 14
    (
        15,
        TType.STRING,
        'thumbnailUrl',
        'UTF8',
        None,
    ),  # 15
)
all_structs.append(ChannelProvider)
ChannelProvider.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 1
)
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(ChannelDomain)
ChannelDomain.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'host',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'removed',
        None,
        None,
    ),  # 2
)
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
)
all_structs.append(OTPResult)
OTPResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'otpId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'otp',
        'UTF8',
        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
)
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
)
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(SquareMemberRelation)
SquareMemberRelation.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'state',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'revision',
        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
)
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(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
)
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(SquareInfo)
SquareInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'square',
        [Square, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'squareStatus',
        [SquareStatus, None],
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareNoteStatus',
        [NoteStatus, None],
        None,
    ),  # 3
)
all_structs.append(BotUseInfo)
BotUseInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'botUseAgreementAccepted',
        None,
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'botInFriends',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'primaryApplication',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'locale',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(PaidCallAdCountry)
PaidCallAdCountry.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'countryCode',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'rateDivision',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(PaidCallAdResult)
PaidCallAdResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'adRemains',
        None,
        None,
    ),  # 1
)
all_structs.append(PaidCallBalance)
PaidCallBalance.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'productName',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'unit',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'limitedPaidBalance',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'limitedFreeBalance',
        None,
        None,
    ),  # 5
    (
        6,
        TType.I32,
        'unlimitedPaidBalance',
        None,
        None,
    ),  # 6
    (
        7,
        TType.I32,
        'unlimitedFreeBalance',
        None,
        None,
    ),  # 7
    (
        8,
        TType.I64,
        'startTime',
        None,
        None,
    ),  # 8
    (
        9,
        TType.I64,
        'endTime',
        None,
        None,
    ),  # 9
    (
        10,
        TType.BOOL,
        'autopayEnabled',
        None,
        None,
    ),  # 10
)
all_structs.append(PaidCallCurrencyExchangeRate)
PaidCallCurrencyExchangeRate.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'currencyCode',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'currencyName',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'currencySign',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'preferred',
        None,
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'coinRate',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'creditRate',
        'UTF8',
        None,
    ),  # 6
)
all_structs.append(ExtendedProfileBirthday)
ExtendedProfileBirthday.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'year',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'yearPrivacyLevelType',
        None,
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'yearEnabled',
        None,
        None,
    ),  # 3
    None,  # 4
    (
        5,
        TType.STRING,
        'day',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.I32,
        'dayPrivacyLevelType',
        None,
        None,
    ),  # 6
    (
        7,
        TType.BOOL,
        'dayEnabled',
        None,
        None,
    ),  # 7
)
all_structs.append(ExtendedProfile)
ExtendedProfile.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'birthday',
        [ExtendedProfileBirthday, None],
        None,
    ),  # 1
)
all_structs.append(PaidCallDialing)
PaidCallDialing.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'type',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'dialedNumber',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'serviceDomain',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'productName',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.BOOL,
        'multipleProduct',
        None,
        None,
    ),  # 6
    (
        7,
        TType.I32,
        'callerIdStatus',
        None,
        None,
    ),  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.I32,
        'balance',
        None,
        None,
    ),  # 10
    (
        11,
        TType.STRING,
        'unit',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.I32,
        'rate',
        None,
        None,
    ),  # 12
    (
        13,
        TType.STRING,
        'displayCode',
        'UTF8',
        None,
    ),  # 13
    (
        14,
        TType.STRING,
        'calledNumber',
        'UTF8',
        None,
    ),  # 14
    (
        15,
        TType.STRING,
        'calleeNationalNumber',
        'UTF8',
        None,
    ),  # 15
    (
        16,
        TType.STRING,
        'calleeCallingCode',
        'UTF8',
        None,
    ),  # 16
    (
        17,
        TType.STRING,
        'rateDivision',
        'UTF8',
        None,
    ),  # 17
    None,  # 18
    None,  # 19
    (
        20,
        TType.I32,
        'adMaxMin',
        None,
        None,
    ),  # 20
    (
        21,
        TType.I32,
        'adRemains',
        None,
        None,
    ),  # 21
    (
        22,
        TType.STRING,
        'adSessionId',
        'UTF8',
        None,
    ),  # 22
)
all_structs.append(SpotItem)
SpotItem.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'phone',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'category',
        None,
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'countryAreaCode',
        'UTF8',
        None,
    ),  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.BOOL,
        'freePhoneCallable',
        None,
        None,
    ),  # 10
)
all_structs.append(SpotNearbyItem)
SpotNearbyItem.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRUCT,
        'spotItem',
        [SpotItem, None],
        None,
    ),  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.STRUCT,
        'location',
        [Location, None],
        None,
    ),  # 11
)
all_structs.append(SpotNearbyResponse)
SpotNearbyResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'spotNearbyItems',
        (TType.STRUCT, [SpotNearbyItem, None], False),
        None,
    ),  # 1
)
all_structs.append(SpotPhoneNumberResponse)
SpotPhoneNumberResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'spotItems',
        (TType.STRUCT, [SpotItem, None], False),
        None,
    ),  # 1
)
all_structs.append(PaidCallHistory)
PaidCallHistory.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'seq',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'type',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'dialedNumber',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'calledNumber',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'toMid',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'toName',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.I64,
        'setupTime',
        None,
        None,
    ),  # 7
    (
        8,
        TType.I64,
        'startTime',
        None,
        None,
    ),  # 8
    (
        9,
        TType.I64,
        'endTime',
        None,
        None,
    ),  # 9
    (
        10,
        TType.I64,
        'duration',
        None,
        None,
    ),  # 10
    (
        11,
        TType.I32,
        'terminate',
        None,
        None,
    ),  # 11
    (
        12,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 12
    (
        13,
        TType.I32,
        'charge',
        None,
        None,
    ),  # 13
    (
        14,
        TType.STRING,
        'unit',
        'UTF8',
        None,
    ),  # 14
    (
        15,
        TType.STRING,
        'result',
        'UTF8',
        None,
    ),  # 15
)
all_structs.append(PaidCallHistoryResult)
PaidCallHistoryResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'historys',
        (TType.STRUCT, [PaidCallHistory, None], False),
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'hasNext',
        None,
        None,
    ),  # 2
)
all_structs.append(PaidCallMetadataResult)
PaidCallMetadataResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'currencyExchangeRates',
        (TType.STRUCT, [PaidCallCurrencyExchangeRate, None], False),
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'recommendedCountryCodes',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        'adCountries',
        (TType.STRUCT, [PaidCallAdCountry, None], False),
        None,
    ),  # 3
)
all_structs.append(PaidCallRedeemResult)
PaidCallRedeemResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'eventName',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'eventAmount',
        None,
        None,
    ),  # 2
)
all_structs.append(PaidCallResponse)
PaidCallResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'host',
        [CallHost, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'dialing',
        [PaidCallDialing, None],
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'token',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        'spotItems',
        (TType.STRUCT, [SpotItem, None], False),
        None,
    ),  # 4
)
all_structs.append(PaidCallUserRate)
PaidCallUserRate.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'countryCode',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'rate',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'rateDivision',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'rateName',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(ChannelInfo)
ChannelInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'channelId',
        'UTF8',
        None,
    ),  # 1
    None,  # 2
    (
        3,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'entryPageUrl',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'descriptionText',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRUCT,
        'provider',
        [ChannelProvider, None],
        None,
    ),  # 6
    (
        7,
        TType.I32,
        'publicType',
        None,
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        'iconImage',
        'UTF8',
        None,
    ),  # 8
    (
        9,
        TType.LIST,
        'permissions',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 9
    None,  # 10
    (
        11,
        TType.STRING,
        'iconThumbnailImage',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.LIST,
        'channelConfigurations',
        (TType.I32, None, False),
        None,
    ),  # 12
    (
        13,
        TType.BOOL,
        'lcsAllApiUsable',
        None,
        None,
    ),  # 13
    (
        14,
        TType.SET,
        'allowedPermissions',
        (TType.I32, None, False),
        None,
    ),  # 14
    (
        15,
        TType.LIST,
        'channelDomains',
        (TType.STRUCT, [ChannelDomain, None], False),
        None,
    ),  # 15
    (
        16,
        TType.I64,
        'updatedTimestamp',
        None,
        None,
    ),  # 16
)
all_structs.append(ApprovedChannelInfo)
ApprovedChannelInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'channelInfo',
        [ChannelInfo, None],
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'approvedAt',
        None,
        None,
    ),  # 2
)
all_structs.append(ApprovedChannelInfos)
ApprovedChannelInfos.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'approvedChannelInfos',
        (TType.STRUCT, [ApprovedChannelInfo, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 2
)
all_structs.append(AuthQrcode)
AuthQrcode.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'qrcode',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'verifier',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'callbackUrl',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(E2EEKey)
E2EEKey.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'version',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'keyId',
        None,
        None,
    ),  # 2
    None,  # 3
    (
        4,
        TType.STRING,
        'publicKey',
        'BINARY',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'privateKey',
        'BINARY',
        None,
    ),  # 5
    (
        6,
        TType.I64,
        'createdTime',
        None,
        None,
    ),  # 6
)
all_structs.append(E2EEKeyChain)
E2EEKeyChain.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'keychain',
        (TType.STRUCT, [E2EEKey, None], False),
        None,
    ),  # 1
)
all_structs.append(AnalyticsInfo)
AnalyticsInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.DOUBLE,
        'gaSamplingRate',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'tmid',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(ContactTransition)
ContactTransition.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'ownerMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'targetMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'previousStatus',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'resultStatus',
        None,
        None,
    ),  # 4
)
all_structs.append(UserTicketResponse)
UserTicketResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'userTicket',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(BuddyBanner)
BuddyBanner.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'buddyBannerLinkType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'buddyBannerLink',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'buddyBannerImageUrl',
        'UTF8',
        None,
    ),  # 3
)
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
)
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
)
all_structs.append(BuddyList)
BuddyList.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'classification',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'displayName',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'totalBuddyCount',
        None,
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        'popularContacts',
        (TType.STRUCT, [Contact, None], False),
        None,
    ),  # 4
)
all_structs.append(RegisterWithPhoneNumberResult)
RegisterWithPhoneNumberResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'authToken',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'recommendEmailRegistration',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'certificate',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(BuddyMessageRequest)
BuddyMessageRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'contentType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'text',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'location',
        [Location, None],
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'content',
        'BINARY',
        None,
    ),  # 4
    (
        5,
        TType.MAP,
        'contentMetadata',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 5
)
all_structs.append(BuddyOnAirUrls)
BuddyOnAirUrls.thrift_spec = (
    None,  # 0
    (
        1,
        TType.MAP,
        'hls',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 1
    (
        2,
        TType.MAP,
        'smoothStreaming',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 2
)
all_structs.append(BuddyOnAir)
BuddyOnAir.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 1
    None,  # 2
    (
        3,
        TType.I64,
        'freshnessLifetime',
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'onAirId',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.BOOL,
        'onAir',
        None,
        None,
    ),  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.STRING,
        'text',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.I64,
        'viewerCount',
        None,
        None,
    ),  # 12
    (
        13,
        TType.I64,
        'targetCount',
        None,
        None,
    ),  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    None,  # 21
    None,  # 22
    None,  # 23
    None,  # 24
    None,  # 25
    None,  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    None,  # 30
    (
        31,
        TType.I32,
        'onAirType',
        None,
        None,
    ),  # 31
    (
        32,
        TType.STRUCT,
        'onAirUrls',
        [BuddyOnAirUrls, None],
        None,
    ),  # 32
)
all_structs.append(BuddyProfile)
BuddyProfile.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'buddyId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'searchId',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'displayName',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'statusMessage',
        'UTF8',
        None,
    ),  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.I64,
        'contactCount',
        None,
        None,
    ),  # 11
)
all_structs.append(CommitMessageResult)
CommitMessageResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'message',
        [Message, None],
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'code',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'reason',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I64,
        'successCount',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I64,
        'failCount',
        None,
        None,
    ),  # 5
    (
        6,
        TType.I64,
        'unregisterCount',
        None,
        None,
    ),  # 6
    (
        7,
        TType.I64,
        'blockCount',
        None,
        None,
    ),  # 7
)
all_structs.append(BuddySearchResult)
BuddySearchResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'displayName',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'pictureStatus',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'picturePath',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'statusMessage',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.BOOL,
        'businessAccount',
        None,
        None,
    ),  # 6
)
all_structs.append(SyncParamMid)
SyncParamMid.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'diff',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 3
)
all_structs.append(SIMInfo)
SIMInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'phoneNumber',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'countryCode',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(SyncParamContact)
SyncParamContact.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'syncParamMid',
        [SyncParamMid, None],
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'contactStatus',
        None,
        None,
    ),  # 2
)
all_structs.append(ChannelDomains)
ChannelDomains.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'channelDomains',
        (TType.STRUCT, [ChannelDomain, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 2
)
all_structs.append(ProductCategory)
ProductCategory.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'productCategoryId',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'title',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'productCount',
        None,
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'newFlag',
        None,
        None,
    ),  # 4
)
all_structs.append(ChannelInfos)
ChannelInfos.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'channelInfos',
        (TType.STRUCT, [ChannelInfo, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 2
)
all_structs.append(ChannelNotificationSetting)
ChannelNotificationSetting.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'channelId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'notificationReceivable',
        None,
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'messageReceivable',
        None,
        None,
    ),  # 4
    (
        5,
        TType.BOOL,
        'showDefault',
        None,
        None,
    ),  # 5
)
all_structs.append(ChannelSyncDatas)
ChannelSyncDatas.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'channelInfos',
        (TType.STRUCT, [ChannelInfo, None], False),
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'channelDomains',
        (TType.STRUCT, [ChannelDomain, None], False),
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I64,
        'expires',
        None,
        None,
    ),  # 4
)
all_structs.append(NotiCenterEventData)
NotiCenterEventData.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'id',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'to',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'from_',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'toChannel',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'fromChannel',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'eventType',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.I64,
        'createdTime',
        None,
        None,
    ),  # 7
    (
        8,
        TType.I64,
        'operationRevision',
        None,
        None,
    ),  # 8
    (
        9,
        TType.MAP,
        'content',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 9
    (
        10,
        TType.MAP,
        'push',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 10
)
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(ChannelSettings)
ChannelSettings.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'unapprovedMessageReceivable',
        None,
        None,
    ),  # 1
)
all_structs.append(ChannelIdWithLastUpdated)
ChannelIdWithLastUpdated.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'channelId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'lastUpdated',
        None,
        None,
    ),  # 2
)
all_structs.append(Coin)
Coin.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'freeCoinBalance',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'payedCoinBalance',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'totalCoinBalance',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'rewardCoinBalance',
        None,
        None,
    ),  # 4
)
all_structs.append(CoinPayLoad)
CoinPayLoad.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'payCoin',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'freeCoin',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'type',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'rewardCoin',
        None,
        None,
    ),  # 4
)
all_structs.append(CoinHistory)
CoinHistory.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'payDate',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'coinBalance',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'coin',
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'price',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'title',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.BOOL,
        'refund',
        None,
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        'paySeq',
        'UTF8',
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        'currency',
        'UTF8',
        None,
    ),  # 8
    (
        9,
        TType.STRING,
        'currencySign',
        'UTF8',
        None,
    ),  # 9
    (
        10,
        TType.STRING,
        'displayPrice',
        'UTF8',
        None,
    ),  # 10
    (
        11,
        TType.STRUCT,
        'payload',
        [CoinPayLoad, None],
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'channelId',
        'UTF8',
        None,
    ),  # 12
)
all_structs.append(CoinHistoryCondition)
CoinHistoryCondition.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'start',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'size',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'language',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'eddt',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'appStoreCode',
        None,
        None,
    ),  # 5
)
all_structs.append(CoinHistoryResult)
CoinHistoryResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'historys',
        (TType.STRUCT, [CoinHistory, None], False),
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'balance',
        [Coin, None],
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'hasNext',
        None,
        None,
    ),  # 3
)
all_structs.append(CoinProductItem)
CoinProductItem.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'itemId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'coin',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'freeCoin',
        None,
        None,
    ),  # 3
    None,  # 4
    (
        5,
        TType.STRING,
        'currency',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'price',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        'displayPrice',
        'UTF8',
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 8
    (
        9,
        TType.STRING,
        'desc',
        'UTF8',
        None,
    ),  # 9
)
all_structs.append(CoinPurchaseConfirm)
CoinPurchaseConfirm.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'orderId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'appStoreCode',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'receipt',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'signature',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'seller',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'requestType',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.BOOL,
        'ignoreReceipt',
        None,
        None,
    ),  # 7
)
all_structs.append(CoinPurchaseReservation)
CoinPurchaseReservation.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'productId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'country',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'currency',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'price',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'appStoreCode',
        None,
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'language',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.I32,
        'pgCode',
        None,
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        'redirectUrl',
        'UTF8',
        None,
    ),  # 8
)
all_structs.append(CoinUseReservationItem)
CoinUseReservationItem.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'itemId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'itemName',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'amount',
        None,
        None,
    ),  # 3
)
all_structs.append(CoinUseReservation)
CoinUseReservation.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'channelId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'shopOrderId',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'appStoreCode',
        None,
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        'items',
        (TType.STRUCT, [CoinUseReservationItem, None], False),
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'country',
        'UTF8',
        None,
    ),  # 5
)
all_structs.append(CompactContact)
CompactContact.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'createdTime',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'modifiedTime',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'status',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I64,
        'settings',
        None,
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'displayNameOverridden',
        'UTF8',
        None,
    ),  # 6
)
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(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(ContactReport)
ContactReport.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'exists',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'contact',
        [Contact, None],
        None,
    ),  # 3
)
all_structs.append(ContactReportResult)
ContactReportResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'exists',
        None,
        None,
    ),  # 2
)
all_structs.append(DeviceInfo)
DeviceInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'deviceName',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'systemName',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'systemVersion',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'model',
        'UTF8',
        None,
    ),  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.I32,
        'carrierCode',
        None,
        None,
    ),  # 10
    (
        11,
        TType.STRING,
        'carrierName',
        'UTF8',
        None,
    ),  # 11
    None,  # 12
    None,  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    (
        20,
        TType.I32,
        'applicationType',
        None,
        None,
    ),  # 20
)
all_structs.append(EmailConfirmation)
EmailConfirmation.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'usePasswordSet',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'email',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'password',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'ignoreDuplication',
        None,
        None,
    ),  # 4
)
all_structs.append(EmailConfirmationSession)
EmailConfirmationSession.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'emailConfirmationType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'verifier',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'targetEmail',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(FriendChannelMatrix)
FriendChannelMatrix.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'channelId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'representMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'count',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'point',
        None,
        None,
    ),  # 4
)
all_structs.append(FriendChannelMatricesResponse)
FriendChannelMatricesResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'expires',
        None,
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'matrices',
        (TType.STRUCT, [FriendChannelMatrix, None], False),
        None,
    ),  # 2
)
all_structs.append(FriendRequest)
FriendRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'eMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'direction',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'method',
        None,
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'param',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.I64,
        'timestamp',
        None,
        None,
    ),  # 6
    (
        7,
        TType.I64,
        'seqId',
        None,
        None,
    ),  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.STRING,
        'displayName',
        'UTF8',
        None,
    ),  # 10
    (
        11,
        TType.STRING,
        'picturePath',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'pictureStatus',
        'UTF8',
        None,
    ),  # 12
)
all_structs.append(FriendRequestsInfo)
FriendRequestsInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'totalIncomingCount',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'totalOutgoingCount',
        None,
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        'recentIncomings',
        (TType.STRUCT, [FriendRequest, None], False),
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        'recentOutgoings',
        (TType.STRUCT, [FriendRequest, None], False),
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'totalIncomingLimit',
        None,
        None,
    ),  # 5
    (
        6,
        TType.I32,
        'totalOutgoingLimit',
        None,
        None,
    ),  # 6
)
all_structs.append(Geolocation)
Geolocation.thrift_spec = (
    None,  # 0
    (
        1,
        TType.DOUBLE,
        'longitude',
        None,
        None,
    ),  # 1
    (
        2,
        TType.DOUBLE,
        'latitude',
        None,
        None,
    ),  # 2
)
all_structs.append(NotificationTarget)
NotificationTarget.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'applicationType',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'applicationVersion',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'region',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(GlobalEvent)
GlobalEvent.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'key',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'targets',
        (TType.STRUCT, [NotificationTarget, None], False),
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'createdTime',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I64,
        'data',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'maxDelay',
        None,
        None,
    ),  # 5
)
all_structs.append(GroupPreference)
GroupPreference.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'invitationTicket',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'favoriteTimestamp',
        None,
        None,
    ),  # 2
)
all_structs.append(Group)
Group.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'id',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'createdTime',
        None,
        None,
    ),  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 10
    (
        11,
        TType.STRING,
        'pictureStatus',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.BOOL,
        'preventedJoinByTicket',
        None,
        None,
    ),  # 12
    (
        13,
        TType.STRUCT,
        'groupPreference',
        [GroupPreference, None],
        None,
    ),  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    (
        20,
        TType.LIST,
        'members',
        (TType.STRUCT, [Contact, None], False),
        None,
    ),  # 20
    (
        21,
        TType.STRUCT,
        'creator',
        [Contact, None],
        None,
    ),  # 21
    (
        22,
        TType.LIST,
        'invitee',
        (TType.STRUCT, [Contact, None], False),
        None,
    ),  # 22
    None,  # 23
    None,  # 24
    None,  # 25
    None,  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    None,  # 30
    (
        31,
        TType.BOOL,
        'notificationDisabled',
        None,
        None,
    ),  # 31
)
all_structs.append(IdentityCredential)
IdentityCredential.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'provider',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'identifier',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'password',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(LastReadMessageId)
LastReadMessageId.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'lastReadMessageId',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(LastReadMessageIds)
LastReadMessageIds.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'chatId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'lastReadMessageIds',
        (TType.STRUCT, [LastReadMessageId, None], False),
        None,
    ),  # 2
)
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
)
all_structs.append(LoginResult)
LoginResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'authToken',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'certificate',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'verifier',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'pinCode',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'type',
        None,
        None,
    ),  # 5
    (
        6,
        TType.I64,
        'lastPrimaryBindTime',
        None,
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        'displayMessage',
        'UTF8',
        None,
    ),  # 7
    (
        8,
        TType.STRUCT,
        'sessionForSMSConfirm',
        [VerificationSessionData, None],
        None,
    ),  # 8
)
all_structs.append(LoginRequest)
LoginRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'type',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'identityProvider',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'identifier',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'password',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.BOOL,
        'keepLoggedIn',
        None,
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'accessLocation',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        'systemName',
        'UTF8',
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        'certificate',
        'UTF8',
        None,
    ),  # 8
    (
        9,
        TType.STRING,
        'verifier',
        'UTF8',
        None,
    ),  # 9
    (
        10,
        TType.STRING,
        'secret',
        'UTF8',
        None,
    ),  # 10
    (
        11,
        TType.I32,
        'e2eeVersion',
        None,
        None,
    ),  # 11
)
all_structs.append(LoginSession)
LoginSession.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'tokenKey',
        'UTF8',
        None,
    ),  # 1
    None,  # 2
    (
        3,
        TType.I64,
        'expirationTime',
        None,
        None,
    ),  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.I32,
        'applicationType',
        None,
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'systemName',
        'UTF8',
        None,
    ),  # 12
    None,  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    None,  # 21
    (
        22,
        TType.STRING,
        'accessLocation',
        'UTF8',
        None,
    ),  # 22
)
all_structs.append(MessageWithoutLocation)
MessageWithoutLocation.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
    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.I32,
        '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.I32,
        'readCount',
        None,
        None,
    ),  # 23
    (
        24,
        TType.I32,
        'relatedMessageServiceCode',
        None,
        None,
    ),  # 24
    None,  # 25
    None,  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    None,  # 30
    None,  # 31
    None,  # 32
    None,  # 33
    None,  # 34
    None,  # 35
    None,  # 36
    None,  # 37
    None,  # 38
    None,  # 39
    None,  # 40
    None,  # 41
    None,  # 42
    None,  # 43
    None,  # 44
    None,  # 45
    None,  # 46
    None,  # 47
    None,  # 48
    None,  # 49
    None,  # 50
    None,  # 51
    None,  # 52
    None,  # 53
    None,  # 54
    None,  # 55
    None,  # 56
    None,  # 57
    None,  # 58
    None,  # 59
    None,  # 60
    None,  # 61
    None,  # 62
    None,  # 63
    None,  # 64
    None,  # 65
    None,  # 66
    None,  # 67
    None,  # 68
    None,  # 69
    None,  # 70
    None,  # 71
    None,  # 72
    None,  # 73
    None,  # 74
    None,  # 75
    None,  # 76
    None,  # 77
    None,  # 78
    None,  # 79
    None,  # 80
    None,  # 81
    None,  # 82
    None,  # 83
    None,  # 84
    None,  # 85
    None,  # 86
    None,  # 87
    None,  # 88
    None,  # 89
    None,  # 90
    None,  # 91
    None,  # 92
    (
        93,
        TType.STRING,
        'personName2',
        'UTF8',
        None,
    ),  # 93
    (
        94,
        TType.STRING,
        'personName',
        'UTF8',
        None,
    ),  # 94
    (
        95,
        TType.STRING,
        'person2',
        'UTF8',
        None,
    ),  # 95
    (
        96,
        TType.STRING,
        'person',
        'UTF8',
        None,
    ),  # 96
    (
        97,
        TType.STRING,
        'type',
        'UTF8',
        None,
    ),  # 97
    (
        98,
        TType.STRING,
        'picturePath',
        'UTF8',
        None,
    ),  # 98
    (
        99,
        TType.STRING,
        'displayName',
        'UTF8',
        None,
    ),  # 99
)
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.I32,
        '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.I32,
        'readCount',
        None,
        None,
    ),  # 23
    (
        24,
        TType.I32,
        'relatedMessageServiceCode',
        None,
        None,
    ),  # 24
    None,  # 25
    None,  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    None,  # 30
    None,  # 31
    None,  # 32
    None,  # 33
    None,  # 34
    None,  # 35
    None,  # 36
    None,  # 37
    None,  # 38
    None,  # 39
    None,  # 40
    None,  # 41
    None,  # 42
    None,  # 43
    None,  # 44
    None,  # 45
    None,  # 46
    None,  # 47
    None,  # 48
    None,  # 49
    None,  # 50
    None,  # 51
    None,  # 52
    None,  # 53
    None,  # 54
    None,  # 55
    None,  # 56
    None,  # 57
    None,  # 58
    None,  # 59
    None,  # 60
    None,  # 61
    None,  # 62
    None,  # 63
    None,  # 64
    None,  # 65
    None,  # 66
    None,  # 67
    None,  # 68
    None,  # 69
    None,  # 70
    None,  # 71
    None,  # 72
    None,  # 73
    None,  # 74
    None,  # 75
    None,  # 76
    None,  # 77
    None,  # 78
    None,  # 79
    None,  # 80
    None,  # 81
    None,  # 82
    None,  # 83
    None,  # 84
    None,  # 85
    None,  # 86
    None,  # 87
    None,  # 88
    None,  # 89
    None,  # 90
    None,  # 91
    None,  # 92
    (
        93,
        TType.STRING,
        'personName2',
        'UTF8',
        None,
    ),  # 93
    (
        94,
        TType.STRING,
        'personName',
        'UTF8',
        None,
    ),  # 94
    (
        95,
        TType.STRING,
        'person2',
        'UTF8',
        None,
    ),  # 95
    (
        96,
        TType.STRING,
        'person',
        'UTF8',
        None,
    ),  # 96
    (
        97,
        TType.STRING,
        'type',
        'UTF8',
        None,
    ),  # 97
    (
        98,
        TType.STRING,
        'picturePath',
        'UTF8',
        None,
    ),  # 98
    (
        99,
        TType.STRING,
        'displayName',
        'UTF8',
        None,
    ),  # 99
)
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
)
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(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(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
)
all_structs.append(SquareChatMemberSearchOption)
SquareChatMemberSearchOption.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'displayName',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(MessageOperation)
MessageOperation.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'createdTime',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'type',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'reqSeq',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'status',
        None,
        None,
    ),  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.STRING,
        'param1',
        'UTF8',
        None,
    ),  # 10
    (
        11,
        TType.STRING,
        'param2',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'param3',
        'UTF8',
        None,
    ),  # 12
    None,  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    (
        20,
        TType.STRUCT,
        'message',
        [Message, None],
        None,
    ),  # 20
)
all_structs.append(MessageOperations)
MessageOperations.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'operations',
        (TType.STRUCT, [MessageOperation, None], False),
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'endFlag',
        None,
        None,
    ),  # 2
)
all_structs.append(MessageStoreResult)
MessageStoreResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'requestId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'messageIds',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 2
)
all_structs.append(MetaProfile)
MetaProfile.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'createTime',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'regionCode',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.MAP,
        'identities',
        (TType.I32, None, TType.STRING, 'UTF8', False),
        None,
    ),  # 3
)
all_structs.append(NotificationItem)
NotificationItem.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'id',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        '_from',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'to',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'fromChannel',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'toChannel',
        'UTF8',
        None,
    ),  # 5
    None,  # 6
    (
        7,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 7
    (
        8,
        TType.I64,
        'createdTime',
        None,
        None,
    ),  # 8
    (
        9,
        TType.MAP,
        'content',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 9
)
all_structs.append(NotificationFetchResult)
NotificationFetchResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'fetchMode',
        None,
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'itemList',
        (TType.STRUCT, [NotificationItem, None], False),
        None,
    ),  # 2
)
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(PaymentReservation)
PaymentReservation.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'receiverMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'productId',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'language',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'location',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'currency',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'price',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.I32,
        'appStoreCode',
        None,
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        'messageText',
        'UTF8',
        None,
    ),  # 8
    (
        9,
        TType.I32,
        'messageTemplate',
        None,
        None,
    ),  # 9
    (
        10,
        TType.I64,
        'packageId',
        None,
        None,
    ),  # 10
)
all_structs.append(PaymentReservationResult)
PaymentReservationResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'orderId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'confirmUrl',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.MAP,
        'extras',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 3
)
all_structs.append(Product)
Product.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'productId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'packageId',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'version',
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'authorName',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.BOOL,
        'onSale',
        None,
        None,
    ),  # 5
    (
        6,
        TType.I32,
        'validDays',
        None,
        None,
    ),  # 6
    (
        7,
        TType.I32,
        'saleType',
        None,
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        'copyright',
        'UTF8',
        None,
    ),  # 8
    (
        9,
        TType.STRING,
        'title',
        'UTF8',
        None,
    ),  # 9
    (
        10,
        TType.STRING,
        'descriptionText',
        'UTF8',
        None,
    ),  # 10
    (
        11,
        TType.I64,
        'shopOrderId',
        None,
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'fromMid',
        'UTF8',
        None,
    ),  # 12
    (
        13,
        TType.STRING,
        'toMid',
        'UTF8',
        None,
    ),  # 13
    (
        14,
        TType.I64,
        'validUntil',
        None,
        None,
    ),  # 14
    (
        15,
        TType.I32,
        'priceTier',
        None,
        None,
    ),  # 15
    (
        16,
        TType.STRING,
        'price',
        'UTF8',
        None,
    ),  # 16
    (
        17,
        TType.STRING,
        'currency',
        'UTF8',
        None,
    ),  # 17
    (
        18,
        TType.STRING,
        'currencySymbol',
        'UTF8',
        None,
    ),  # 18
    (
        19,
        TType.I32,
        'paymentType',
        None,
        None,
    ),  # 19
    (
        20,
        TType.I64,
        'createDate',
        None,
        None,
    ),  # 20
    (
        21,
        TType.BOOL,
        'ownFlag',
        None,
        None,
    ),  # 21
    (
        22,
        TType.I32,
        'eventType',
        None,
        None,
    ),  # 22
    (
        23,
        TType.STRING,
        'urlSchema',
        'UTF8',
        None,
    ),  # 23
    (
        24,
        TType.STRING,
        'downloadUrl',
        'UTF8',
        None,
    ),  # 24
    (
        25,
        TType.STRING,
        'buddyMid',
        'UTF8',
        None,
    ),  # 25
    (
        26,
        TType.I64,
        'publishSince',
        None,
        None,
    ),  # 26
    (
        27,
        TType.BOOL,
        'newFlag',
        None,
        None,
    ),  # 27
    (
        28,
        TType.BOOL,
        'missionFlag',
        None,
        None,
    ),  # 28
    (
        29,
        TType.LIST,
        'categories',
        (TType.STRUCT, [ProductCategory, None], False),
        None,
    ),  # 29
    (
        30,
        TType.STRING,
        'missionButtonText',
        'UTF8',
        None,
    ),  # 30
    (
        31,
        TType.STRING,
        'missionShortDescription',
        'UTF8',
        None,
    ),  # 31
    (
        32,
        TType.STRING,
        'authorId',
        'UTF8',
        None,
    ),  # 32
    None,  # 33
    None,  # 34
    None,  # 35
    None,  # 36
    None,  # 37
    None,  # 38
    None,  # 39
    None,  # 40
    (
        41,
        TType.BOOL,
        'grantedByDefault',
        None,
        None,
    ),  # 41
    (
        42,
        TType.I32,
        'displayOrder',
        None,
        None,
    ),  # 42
    (
        43,
        TType.BOOL,
        'availableForPresent',
        None,
        None,
    ),  # 43
    (
        44,
        TType.BOOL,
        'availableForMyself',
        None,
        None,
    ),  # 44
    None,  # 45
    None,  # 46
    None,  # 47
    None,  # 48
    None,  # 49
    None,  # 50
    (
        51,
        TType.BOOL,
        'hasAnimation',
        None,
        None,
    ),  # 51
    (
        52,
        TType.BOOL,
        'hasSound',
        None,
        None,
    ),  # 52
    (
        53,
        TType.BOOL,
        'recommendationsEnabled',
        None,
        None,
    ),  # 53
    (
        54,
        TType.I32,
        'stickerResourceType',
        None,
        None,
    ),  # 54
)
all_structs.append(ProductList)
ProductList.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'hasNext',
        None,
        None,
    ),  # 1
    None,  # 2
    None,  # 3
    (
        4,
        TType.I64,
        'bannerSequence',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'bannerTargetType',
        None,
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'bannerTargetPath',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.LIST,
        'productList',
        (TType.STRUCT, [Product, None], False),
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        'bannerLang',
        'UTF8',
        None,
    ),  # 8
)
all_structs.append(StickerIdRange)
StickerIdRange.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'start',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'size',
        None,
        None,
    ),  # 2
)
all_structs.append(ProductSimple)
ProductSimple.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'productId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'packageId',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'version',
        None,
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'onSale',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I64,
        'validUntil',
        None,
        None,
    ),  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.LIST,
        'stickerIdRanges',
        (TType.STRUCT, [StickerIdRange, 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
    None,  # 31
    None,  # 32
    None,  # 33
    None,  # 34
    None,  # 35
    None,  # 36
    None,  # 37
    None,  # 38
    None,  # 39
    None,  # 40
    (
        41,
        TType.BOOL,
        'grantedByDefault',
        None,
        None,
    ),  # 41
    (
        42,
        TType.I32,
        'displayOrder',
        None,
        None,
    ),  # 42
)
all_structs.append(ProductSimpleList)
ProductSimpleList.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'hasNext',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'reinvokeHour',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'lastVersionSeq',
        None,
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        'productList',
        (TType.STRUCT, [ProductSimple, None], False),
        None,
    ),  # 4
    (
        5,
        TType.I64,
        'recentNewReleaseDate',
        None,
        None,
    ),  # 5
    (
        6,
        TType.I64,
        'recentEventReleaseDate',
        None,
        None,
    ),  # 6
)
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
)
all_structs.append(ProximityMatchCandidateResult)
ProximityMatchCandidateResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'users',
        (TType.STRUCT, [Contact, None], False),
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'buddies',
        (TType.STRUCT, [Contact, None], False),
        None,
    ),  # 2
)
all_structs.append(RegisterWithSnsIdResult)
RegisterWithSnsIdResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'authToken',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'userCreated',
        None,
        None,
    ),  # 2
)
all_structs.append(RequestTokenResponse)
RequestTokenResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'requestToken',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'returnUrl',
        'UTF8',
        None,
    ),  # 2
)
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(SuggestDictionary)
SuggestDictionary.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'language',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(SuggestItemDictionaryIncrement)
SuggestItemDictionaryIncrement.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'status',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'scheme',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'data',
        'BINARY',
        None,
    ),  # 4
)
all_structs.append(SuggestTagDictionaryIncrement)
SuggestTagDictionaryIncrement.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'status',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'language',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'scheme',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'data',
        'BINARY',
        None,
    ),  # 5
)
all_structs.append(SuggestDictionaryIncrements)
SuggestDictionaryIncrements.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'itemIncrement',
        [SuggestItemDictionaryIncrement, None],
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'tagIncrements',
        (TType.STRUCT, [SuggestTagDictionaryIncrement, None], False),
        None,
    ),  # 2
)
all_structs.append(SuggestItemDictionaryRevision)
SuggestItemDictionaryRevision.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'scheme',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(SuggestTagDictionaryRevision)
SuggestTagDictionaryRevision.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'language',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'scheme',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(SuggestDictionaryRevisions)
SuggestDictionaryRevisions.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'itemRevision',
        [SuggestItemDictionaryRevision, None],
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'tagRevisions',
        (TType.STRUCT, [SuggestTagDictionaryRevision, None], False),
        None,
    ),  # 2
)
all_structs.append(SuggestDictionarySettings)
SuggestDictionarySettings.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'newRevision',
        None,
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        'dictionaries',
        (TType.STRUCT, [SuggestDictionary, None], False),
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        'preloadedDictionaries',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 4
)
all_structs.append(PhoneInfoForChannel)
PhoneInfoForChannel.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'normalizedPhoneNumber',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'allowedToSearchByPhoneNumber',
        None,
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'allowedToReceiveMessageFromNonFriend',
        None,
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'region',
        'UTF8',
        None,
    ),  # 5
)
all_structs.append(PhoneVerificationResult)
PhoneVerificationResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'verificationResult',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'accountMigrationCheckType',
        None,
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'recommendAddFriends',
        None,
        None,
    ),  # 3
)
all_structs.append(PlaceSearchInfo)
PlaceSearchInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'address',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.DOUBLE,
        'latitude',
        None,
        None,
    ),  # 3
    (
        4,
        TType.DOUBLE,
        'longitude',
        None,
        None,
    ),  # 4
)
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(SecurityCenterResult)
SecurityCenterResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'uri',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'token',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'cookiePath',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'skip',
        None,
        None,
    ),  # 4
)
all_structs.append(SendBuddyMessageResult)
SendBuddyMessageResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'requestId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'state',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'messageId',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'eventNo',
        None,
        None,
    ),  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.I64,
        'receiverCount',
        None,
        None,
    ),  # 11
    (
        12,
        TType.I64,
        'successCount',
        None,
        None,
    ),  # 12
    (
        13,
        TType.I64,
        'failCount',
        None,
        None,
    ),  # 13
    (
        14,
        TType.I64,
        'cancelCount',
        None,
        None,
    ),  # 14
    (
        15,
        TType.I64,
        'blockCount',
        None,
        None,
    ),  # 15
    (
        16,
        TType.I64,
        'unregisterCount',
        None,
        None,
    ),  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    (
        21,
        TType.I64,
        'timestamp',
        None,
        None,
    ),  # 21
    (
        22,
        TType.STRING,
        'message',
        'UTF8',
        None,
    ),  # 22
)
all_structs.append(SetBuddyOnAirResult)
SetBuddyOnAirResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'requestId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'state',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'eventNo',
        None,
        None,
    ),  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.I64,
        'receiverCount',
        None,
        None,
    ),  # 11
    (
        12,
        TType.I64,
        'successCount',
        None,
        None,
    ),  # 12
    (
        13,
        TType.I64,
        'failCount',
        None,
        None,
    ),  # 13
    (
        14,
        TType.I64,
        'cancelCount',
        None,
        None,
    ),  # 14
    (
        15,
        TType.I64,
        'unregisterCount',
        None,
        None,
    ),  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    (
        21,
        TType.I64,
        'timestamp',
        None,
        None,
    ),  # 21
    (
        22,
        TType.STRING,
        'message',
        'UTF8',
        None,
    ),  # 22
)
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
    None,  # 19
    (
        20,
        TType.BOOL,
        'privacySyncContacts',
        None,
        None,
    ),  # 20
    (
        21,
        TType.BOOL,
        'privacySearchByPhoneNumber',
        None,
        None,
    ),  # 21
    (
        22,
        TType.BOOL,
        'privacySearchByUserid',
        None,
        None,
    ),  # 22
    (
        23,
        TType.BOOL,
        'privacySearchByEmail',
        None,
        None,
    ),  # 23
    (
        24,
        TType.BOOL,
        'privacyAllowSecondaryDeviceLogin',
        None,
        None,
    ),  # 24
    (
        25,
        TType.BOOL,
        'privacyProfileImagePostToMyhome',
        None,
        None,
    ),  # 25
    (
        26,
        TType.BOOL,
        'privacyReceiveMessagesFromNotFriend',
        None,
        None,
    ),  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    (
        30,
        TType.STRING,
        'contactMyTicket',
        'UTF8',
        None,
    ),  # 30
    None,  # 31
    None,  # 32
    None,  # 33
    None,  # 34
    None,  # 35
    None,  # 36
    None,  # 37
    None,  # 38
    None,  # 39
    (
        40,
        TType.I32,
        'identityProvider',
        None,
        None,
    ),  # 40
    (
        41,
        TType.STRING,
        'identityIdentifier',
        'UTF8',
        None,
    ),  # 41
    (
        42,
        TType.MAP,
        'snsAccounts',
        (TType.I32, None, TType.STRING, 'UTF8', False),
        None,
    ),  # 42
    (
        43,
        TType.BOOL,
        'phoneRegistration',
        None,
        None,
    ),  # 43
    (
        44,
        TType.I32,
        'emailConfirmationStatus',
        None,
        None,
    ),  # 44
    None,  # 45
    None,  # 46
    None,  # 47
    None,  # 48
    None,  # 49
    (
        50,
        TType.STRING,
        'preferenceLocale',
        'UTF8',
        None,
    ),  # 50
    None,  # 51
    None,  # 52
    None,  # 53
    None,  # 54
    None,  # 55
    None,  # 56
    None,  # 57
    None,  # 58
    None,  # 59
    (
        60,
        TType.MAP,
        'customModes',
        (TType.I32, None, TType.STRING, 'UTF8', False),
        None,
    ),  # 60
    (
        61,
        TType.BOOL,
        'e2eeEnable',
        None,
        None,
    ),  # 61
    (
        62,
        TType.BOOL,
        'hitokotoBackupRequested',
        None,
        None,
    ),  # 62
    (
        63,
        TType.BOOL,
        'privacyProfileMusicPostToMyhome',
        None,
        None,
    ),  # 63
    None,  # 64
    (
        65,
        TType.BOOL,
        'privacyAllowNearby',
        None,
        None,
    ),  # 65
    (
        66,
        TType.I64,
        'agreementNearbyTime',
        None,
        None,
    ),  # 66
    (
        67,
        TType.I64,
        'agreementSquareTime',
        None,
        None,
    ),  # 67
    (
        68,
        TType.BOOL,
        'notificationMention',
        None,
        None,
    ),  # 68
    (
        69,
        TType.I64,
        'botUseAgreementAcceptedAt',
        None,
        None,
    ),  # 69
)
all_structs.append(SimpleChannelClient)
SimpleChannelClient.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'applicationType',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'applicationVersion',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'locale',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(SimpleChannelContact)
SimpleChannelContact.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'displayName',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'pictureStatus',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'picturePath',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'statusMessage',
        'UTF8',
        None,
    ),  # 5
)
all_structs.append(SnsFriend)
SnsFriend.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'snsUserId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'snsUserName',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'snsIdType',
        None,
        None,
    ),  # 3
)
all_structs.append(SnsFriendContactRegistration)
SnsFriendContactRegistration.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'contact',
        [Contact, None],
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'snsIdType',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'snsUserId',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(SnsFriendModification)
SnsFriendModification.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'type',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'snsFriend',
        [SnsFriend, None],
        None,
    ),  # 2
)
all_structs.append(SnsFriends)
SnsFriends.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'snsFriends',
        (TType.STRUCT, [SnsFriend, None], False),
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'hasMore',
        None,
        None,
    ),  # 2
)
all_structs.append(SnsIdUserStatus)
SnsIdUserStatus.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'userExisting',
        None,
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'phoneNumberRegistered',
        None,
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'sameDevice',
        None,
        None,
    ),  # 3
)
all_structs.append(SnsProfile)
SnsProfile.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'snsUserId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'snsUserName',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'email',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'thumbnailUrl',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(SystemConfiguration)
SystemConfiguration.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'endpoint',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'endpointSsl',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'updateUrl',
        'UTF8',
        None,
    ),  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.STRING,
        'c2dmAccount',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'nniServer',
        'UTF8',
        None,
    ),  # 12
)
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(TMessageBox)
TMessageBox.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'id',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'channelId',
        'UTF8',
        None,
    ),  # 2
    None,  # 3
    None,  # 4
    (
        5,
        TType.I64,
        'lastSeq',
        None,
        None,
    ),  # 5
    (
        6,
        TType.I64,
        'unreadCount',
        None,
        None,
    ),  # 6
    (
        7,
        TType.I64,
        'lastModifiedTime',
        None,
        None,
    ),  # 7
    (
        8,
        TType.I32,
        'status',
        None,
        None,
    ),  # 8
    (
        9,
        TType.I32,
        'midType',
        None,
        None,
    ),  # 9
    (
        10,
        TType.LIST,
        'lastMessages',
        (TType.STRUCT, [Message, None], False),
        None,
    ),  # 10
)
all_structs.append(TMessageBoxWrapUp)
TMessageBoxWrapUp.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'messageBox',
        [TMessageBox, None],
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        'contacts',
        (TType.STRUCT, [Contact, None], False),
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'pictureRevision',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(TMessageBoxWrapUpResponse)
TMessageBoxWrapUpResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'messageBoxWrapUpList',
        (TType.STRUCT, [TMessageBoxWrapUp, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'totalSize',
        None,
        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(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(ChatRoomAnnouncementContents)
ChatRoomAnnouncementContents.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'displayFields',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'text',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'link',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'thumbnail',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(ChatRoomAnnouncement)
ChatRoomAnnouncement.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'announcementSeq',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'type',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'contents',
        [ChatRoomAnnouncementContents, None],
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'creatorMid',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.I64,
        'createdTime',
        None,
        None,
    ),  # 5
)
all_structs.append(ErrorExtraInfo)
ErrorExtraInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'preconditionFailedExtraInfo',
        None,
        None,
    ),  # 1
)
all_structs.append(SyncRelations)
SyncRelations.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'syncAll',
        None,
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'syncParamContact',
        (TType.STRUCT, [SyncParamContact, None], False),
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        'syncParamMid',
        (TType.STRUCT, [SyncParamMid, None], False),
        None,
    ),  # 3
)
all_structs.append(SyncScope)
SyncScope.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'syncProfile',
        None,
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'syncSettings',
        None,
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'syncSticker',
        None,
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'syncThemeShop',
        None,
        None,
    ),  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.STRUCT,
        'contact',
        [SyncRelations, None],
        None,
    ),  # 10
    (
        11,
        TType.STRUCT,
        'group',
        [SyncRelations, None],
        None,
    ),  # 11
    (
        12,
        TType.STRUCT,
        'room',
        [SyncRelations, None],
        None,
    ),  # 12
    (
        13,
        TType.STRUCT,
        'chat',
        [SyncRelations, None],
        None,
    ),  # 13
)
all_structs.append(JoinSquareResponse)
JoinSquareResponse.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(JoinSquareRequest)
JoinSquareRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'member',
        [SquareMember, None],
        None,
    ),  # 3
)
all_structs.append(JoinSquareChatResponse)
JoinSquareChatResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'squareChat',
        [SquareChat, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'squareChatStatus',
        [SquareChatStatus, None],
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareChatMember',
        [SquareChatMember, None],
        None,
    ),  # 3
)
all_structs.append(JoinSquareChatRequest)
JoinSquareChatRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(SendMessageResponse)
SendMessageResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'createdSquareMessage',
        [SquareMessage, None],
        None,
    ),  # 1
)
all_structs.append(SendMessageRequest)
SendMessageRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'reqSeq',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareMessage',
        [SquareMessage, None],
        None,
    ),  # 3
)
all_structs.append(MarkAsReadRequest)
MarkAsReadRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
    None,  # 3
    (
        4,
        TType.STRING,
        'messageId',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(MarkAsReadResponse)
MarkAsReadResponse.thrift_spec = ()
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(ApproveSquareMembersResponse)
ApproveSquareMembersResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'approvedMembers',
        (TType.STRUCT, [SquareMember, None], False),
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'status',
        [SquareStatus, None],
        None,
    ),  # 2
)
all_structs.append(ApproveSquareMembersRequest)
ApproveSquareMembersRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        'requestedMemberMids',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 3
)
all_structs.append(CreateSquareChatResponse)
CreateSquareChatResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'squareChat',
        [SquareChat, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'squareChatStatus',
        [SquareChatStatus, None],
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareChatMember',
        [SquareChatMember, None],
        None,
    ),  # 3
)
all_structs.append(CreateSquareChatRequest)
CreateSquareChatRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'reqSeq',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'squareChat',
        [SquareChat, None],
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        'squareMemberMids',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 3
)
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
)
all_structs.append(CreateSquareRequest)
CreateSquareRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'reqSeq',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'square',
        [Square, None],
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'creator',
        [SquareMember, None],
        None,
    ),  # 3
)
all_structs.append(DeleteSquareResponse)
DeleteSquareResponse.thrift_spec = ()
all_structs.append(DeleteSquareRequest)
DeleteSquareRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 3
)
all_structs.append(DestroyMessageResponse)
DestroyMessageResponse.thrift_spec = ()
all_structs.append(DestroyMessageRequest)
DestroyMessageRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
    None,  # 3
    (
        4,
        TType.STRING,
        'messageId',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(GetSquareChatMemberResponse)
GetSquareChatMemberResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'squareChatMember',
        [SquareChatMember, None],
        None,
    ),  # 1
)
all_structs.append(SearchSquareChatMembersRequest)
SearchSquareChatMembersRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'searchOption',
        [SquareChatMemberSearchOption, None],
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 4
)
all_structs.append(SearchSquareChatMembersResponse)
SearchSquareChatMembersResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'members',
        (TType.STRUCT, [SquareMember, None], False),
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(SearchSquareMembersRequest)
SearchSquareMembersRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'searchOption',
        [SquareChatMemberSearchOption, None],
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 5
)
all_structs.append(SearchSquareMembersResponse)
SearchSquareMembersResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'members',
        (TType.STRUCT, [SquareMember, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'totalCount',
        None,
        None,
    ),  # 4
)
all_structs.append(GetSquareChatMembersRequest)
GetSquareChatMembersRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 3
)
all_structs.append(InviteIntoSquareChatRequest)
InviteIntoSquareChatRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'inviteeMids',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(InviteIntoSquareChatResponse)
InviteIntoSquareChatResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'inviteeMids',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 1
)
all_structs.append(GetSquareChatMembersResponse)
GetSquareChatMembersResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'squareChatMembers',
        [SquareMember, None],
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(GetSquareChatStatusRequest)
GetSquareChatStatusRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(GetSquareChatStatusResponse)
GetSquareChatStatusResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'chatStatus',
        [SquareChatStatus, None],
        None,
    ),  # 1
)
all_structs.append(GetSquareChatRequest)
GetSquareChatRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(GetSquareChatResponse)
GetSquareChatResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'squareChat',
        [SquareChat, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'squareChatMember',
        [SquareChatMember, None],
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareChatStatus',
        [SquareChatStatus, None],
        None,
    ),  # 3
)
all_structs.append(GetSquareAuthorityRequest)
GetSquareAuthorityRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(GetSquareAuthorityResponse)
GetSquareAuthorityResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'authority',
        [SquareAuthority, None],
        None,
    ),  # 1
)
all_structs.append(GetJoinedSquaresRequest)
GetJoinedSquaresRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 3
)
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(GetJoinableSquareChatsRequest)
GetJoinableSquareChatsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 1
    None,  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 10
    (
        11,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 11
)
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(GetInvitationTicketUrlRequest)
GetInvitationTicketUrlRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(GetInvitationTicketUrlResponse)
GetInvitationTicketUrlResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'invitationURL',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(LeaveSquareRequest)
LeaveSquareRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(LeaveSquareResponse)
LeaveSquareResponse.thrift_spec = ()
all_structs.append(LeaveSquareChatRequest)
LeaveSquareChatRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'sayGoodbye',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I64,
        'squareChatMemberRevision',
        None,
        None,
    ),  # 4
)
all_structs.append(LeaveSquareChatResponse)
LeaveSquareChatResponse.thrift_spec = ()
all_structs.append(SquareMemberSearchOption)
SquareMemberSearchOption.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'membershipState',
        None,
        None,
    ),  # 1
    (
        2,
        TType.SET,
        'memberRoles',
        (TType.I32, None, False),
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'displayName',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'ableToReceiveMessage',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'ableToReceiveFriendRequest',
        None,
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'chatMidToExcludeMembers',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.BOOL,
        'includingMe',
        None,
        None,
    ),  # 7
    (
        8,
        TType.BOOL,
        'excludeBlockedMembers',
        None,
        None,
    ),  # 8
)
all_structs.append(FindSquareByInvitationTicketRequest)
FindSquareByInvitationTicketRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'invitationTicket',
        'UTF8',
        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
)
all_structs.append(GetSquareAuthoritiesRequest)
GetSquareAuthoritiesRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.SET,
        'squareMids',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 2
)
all_structs.append(GetSquareAuthoritiesResponse)
GetSquareAuthoritiesResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.MAP,
        'authorities',
        (TType.STRING, 'UTF8', TType.STRUCT, [SquareAuthority, None], False),
        None,
    ),  # 1
)
all_structs.append(SquareEventReceiveMessage)
SquareEventReceiveMessage.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'squareMessage',
        [SquareMessage, None],
        None,
    ),  # 2
)
all_structs.append(GetSquareChatMemberRequest)
GetSquareChatMemberRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMemberMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 3
)
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
)
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(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
)
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(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(SquareEventNotifiedUpdateSquareChatStatus)
SquareEventNotifiedUpdateSquareChatStatus.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'statusWithoutMessage',
        [SquareChatStatusWithoutMessage, None],
        None,
    ),  # 2
)
all_structs.append(SquareEventNotifiedUpdateSquareStatus)
SquareEventNotifiedUpdateSquareStatus.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'squareStatus',
        [SquareStatus, 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
)
all_structs.append(SquareEventNotifiedCreateSquareChatMember)
SquareEventNotifiedCreateSquareChatMember.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'squareMemberMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareChatMember',
        [SquareChatMember, None],
        None,
    ),  # 3
)
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(SquareEventNotifiedUpdateSquare)
SquareEventNotifiedUpdateSquare.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'square',
        [Square, None],
        None,
    ),  # 2
)
all_structs.append(SquareEventNotifiedUpdateSquareMember)
SquareEventNotifiedUpdateSquareMember.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareMid',
        '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(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
)
all_structs.append(SquareEventNotifiedUpdateSquareChatMember)
SquareEventNotifiedUpdateSquareChatMember.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'squareMemberMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareChatMember',
        [SquareChatMember, None],
        None,
    ),  # 3
)
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,
        'actionUrl',
        'UTF8',
        None,
    ),  # 4
)
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(SquareEventNotifiedUpdateSquareFeatureSet)
SquareEventNotifiedUpdateSquareFeatureSet.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'squareFeatureSet',
        [SquareFeatureSet, None],
        None,
    ),  # 1
)
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
)
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(FetchMyEventsRequest)
FetchMyEventsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'subscriptionId',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'syncToken',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(GeolocationAccuracy)
GeolocationAccuracy.thrift_spec = (
    None,  # 0
    (
        1,
        TType.DOUBLE,
        'radiusMeters',
        None,
        None,
    ),  # 1
    (
        2,
        TType.DOUBLE,
        'radiusConfidence',
        None,
        None,
    ),  # 2
)
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(FetchSquareChatEventsRequest)
FetchSquareChatEventsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'subscriptionId',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'syncToken',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'direction',
        None,
        None,
    ),  # 5
)
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(InviteToSquareRequest)
InviteToSquareRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        'invitees',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(InviteToSquareResponse)
InviteToSquareResponse.thrift_spec = ()
all_structs.append(InviteToSquareChatRequest)
InviteToSquareChatRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'inviteeMids',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(InviteToSquareChatResponse)
InviteToSquareChatResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'inviteeMids',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 1
)
all_structs.append(GetSquareMemberRequest)
GetSquareMemberRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareMemberMid',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(GetSquareMemberResponse)
GetSquareMemberResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'squareMember',
        [SquareMember, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'relation',
        [SquareMemberRelation, None],
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'oneOnOneChatMid',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(GetSquareMembersRequest)
GetSquareMembersRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.SET,
        'mids',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 2
)
all_structs.append(GetSquareMembersResponse)
GetSquareMembersResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'members',
        [SquareMember, None],
        None,
    ),  # 1
)
all_structs.append(GetSquareMemberRelationsRequest)
GetSquareMemberRelationsRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.I32,
        'state',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 4
)
all_structs.append(GetSquareMemberRelationsResponse)
GetSquareMemberRelationsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'squareMembers',
        (TType.STRUCT, [SquareMember, None], False),
        None,
    ),  # 1
    (
        2,
        TType.MAP,
        'relations',
        (TType.STRING, 'UTF8', TType.STRUCT, [SquareMemberRelation, None], False),
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(GetSquareMemberRelationRequest)
GetSquareMemberRelationRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'targetSquareMemberMid',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(GetSquareMemberRelationResponse)
GetSquareMemberRelationResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'targetSquareMemberMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'relation',
        [SquareMemberRelation, None],
        None,
    ),  # 3
)
all_structs.append(Category)
Category.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'id',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(GetSquareCategoriesRequest)
GetSquareCategoriesRequest.thrift_spec = ()
all_structs.append(GetSquareCategoriesResponse)
GetSquareCategoriesResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'categoryList',
        (TType.STRUCT, [Category, None], False),
        None,
    ),  # 1
)
all_structs.append(UpdateSquareRequest)
UpdateSquareRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'square',
        [Square, None],
        None,
    ),  # 3
)
all_structs.append(UpdateSquareResponse)
UpdateSquareResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'square',
        [Square, None],
        None,
    ),  # 2
)
all_structs.append(SearchSquaresRequest)
SearchSquaresRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'query',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 4
)
all_structs.append(SearchSquaresResponse)
SearchSquaresResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'squares',
        (TType.STRUCT, [Square, None], False),
        None,
    ),  # 1
    (
        2,
        TType.MAP,
        'squareStatuses',
        (TType.STRING, 'UTF8', TType.STRUCT, [SquareStatus, None], False),
        None,
    ),  # 2
    (
        3,
        TType.MAP,
        'myMemberships',
        (TType.STRING, 'UTF8', TType.STRUCT, [SquareMember, None], False),
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.MAP,
        'noteStatuses',
        (TType.STRING, 'UTF8', TType.STRUCT, [NoteStatus, None], False),
        None,
    ),  # 5
)
all_structs.append(GetSquareFeatureSetRequest)
GetSquareFeatureSetRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(GetSquareFeatureSetResponse)
GetSquareFeatureSetResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'squareFeatureSet',
        [SquareFeatureSet, None],
        None,
    ),  # 1
)
all_structs.append(UpdateSquareFeatureSetRequest)
UpdateSquareFeatureSetRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.SET,
        'updateAttributes',
        (TType.I32, None, False),
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareFeatureSet',
        [SquareFeatureSet, None],
        None,
    ),  # 3
)
all_structs.append(UpdateSquareFeatureSetResponse)
UpdateSquareFeatureSetResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.SET,
        'updateAttributes',
        (TType.I32, None, False),
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'squareFeatureSet',
        [SquareFeatureSet, None],
        None,
    ),  # 2
)
all_structs.append(UpdateSquareMemberRequest)
UpdateSquareMemberRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 2
    (
        3,
        TType.SET,
        'updatedPreferenceAttrs',
        (TType.I32, None, False),
        None,
    ),  # 3
    (
        4,
        TType.STRUCT,
        'squareMember',
        [SquareMember, None],
        None,
    ),  # 4
)
all_structs.append(UpdateSquareMemberResponse)
UpdateSquareMemberResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'squareMember',
        [SquareMember, None],
        None,
    ),  # 2
    (
        3,
        TType.SET,
        'updatedPreferenceAttrs',
        (TType.I32, None, False),
        None,
    ),  # 3
)
all_structs.append(UpdateSquareMembersRequest)
UpdateSquareMembersRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        'members',
        (TType.STRUCT, [SquareMember, None], False),
        None,
    ),  # 3
)
all_structs.append(UpdateSquareMembersResponse)
UpdateSquareMembersResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'editor',
        [SquareMember, None],
        None,
    ),  # 2
    (
        3,
        TType.MAP,
        'members',
        (TType.STRING, 'UTF8', TType.STRUCT, [SquareMember, None], False),
        None,
    ),  # 3
)
all_structs.append(RejectSquareMembersRequest)
RejectSquareMembersRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        'requestedMemberMids',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 3
)
all_structs.append(RejectSquareMembersResponse)
RejectSquareMembersResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'rejectedMembers',
        (TType.STRUCT, [SquareMember, None], False),
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'status',
        [SquareStatus, None],
        None,
    ),  # 2
)
all_structs.append(RemoveSubscriptionsRequest)
RemoveSubscriptionsRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.LIST,
        'unsubscriptions',
        (TType.I64, None, False),
        None,
    ),  # 2
)
all_structs.append(RemoveSubscriptionsResponse)
RemoveSubscriptionsResponse.thrift_spec = ()
all_structs.append(RefreshSubscriptionsRequest)
RefreshSubscriptionsRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.LIST,
        'subscriptions',
        (TType.I64, None, False),
        None,
    ),  # 2
)
all_structs.append(RefreshSubscriptionsResponse)
RefreshSubscriptionsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'ttlMillis',
        None,
        None,
    ),  # 1
    (
        2,
        TType.MAP,
        'subscriptionStates',
        (TType.I64, None, TType.STRUCT, [SubscriptionState, None], False),
        None,
    ),  # 2
)
all_structs.append(UpdateSquareChatRequest)
UpdateSquareChatRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareChat',
        [SquareChat, None],
        None,
    ),  # 3
)
all_structs.append(UpdateSquareChatResponse)
UpdateSquareChatResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'squareChat',
        [SquareChat, None],
        None,
    ),  # 2
)
all_structs.append(DeleteSquareChatRequest)
DeleteSquareChatRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'revision',
        None,
        None,
    ),  # 3
)
all_structs.append(DeleteSquareChatResponse)
DeleteSquareChatResponse.thrift_spec = ()
all_structs.append(UpdateSquareChatMemberRequest)
UpdateSquareChatMemberRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'chatMember',
        [SquareChatMember, None],
        None,
    ),  # 3
)
all_structs.append(UpdateSquareChatMemberResponse)
UpdateSquareChatMemberResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'updatedChatMember',
        [SquareChatMember, None],
        None,
    ),  # 1
)
all_structs.append(UpdateSquareAuthorityRequest)
UpdateSquareAuthorityRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.SET,
        'updateAttributes',
        (TType.I32, None, False),
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'authority',
        [SquareAuthority, None],
        None,
    ),  # 3
)
all_structs.append(UpdateSquareAuthorityResponse)
UpdateSquareAuthorityResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.SET,
        'updatdAttributes',
        (TType.I32, None, False),
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'authority',
        [SquareAuthority, None],
        None,
    ),  # 2
)
all_structs.append(UpdateSquareMemberRelationRequest)
UpdateSquareMemberRelationRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'targetSquareMemberMid',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 4
    (
        5,
        TType.STRUCT,
        'relation',
        [SquareMemberRelation, None],
        None,
    ),  # 5
)
all_structs.append(UpdateSquareMemberRelationResponse)
UpdateSquareMemberRelationResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'targetSquareMemberMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.SET,
        'updatedAttrs',
        (TType.I32, None, False),
        None,
    ),  # 3
    (
        4,
        TType.STRUCT,
        'relation',
        [SquareMemberRelation, None],
        None,
    ),  # 4
)
all_structs.append(ReportSquareRequest)
ReportSquareRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'reportType',
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'otherReason',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(ReportSquareResponse)
ReportSquareResponse.thrift_spec = ()
all_structs.append(ReportSquareChatRequest)
ReportSquareChatRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 3
    None,  # 4
    (
        5,
        TType.I32,
        'reportType',
        None,
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'otherReason',
        'UTF8',
        None,
    ),  # 6
)
all_structs.append(ReportSquareChatResponse)
ReportSquareChatResponse.thrift_spec = ()
all_structs.append(ReportSquareMessageRequest)
ReportSquareMessageRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'squareMessageId',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'reportType',
        None,
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'otherReason',
        'UTF8',
        None,
    ),  # 6
)
all_structs.append(ReportSquareMessageResponse)
ReportSquareMessageResponse.thrift_spec = ()
all_structs.append(ReportSquareMemberRequest)
ReportSquareMemberRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMemberMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'reportType',
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'otherReason',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 5
)
all_structs.append(ReportSquareMemberResponse)
ReportSquareMemberResponse.thrift_spec = ()
all_structs.append(GetSquareRequest)
GetSquareRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'mid',
        'UTF8',
        None,
    ),  # 2
)
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(GetSquareStatusRequest)
GetSquareStatusRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(GetSquareStatusResponse)
GetSquareStatusResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'squareStatus',
        [SquareStatus, None],
        None,
    ),  # 1
)
all_structs.append(GetNoteStatusRequest)
GetNoteStatusRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(GetNoteStatusResponse)
GetNoteStatusResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareMid',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'status',
        [NoteStatus, None],
        None,
    ),  # 2
)
all_structs.append(CreateSquareChatAnnouncementRequest)
CreateSquareChatAnnouncementRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'reqSeq',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareChatAnnouncement',
        [SquareChatAnnouncement, None],
        None,
    ),  # 3
)
all_structs.append(CreateSquareChatAnnouncementResponse)
CreateSquareChatAnnouncementResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'announcement',
        [SquareChatAnnouncement, None],
        None,
    ),  # 1
)
all_structs.append(DeleteSquareChatAnnouncementRequest)
DeleteSquareChatAnnouncementRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'announcementSeq',
        None,
        None,
    ),  # 3
)
all_structs.append(DeleteSquareChatAnnouncementResponse)
DeleteSquareChatAnnouncementResponse.thrift_spec = ()
all_structs.append(GetSquareChatAnnouncementsRequest)
GetSquareChatAnnouncementsRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(GetSquareChatAnnouncementsResponse)
GetSquareChatAnnouncementsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'announcements',
        (TType.STRUCT, [SquareChatAnnouncement, None], False),
        None,
    ),  # 1
)
all_structs.append(GetJoinedSquareChatsRequest)
GetJoinedSquareChatsRequest.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 3
)
all_structs.append(GetJoinedSquareChatsResponse)
GetJoinedSquareChatsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'chats',
        (TType.STRUCT, [SquareChat, None], False),
        None,
    ),  # 1
    (
        2,
        TType.MAP,
        'chatMembers',
        (TType.STRING, 'UTF8', TType.STRUCT, [SquareChatMember, None], False),
        None,
    ),  # 2
    (
        3,
        TType.MAP,
        'statuses',
        (TType.STRING, 'UTF8', TType.STRUCT, [SquareChatStatus, None], False),
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'continuationToken',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(ApplicationVersionRange)
ApplicationVersionRange.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'lowerBound',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'lowerBoundInclusive',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'upperBound',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'upperBoundInclusive',
        None,
        None,
    ),  # 4
)
all_structs.append(AutoSuggestionShowcaseRequest)
AutoSuggestionShowcaseRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 1
)
all_structs.append(AutoSuggestionShowcaseResponse)
AutoSuggestionShowcaseResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'productList',
        (TType.STRUCT, [ProductSummaryForAutoSuggest, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'totalSize',
        None,
        None,
    ),  # 2
)
all_structs.append(BuyMustbuyRequest)
BuyMustbuyRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'productId',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'serialNumber',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(DetailedProductList)
DetailedProductList.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'productList',
        (TType.STRUCT, [ProductDetail, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'offset',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'totalSize',
        None,
        None,
    ),  # 3
)
all_structs.append(GetOldSticonMappingRequest)
GetOldSticonMappingRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'lastUpdatedTimeMillis',
        None,
        None,
    ),  # 1
)
all_structs.append(GetOldSticonMappingResponse)
GetOldSticonMappingResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'sticonProductMappings',
        (TType.STRUCT, [SticonProductMapping, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'updatedTimeMillis',
        None,
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'updated',
        None,
        None,
    ),  # 3
)
all_structs.append(GetProductRequest)
GetProductRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'productId',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'carrierCode',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'saveBrowsingHistory',
        None,
        None,
    ),  # 4
)
all_structs.append(GetProductResponse)
GetProductResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'productDetail',
        [ProductDetail, None],
        None,
    ),  # 1
)
all_structs.append(GetRecommendOaRequest)
GetRecommendOaRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'productId',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(GetRecommendOaResponse)
GetRecommendOaResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'buddyMids',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 1
)
all_structs.append(GetRecommendationRequest)
GetRecommendationRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'continuationToken',
        'BINARY',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'recommendationType',
        None,
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'productId',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.SET,
        'subtypes',
        (TType.I32, None, False),
        None,
    ),  # 6
)
all_structs.append(GetRecommendationResponse)
GetRecommendationResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'results',
        (TType.STRUCT, [ProductSearchSummary, None], False),
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'continuationToken',
        'BINARY',
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'totalSize',
        None,
        None,
    ),  # 3
)
all_structs.append(GetSuggestDictionarySettingRequest)
GetSuggestDictionarySettingRequest.thrift_spec = ()
all_structs.append(GetSuggestDictionarySettingResponse)
GetSuggestDictionarySettingResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'results',
        (TType.STRUCT, [SuggestDictionarySetting, None], False),
        None,
    ),  # 1
)
all_structs.append(GetSuggestResourcesV2Request)
GetSuggestResourcesV2Request.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'productIds',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 2
)
all_structs.append(GetSuggestResourcesV2Response)
GetSuggestResourcesV2Response.thrift_spec = (
    None,  # 0
    (
        1,
        TType.MAP,
        'suggestResources',
        (TType.STRING, 'UTF8', TType.STRUCT, [SuggestResource, None], False),
        None,
    ),  # 1
)
all_structs.append(Locale)
Locale.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'language',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'country',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(Price)
Price.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'currency',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'amount',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'priceString',
        'UTF8',
        None,
    ),  # 3
)
all_structs.append(ProductDetail)
ProductDetail.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'id',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'billingItemId',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'type',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'subtype',
        None,
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'billingCpId',
        'UTF8',
        None,
    ),  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'author',
        'UTF8',
        None,
    ),  # 12
    (
        13,
        TType.STRING,
        'detailEntry',
        'UTF8',
        None,
    ),  # 13
    (
        14,
        TType.STRING,
        'copyright',
        'UTF8',
        None,
    ),  # 14
    (
        15,
        TType.STRING,
        'notice',
        'UTF8',
        None,
    ),  # 15
    (
        16,
        TType.STRUCT,
        'promotionInfo',
        [PromotionInfo, None],
        None,
    ),  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    (
        21,
        TType.I64,
        'latestVersion',
        None,
        None,
    ),  # 21
    (
        22,
        TType.STRING,
        'latestVersionString',
        'UTF8',
        None,
    ),  # 22
    (
        23,
        TType.I64,
        'version',
        None,
        None,
    ),  # 23
    (
        24,
        TType.STRING,
        'versionString',
        'UTF8',
        None,
    ),  # 24
    (
        25,
        TType.STRUCT,
        'applicationVersionRange',
        [ApplicationVersionRange, None],
        None,
    ),  # 25
    None,  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    None,  # 30
    (
        31,
        TType.BOOL,
        'owned',
        None,
        None,
    ),  # 31
    (
        32,
        TType.BOOL,
        'grantedByDefault',
        None,
        None,
    ),  # 32
    None,  # 33
    None,  # 34
    None,  # 35
    None,  # 36
    None,  # 37
    None,  # 38
    None,  # 39
    None,  # 40
    (
        41,
        TType.I32,
        'validFor',
        None,
        None,
    ),  # 41
    (
        42,
        TType.I64,
        'validUntil',
        None,
        None,
    ),  # 42
    None,  # 43
    None,  # 44
    None,  # 45
    None,  # 46
    None,  # 47
    None,  # 48
    None,  # 49
    None,  # 50
    (
        51,
        TType.BOOL,
        'onSale',
        None,
        None,
    ),  # 51
    (
        52,
        TType.SET,
        'salesFlags',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 52
    (
        53,
        TType.BOOL,
        'availableForPresent',
        None,
        None,
    ),  # 53
    (
        54,
        TType.BOOL,
        'availableForMyself',
        None,
        None,
    ),  # 54
    None,  # 55
    None,  # 56
    None,  # 57
    None,  # 58
    None,  # 59
    None,  # 60
    (
        61,
        TType.I32,
        'priceTier',
        None,
        None,
    ),  # 61
    (
        62,
        TType.STRUCT,
        'price',
        [Price, None],
        None,
    ),  # 62
    (
        63,
        TType.STRING,
        'priceInLineCoin',
        'UTF8',
        None,
    ),  # 63
    (
        64,
        TType.STRUCT,
        'localizedPrice',
        [Price, None],
        None,
    ),  # 64
    None,  # 65
    None,  # 66
    None,  # 67
    None,  # 68
    None,  # 69
    None,  # 70
    None,  # 71
    None,  # 72
    None,  # 73
    None,  # 74
    None,  # 75
    None,  # 76
    None,  # 77
    None,  # 78
    None,  # 79
    None,  # 80
    None,  # 81
    None,  # 82
    None,  # 83
    None,  # 84
    None,  # 85
    None,  # 86
    None,  # 87
    None,  # 88
    None,  # 89
    None,  # 90
    (
        91,
        TType.MAP,
        'images',
        (TType.STRING, 'UTF8', TType.LIST, (TType.STRING, 'UTF8', False), False),
        None,
    ),  # 91
    (
        92,
        TType.MAP,
        'attributes',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 92
    (
        93,
        TType.STRING,
        'authorId',
        'UTF8',
        None,
    ),  # 93
    (
        94,
        TType.I32,
        'stickerResourceType',
        None,
        None,
    ),  # 94
    (
        95,
        TType.STRUCT,
        'productProperty',
        [ProductProperty, None],
        None,
    ),  # 95
    (
        96,
        TType.I32,
        'productSalesState',
        None,
        None,
    ),  # 96
    (
        97,
        TType.I64,
        'installedTime',
        None,
        None,
    ),  # 97
)
all_structs.append(ProductListV2)
ProductListV2.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'ProductListV2',
        (TType.STRUCT, [ProductDetail, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'offset',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'totalSize',
        None,
        None,
    ),  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.STRING,
        'titleEntry',
        'UTF8',
        None,
    ),  # 11
)
all_structs.append(ProductListByAuthorRequest)
ProductListByAuthorRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'authorId',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'offset',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 4
)
all_structs.append(ProductProperty)
ProductProperty.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'stickerProperty',
        [StickerProperty, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'themeProperty',
        [ThemeProperty, None],
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'sticonProperty',
        [SticonProperty, None],
        None,
    ),  # 3
)
all_structs.append(ProductSearchSummary)
ProductSearchSummary.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'id',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'type',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'author',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRUCT,
        'promotionInfo',
        [PromotionInfo, None],
        None,
    ),  # 5
    (
        6,
        TType.I64,
        'version',
        None,
        None,
    ),  # 6
    (
        7,
        TType.BOOL,
        'newFlag',
        None,
        None,
    ),  # 7
    (
        8,
        TType.I32,
        'priceTier',
        None,
        None,
    ),  # 8
    (
        9,
        TType.STRING,
        'priceInLineCoin',
        'UTF8',
        None,
    ),  # 9
    (
        10,
        TType.STRUCT,
        'property',
        [ProductProperty, None],
        None,
    ),  # 10
    (
        11,
        TType.I32,
        'subType',
        None,
        None,
    ),  # 11
    (
        12,
        TType.BOOL,
        'onSale',
        None,
        None,
    ),  # 12
    (
        13,
        TType.BOOL,
        'availableForPresent',
        None,
        None,
    ),  # 13
    (
        14,
        TType.BOOL,
        'availableForPurchase',
        None,
        None,
    ),  # 14
    (
        15,
        TType.I32,
        'validDays',
        None,
        None,
    ),  # 15
    (
        16,
        TType.STRING,
        'authorId',
        'UTF8',
        None,
    ),  # 16
    (
        17,
        TType.BOOL,
        'bargainFlag',
        None,
        None,
    ),  # 17
)
all_structs.append(ProductSummary)
ProductSummary.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
    None,  # 10
    (
        11,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 11
    None,  # 12
    None,  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    (
        21,
        TType.I64,
        'latestVersion',
        None,
        None,
    ),  # 21
    None,  # 22
    None,  # 23
    None,  # 24
    (
        25,
        TType.STRUCT,
        'applicationVersionRange',
        [ApplicationVersionRange, None],
        None,
    ),  # 25
    None,  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    None,  # 30
    None,  # 31
    (
        32,
        TType.BOOL,
        'grantedByDefault',
        None,
        None,
    ),  # 32
    None,  # 33
    None,  # 34
    None,  # 35
    None,  # 36
    None,  # 37
    None,  # 38
    None,  # 39
    None,  # 40
    None,  # 41
    None,  # 42
    None,  # 43
    None,  # 44
    None,  # 45
    None,  # 46
    None,  # 47
    None,  # 48
    None,  # 49
    None,  # 50
    None,  # 51
    None,  # 52
    None,  # 53
    None,  # 54
    None,  # 55
    None,  # 56
    None,  # 57
    None,  # 58
    None,  # 59
    None,  # 60
    None,  # 61
    None,  # 62
    None,  # 63
    None,  # 64
    None,  # 65
    None,  # 66
    None,  # 67
    None,  # 68
    None,  # 69
    None,  # 70
    None,  # 71
    None,  # 72
    None,  # 73
    None,  # 74
    None,  # 75
    None,  # 76
    None,  # 77
    None,  # 78
    None,  # 79
    None,  # 80
    None,  # 81
    None,  # 82
    None,  # 83
    None,  # 84
    None,  # 85
    None,  # 86
    None,  # 87
    None,  # 88
    None,  # 89
    None,  # 90
    None,  # 91
    (
        92,
        TType.MAP,
        'attributes',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 92
    (
        93,
        TType.STRUCT,
        'productTypeSummary',
        [ProductTypeSummary, None],
        None,
    ),  # 93
    (
        94,
        TType.I64,
        'validUntil',
        None,
        None,
    ),  # 94
)
all_structs.append(ProductSummaryForAutoSuggest)
ProductSummaryForAutoSuggest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'id',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'version',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'stickerResourceType',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I64,
        'suggestVersion',
        None,
        None,
    ),  # 5
)
all_structs.append(ProductSummaryList)
ProductSummaryList.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'productList',
        (TType.STRUCT, [ProductSummary, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'offset',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'totalSize',
        None,
        None,
    ),  # 3
)
all_structs.append(ProductTypeSummary)
ProductTypeSummary.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'stickerSummary',
        [StickerSummary, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'themeSummary',
        [ThemeSummary, None],
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'sticonSummary',
        [SticonSummary, None],
        None,
    ),  # 3
)
all_structs.append(ProductValidationRequest)
ProductValidationRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'validationScheme',
        [ProductValidationScheme, None],
        None,
    ),  # 1
    None,  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.STRING,
        'authCode',
        'UTF8',
        None,
    ),  # 10
)
all_structs.append(ProductValidationResult)
ProductValidationResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'validated',
        None,
        None,
    ),  # 1
)
all_structs.append(ProductValidationScheme)
ProductValidationScheme.thrift_spec = (
    None,  # 0
    None,  # 1
    None,  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.STRING,
        'key',
        'UTF8',
        None,
    ),  # 10
    (
        11,
        TType.I64,
        'offset',
        None,
        None,
    ),  # 11
    (
        12,
        TType.I64,
        'size',
        None,
        None,
    ),  # 12
)
all_structs.append(PromotionBuddyInfo)
PromotionBuddyInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'buddyMid',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(PromotionDetail)
PromotionDetail.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'promotionBuddyInfo',
        [PromotionBuddyInfo, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'promotionInstallInfo',
        [PromotionInstallInfo, None],
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'promotionMissionInfo',
        [PromotionMissionInfo, None],
        None,
    ),  # 3
)
all_structs.append(PromotionInfo)
PromotionInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'promotionType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'promotionDetail',
        [PromotionDetail, None],
        None,
    ),  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    None,  # 11
    None,  # 12
    None,  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    None,  # 21
    None,  # 22
    None,  # 23
    None,  # 24
    None,  # 25
    None,  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    None,  # 30
    None,  # 31
    None,  # 32
    None,  # 33
    None,  # 34
    None,  # 35
    None,  # 36
    None,  # 37
    None,  # 38
    None,  # 39
    None,  # 40
    None,  # 41
    None,  # 42
    None,  # 43
    None,  # 44
    None,  # 45
    None,  # 46
    None,  # 47
    None,  # 48
    None,  # 49
    None,  # 50
    (
        51,
        TType.STRUCT,
        'buddyInfo',
        [PromotionBuddyInfo, None],
        None,
    ),  # 51
)
all_structs.append(PromotionInstallInfo)
PromotionInstallInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'downloadUrl',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'customUrlSchema',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(PromotionMissionInfo)
PromotionMissionInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'promotionMissionType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'missionCompleted',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'downloadUrl',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'customUrlSchema',
        'UTF8',
        None,
    ),  # 4
)
all_structs.append(PurchaseOrder)
PurchaseOrder.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'shopId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'productId',
        'UTF8',
        None,
    ),  # 2
    None,  # 3
    None,  # 4
    (
        5,
        TType.STRING,
        'recipientMid',
        'UTF8',
        None,
    ),  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.STRUCT,
        'price',
        [Price, None],
        None,
    ),  # 11
    (
        12,
        TType.BOOL,
        'enableLinePointAutoExchange',
        None,
        None,
    ),  # 12
    None,  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    (
        21,
        TType.STRUCT,
        'locale',
        [Locale, None],
        None,
    ),  # 21
    None,  # 22
    None,  # 23
    None,  # 24
    None,  # 25
    None,  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    None,  # 30
    (
        31,
        TType.MAP,
        'presentAttributes',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 31
)
all_structs.append(PurchaseOrderResponse)
PurchaseOrderResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'orderId',
        'UTF8',
        None,
    ),  # 1
    None,  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.MAP,
        'attributes',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'billingConfirmUrl',
        'UTF8',
        None,
    ),  # 12
)
all_structs.append(PurchaseRecord)
PurchaseRecord.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'productDetail',
        [ProductDetail, None],
        None,
    ),  # 1
    None,  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.I64,
        'purchasedTime',
        None,
        None,
    ),  # 11
    None,  # 12
    None,  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    (
        21,
        TType.STRING,
        'giver',
        'UTF8',
        None,
    ),  # 21
    (
        22,
        TType.STRING,
        'recipient',
        'UTF8',
        None,
    ),  # 22
    None,  # 23
    None,  # 24
    None,  # 25
    None,  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    None,  # 30
    (
        31,
        TType.STRUCT,
        'purchasedPrice',
        [Price, None],
        None,
    ),  # 31
)
all_structs.append(PurchaseRecordList)
PurchaseRecordList.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'purchaseRecords',
        (TType.STRUCT, [PurchaseRecord, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'offset',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'totalSize',
        None,
        None,
    ),  # 3
)
all_structs.append(ShopUpdates)
ShopUpdates.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'shopId',
        'UTF8',
        None,
    ),  # 1
    None,  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.I64,
        'latestUpdateTime',
        None,
        None,
    ),  # 11
)
all_structs.append(ShowcaseRequest)
ShowcaseRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'productType',
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'showcaseType',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'subType',
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'continuationToken',
        'BINARY',
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'limit',
        None,
        None,
    ),  # 5
)
all_structs.append(ShowcaseV3)
ShowcaseV3.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'productList',
        (TType.STRUCT, [ProductSearchSummary, None], False),
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'continuationToken',
        'BINARY',
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'totalSize',
        None,
        None,
    ),  # 3
)
all_structs.append(StickerProperty)
StickerProperty.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'hasAnimation',
        None,
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        'hasSound',
        None,
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'hasPopup',
        None,
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'stickerResourceType',
        None,
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'stickerOptions',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.I32,
        'compactStickerOptions',
        None,
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        'stickerHash',
        'UTF8',
        None,
    ),  # 7
    None,  # 8
    (
        9,
        TType.LIST,
        'stickerIds',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 9
)
all_structs.append(StickerSummary)
StickerSummary.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'stickerIdRanges',
        (TType.STRUCT, [StickerIdRange, None], False),
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'suggestVersion',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'stickerHash',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        'defaultDisplayOnKeyboard',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'stickerResourceType',
        None,
        None,
    ),  # 5
)
all_structs.append(SticonProductMapping)
SticonProductMapping.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'productId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'oldProductId',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.MAP,
        'newToOldSticonIdMapping',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 3
    (
        4,
        TType.I32,
        'oldPackageVersion',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'oldMetaVersion',
        None,
        None,
    ),  # 5
    (
        6,
        TType.I64,
        'stickerPackageId',
        None,
        None,
    ),  # 6
    (
        7,
        TType.I32,
        'stickerPackageVersion',
        None,
        None,
    ),  # 7
    (
        8,
        TType.MAP,
        'stickerIds',
        (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False),
        None,
    ),  # 8
)
all_structs.append(SticonProperty)
SticonProperty.thrift_spec = (
    None,  # 0
    None,  # 1
    (
        2,
        TType.STRING,
        'sticonIds',
        'UTF8',
        None,
    ),  # 2
)
all_structs.append(SticonSummary)
SticonSummary.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'suggestVersion',
        None,
        None,
    ),  # 1
)
all_structs.append(SuggestDictionarySetting)
SuggestDictionarySetting.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'language',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'name',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        'preload',
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRUCT,
        'suggestResource',
        [SuggestResource, None],
        None,
    ),  # 4
    (
        5,
        TType.MAP,
        'patch',
        (TType.I64, None, TType.STRING, 'UTF8', False),
        None,
    ),  # 5
    (
        6,
        TType.STRUCT,
        'suggestTagResource',
        [SuggestResource, None],
        None,
    ),  # 6
    (
        7,
        TType.MAP,
        'tagPatch',
        (TType.I64, None, TType.STRING, 'UTF8', False),
        None,
    ),  # 7
)
all_structs.append(SuggestResource)
SuggestResource.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'dataUrl',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I64,
        'version',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I64,
        'updatedTime',
        None,
        None,
    ),  # 3
)
all_structs.append(ThemeProperty)
ThemeProperty.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'thumbnailUrl',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'themeResourceType',
        None,
        None,
    ),  # 2
)
all_structs.append(ThemeSummary)
ThemeSummary.thrift_spec = ()
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(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(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(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(ShouldSyncException)
ShouldSyncException.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'syncOpRevision',
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'syncScope',
        [SyncScope, None],
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'syncReason',
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'message',
        'UTF8',
        None,
    ),  # 4
)
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(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(UniversalNotificationServiceException)
UniversalNotificationServiceException.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(UpdateBuddyProfileResult)
UpdateBuddyProfileResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'requestId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'state',
        None,
        None,
    ),  # 2
    (
        3,
        TType.I32,
        'eventNo',
        None,
        None,
    ),  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    None,  # 10
    (
        11,
        TType.I64,
        'receiverCount',
        None,
        None,
    ),  # 11
    (
        12,
        TType.I64,
        'successCount',
        None,
        None,
    ),  # 12
    (
        13,
        TType.I64,
        'failCount',
        None,
        None,
    ),  # 13
    (
        14,
        TType.I64,
        'cancelCount',
        None,
        None,
    ),  # 14
    (
        15,
        TType.I64,
        'unregisterCount',
        None,
        None,
    ),  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    (
        21,
        TType.I64,
        'timestamp',
        None,
        None,
    ),  # 21
    (
        22,
        TType.STRING,
        'message',
        'UTF8',
        None,
    ),  # 22
)
all_structs.append(UserAuthStatus)
UserAuthStatus.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        'phoneNumberRegistered',
        None,
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        'registeredSnsIdTypes',
        (TType.I32, None, False),
        None,
    ),  # 2
)
all_structs.append(WapInvitation)
WapInvitation.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        'type',
        None,
        None,
    ),  # 1
    None,  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (
        10,
        TType.STRING,
        'inviteeEmail',
        'UTF8',
        None,
    ),  # 10
    (
        11,
        TType.STRING,
        'inviterMid',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'roomMid',
        'UTF8',
        None,
    ),  # 12
)
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
)
all_structs.append(GroupCallRoute)
GroupCallRoute.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'token',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'cscf',
        [CallHost, None],
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'mix',
        [CallHost, None],
        None,
    ),  # 3
)
all_structs.append(LiffChatContext)
LiffChatContext.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'chatMid',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(LiffContext)
LiffContext.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'none',
        [LiffNoneContext, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'chat',
        [LiffChatContext, None],
        None,
    ),  # 2
    (
        3,
        TType.STRUCT,
        'squareChat',
        [LiffSquareChatContext, 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(LiffErrorPayload)
LiffErrorPayload.thrift_spec = (
    None,  # 0
    None,  # 1
    None,  # 2
    (
        3,
        TType.STRUCT,
        'consentRequired',
        [LiffErrorConsentRequired, None],
        None,
    ),  # 3
)
all_structs.append(LiffNoneContext)
LiffNoneContext.thrift_spec = ()
all_structs.append(LiffSquareChatContext)
LiffSquareChatContext.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'squareChatMid',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(LiffView)
LiffView.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'type',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'url',
        'UTF8',
        None,
    ),  # 2
    None,  # 3
    (
        4,
        TType.I32,
        'titleTextColor',
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        'titleBackgroundColor',
        None,
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'titleIconUrl',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.I32,
        'titleSubtextColor',
        None,
        None,
    ),  # 7
    (
        8,
        TType.I32,
        'titleButtonColor',
        None,
        None,
    ),  # 8
    (
        9,
        TType.I32,
        'progressBarColor',
        None,
        None,
    ),  # 9
    (
        10,
        TType.I32,
        'progressBackgroundColor',
        None,
        None,
    ),  # 10
    (
        11,
        TType.BOOL,
        'trustedDomain',
        None,
        None,
    ),  # 11
)
all_structs.append(LiffViewRequest)
LiffViewRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'liffId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        'context',
        [LiffContext, None],
        None,
    ),  # 2
)
all_structs.append(LiffViewResponse)
LiffViewResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'view',
        [LiffView, None],
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        'contextToken',
        'UTF8',
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'accessToken',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'featureToken',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.LIST,
        'features',
        (TType.I32, None, False),
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'channelId',
        'UTF8',
        None,
    ),  # 6
)
all_structs.append(Admission)
Admission.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'admissionTime',
        None,
        None,
    ),  # 1
)
all_structs.append(GetReservationRequest)
GetReservationRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'reservationNumber',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(GetReservationResponse)
GetReservationResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'reservation',
        [Reservation, None],
        None,
    ),  # 1
)
all_structs.append(GetReservationsRequest)
GetReservationsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'lastFetchTimeStamp',
        None,
        None,
    ),  # 1
)
all_structs.append(GetReservationsResponse)
GetReservationsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'reservations',
        (TType.STRUCT, [Reservation, None], False),
        None,
    ),  # 1
)
all_structs.append(NotifyEnteringRequest)
NotifyEnteringRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        'ticketIds',
        (TType.STRING, 'UTF8', False),
        None,
    ),  # 1
)
all_structs.append(NotifyEnteringResponse)
NotifyEnteringResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'admissionTime',
        None,
        None,
    ),  # 1
)
all_structs.append(Reservation)
Reservation.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'reservationNumber',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'offlineEnabled',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'eventTitle',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'eventVenue',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'artistName',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'eventImgUrl',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.I64,
        'startDate',
        None,
        None,
    ),  # 7
    (
        8,
        TType.I64,
        'startTime',
        None,
        None,
    ),  # 8
    (
        9,
        TType.I64,
        'doorTime',
        None,
        None,
    ),  # 9
    (
        10,
        TType.I64,
        'enableDoorTime',
        None,
        None,
    ),  # 10
    (
        11,
        TType.I64,
        'validLimitTime',
        None,
        None,
    ),  # 11
    (
        12,
        TType.I64,
        'deletableTime',
        None,
        None,
    ),  # 12
    (
        13,
        TType.I32,
        'entryCheckMethod',
        None,
        None,
    ),  # 13
    (
        14,
        TType.STRING,
        'eventDesc',
        'UTF8',
        None,
    ),  # 14
    (
        15,
        TType.STRING,
        'commEventDesc',
        'UTF8',
        None,
    ),  # 15
    (
        16,
        TType.STRUCT,
        'uiInfo',
        [UIInfo, None],
        None,
    ),  # 16
    (
        17,
        TType.LIST,
        'tickets',
        (TType.STRUCT, [Tickets, None], False),
        None,
    ),  # 17
    (
        18,
        TType.STRUCT,
        'admission',
        [Admission, None],
        None,
    ),  # 18
)
all_structs.append(ReturnTicketRequest)
ReturnTicketRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'reservationNumber',
        'UTF8',
        None,
    ),  # 1
)
all_structs.append(ReturnTicketResponse)
ReturnTicketResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        'returnTicketTime',
        None,
        None,
    ),  # 1
)
all_structs.append(Tickets)
Tickets.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'ticketId',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'displayOrder',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'ownerName',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'ticketClass',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'seatClass',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'seatInfoPrimary',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        'seatInfoSecondary',
        'UTF8',
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        'fcId',
        'UTF8',
        None,
    ),  # 8
    (
        9,
        TType.STRING,
        'priceString',
        'UTF8',
        None,
    ),  # 9
    (
        10,
        TType.STRING,
        'ticketDesc',
        'UTF8',
        None,
    ),  # 10
    (
        11,
        TType.STRING,
        'qrCodeId',
        'UTF8',
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        'qrCodeValue',
        'UTF8',
        None,
    ),  # 12
    (
        13,
        TType.STRING,
        'qrCodeType',
        'UTF8',
        None,
    ),  # 13
    (
        14,
        TType.STRING,
        'facePhotoUrl',
        'UTF8',
        None,
    ),  # 14
    (
        15,
        TType.STRUCT,
        'uiInfo',
        [UIInfo, None],
        None,
    ),  # 15
)
all_structs.append(UIInfo)
UIInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        'uiFormat',
        'UTF8',
        None,
    ),  # 1
    (
        2,
        TType.I32,
        'schemeVersion',
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        'bgColor',
        'UTF8',
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        'fgColor',
        'UTF8',
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        'bgImgUrl',
        'UTF8',
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        'fgImgUrl',
        'UTF8',
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        'extData',
        'UTF8',
        None,
    ),  # 7
)
all_structs.append(GetSquareBotResponse)
GetSquareBotResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        'squareBot',
        [SquareBot, None],
        None,
    ),  # 1
)
fix_spec(all_structs)
del all_structs
