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

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

import sys

from thrift.transport import TTransport
all_structs = []


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
    NOT_AN_INVITEE = 108
    NOT_AN_OUTSIDER = 109
    EMPTY_GROUP = 111
    EXCEED_FOLLOW_LIMIT = 112
    UNSUPPORTED_ACCOUNT_TYPE = 113

    _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",
        108: "NOT_AN_INVITEE",
        109: "NOT_AN_OUTSIDER",
        111: "EMPTY_GROUP",
        112: "EXCEED_FOLLOW_LIMIT",
        113: "UNSUPPORTED_ACCOUNT_TYPE",
    }

    _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,
        "NOT_AN_INVITEE": 108,
        "NOT_AN_OUTSIDER": 109,
        "EMPTY_GROUP": 111,
        "EXCEED_FOLLOW_LIMIT": 112,
        "UNSUPPORTED_ACCOUNT_TYPE": 113,
    }


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
    AVATAR_PROFILE = 512

    _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",
        512: "AVATAR_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,
        "AVATAR_PROFILE": 512,
    }


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_SHARE_PERSONAL_INFO_TO_FRIENDS = 51
    PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN = 21
    PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME = 23
    PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME = 35
    PRIVACY_PROFILE_HISTORY = 57
    PRIVACY_STATUS_MESSAGE_HISTORY = 54
    PRIVACY_ALLOW_FRIEND_REQUEST = 30
    PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND = 25
    PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL = 26
    PRIVACY_AGREE_USE_PAIDCALL = 27
    PRIVACY_AGE_RESULT = 60
    PRIVACY_AGE_RESULT_RECEIVED = 61
    PRIVACY_ALLOW_FOLLOW = 63
    PRIVACY_SHOW_FOLLOW_LIST = 64
    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
    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
    AGREEMENT_PRIVACY_POLICY_VERSION = 47
    AGREEMENT_AD_BY_WEB_ACCESS = 48
    AGREEMENT_PHONE_NUMBER_MATCHING = 49
    AGREEMENT_COMMUNICATION_INFO = 50
    AGREEMENT_THINGS_WIRELESS_COMMUNICATION = 52
    AGREEMENT_GDPR = 53
    AGREEMENT_PROVIDE_LOCATION = 55
    AGREEMENT_BEACON = 56
    AGREEMENT_CONTENTS_SUGGEST = 58
    AGREEMENT_CONTENTS_SUGGEST_DATA_COLLECTION = 59
    AGREEMENT_OCR_IMAGE_COLLECTION = 62

    _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",
        51: "PRIVACY_SHARE_PERSONAL_INFO_TO_FRIENDS",
        21: "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN",
        23: "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME",
        35: "PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME",
        57: "PRIVACY_PROFILE_HISTORY",
        54: "PRIVACY_STATUS_MESSAGE_HISTORY",
        30: "PRIVACY_ALLOW_FRIEND_REQUEST",
        25: "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND",
        26: "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL",
        27: "PRIVACY_AGREE_USE_PAIDCALL",
        60: "PRIVACY_AGE_RESULT",
        61: "PRIVACY_AGE_RESULT_RECEIVED",
        63: "PRIVACY_ALLOW_FOLLOW",
        64: "PRIVACY_SHOW_FOLLOW_LIST",
        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",
        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",
        47: "AGREEMENT_PRIVACY_POLICY_VERSION",
        48: "AGREEMENT_AD_BY_WEB_ACCESS",
        49: "AGREEMENT_PHONE_NUMBER_MATCHING",
        50: "AGREEMENT_COMMUNICATION_INFO",
        52: "AGREEMENT_THINGS_WIRELESS_COMMUNICATION",
        53: "AGREEMENT_GDPR",
        55: "AGREEMENT_PROVIDE_LOCATION",
        56: "AGREEMENT_BEACON",
        58: "AGREEMENT_CONTENTS_SUGGEST",
        59: "AGREEMENT_CONTENTS_SUGGEST_DATA_COLLECTION",
        62: "AGREEMENT_OCR_IMAGE_COLLECTION",
    }

    _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_SHARE_PERSONAL_INFO_TO_FRIENDS": 51,
        "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN": 21,
        "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME": 23,
        "PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME": 35,
        "PRIVACY_PROFILE_HISTORY": 57,
        "PRIVACY_STATUS_MESSAGE_HISTORY": 54,
        "PRIVACY_ALLOW_FRIEND_REQUEST": 30,
        "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND": 25,
        "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL": 26,
        "PRIVACY_AGREE_USE_PAIDCALL": 27,
        "PRIVACY_AGE_RESULT": 60,
        "PRIVACY_AGE_RESULT_RECEIVED": 61,
        "PRIVACY_ALLOW_FOLLOW": 63,
        "PRIVACY_SHOW_FOLLOW_LIST": 64,
        "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,
        "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,
        "AGREEMENT_PRIVACY_POLICY_VERSION": 47,
        "AGREEMENT_AD_BY_WEB_ACCESS": 48,
        "AGREEMENT_PHONE_NUMBER_MATCHING": 49,
        "AGREEMENT_COMMUNICATION_INFO": 50,
        "AGREEMENT_THINGS_WIRELESS_COMMUNICATION": 52,
        "AGREEMENT_GDPR": 53,
        "AGREEMENT_PROVIDE_LOCATION": 55,
        "AGREEMENT_BEACON": 56,
        "AGREEMENT_CONTENTS_SUGGEST": 58,
        "AGREEMENT_CONTENTS_SUGGEST_DATA_COLLECTION": 59,
        "AGREEMENT_OCR_IMAGE_COLLECTION": 62,
    }


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

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

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


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 ContactStatus(object):
    UNSPECIFIED = 0
    FRIEND = 1
    FRIEND_BLOCKED = 2
    RECOMMEND = 3
    RECOMMEND_BLOCKED = 4
    DELETED = 5
    DELETED_BLOCKED = 6

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


class 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 ServiceCode(object):
    UNKNOWN = 0
    TALK = 1
    SQUARE = 2

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

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


class AppExtensionType(object):
    SIRI = 1
    GOOGLE_ASSISTANT = 2
    OS_SHARE = 3

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

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


class ChatAttribute(object):
    NAME = 1
    PICTURE_STATUS = 2
    PREVENTED_JOIN_BY_TICKET = 4
    NOTIFICATION_SETTING = 8
    INVITATION_TICKET = 16
    FAVORITE_TIMESTAMP = 32
    CHAT_TYPE = 64

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

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


class ChatType(object):
    GROUP = 0
    ROOM = 1
    PEER = 2

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

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


class 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 CountryGroup(object):
    UNKNOWN = 0
    EUROPEAN_ECONOMIC_AREA = 1

    _VALUES_TO_NAMES = {
        0: "UNKNOWN",
        1: "EUROPEAN_ECONOMIC_AREA",
    }

    _NAMES_TO_VALUES = {
        "UNKNOWN": 0,
        "EUROPEAN_ECONOMIC_AREA": 1,
    }


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 CarrierCode(object):
    NOT_SPECIFIED = 0
    JP_DOCOMO = 1
    JP_AU = 2
    JP_SOFTBANK = 3
    KR_SKT = 17
    KR_KT = 18
    KR_LGT = 19
    JP_DOCOMO_LINE = 4
    JP_SOFTBANK_LINE = 5
    JP_AU_LINE = 6

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

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


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

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

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


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

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

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


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

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

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


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

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

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


class 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 SnsIdType(object):
    FACEBOOK = 1
    SINA = 2
    RENREN = 3
    FEIXIN = 4
    BBM = 5
    APPLE = 6

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

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


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

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

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


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

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

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


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

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

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


class CustomMode(object):
    PROMOTION_FRIENDS_INVITE = 1
    CAPABILITY_SERVER_SIDE_SMS = 2
    LINE_CLIENT_ANALYTICS_CONFIGURATION = 3

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

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


class 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 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 NotificationType(object):
    APPLE_APNS = 1
    GOOGLE_C2DM = 2
    NHN_NNI = 3
    SKT_AOM = 4
    MS_MPNS = 5
    RIM_BIS = 6
    GOOGLE_GCM = 7
    NOKIA_NNAPI = 8
    TIZEN = 9
    MOZILLA_SIMPLE = 10
    LINE_BOT = 17
    LINE_WAP = 18
    APPLE_APNS_VOIP = 19
    MS_WNS = 20
    GOOGLE_FCM = 21
    CLOVA = 22
    CLOVA_VOIP = 23
    HUAWEI_HCM = 24

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

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


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

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

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


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

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

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


class 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 = {}
                    (_ktype1, _vtype2, _size0) = iprot.readMapBegin()
                    for _i4 in range(_size0):
                        _key5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val6 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameterMap[_key5] = _val6
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('TalkException')
        if self.code is not None:
            oprot.writeFieldBegin('code', TType.I32, 1)
            oprot.writeI32(self.code)
            oprot.writeFieldEnd()
        if self.reason is not None:
            oprot.writeFieldBegin('reason', TType.STRING, 2)
            oprot.writeString(self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason)
            oprot.writeFieldEnd()
        if self.parameterMap is not None:
            oprot.writeFieldBegin('parameterMap', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameterMap))
            for kiter7, viter8 in self.parameterMap.items():
                oprot.writeString(kiter7.encode('utf-8') if sys.version_info[0] == 2 else kiter7)
                oprot.writeString(viter8.encode('utf-8') if sys.version_info[0] == 2 else viter8)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

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

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

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


class 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 AvatarProfile(object):
    """
    Attributes:
     - version
     - updatedMillis

    """


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

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

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

    def validate(self):
        return

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

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

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


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

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_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)
            elif fid == 43:
                if ftype == TType.MAP:
                    self.statusMessageContentMetadata = {}
                    (_ktype10, _vtype11, _size9) = iprot.readMapBegin()
                    for _i13 in range(_size9):
                        _key14 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val15 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.statusMessageContentMetadata[_key14] = _val15
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 44:
                if ftype == TType.STRUCT:
                    self.avatarProfile = AvatarProfile()
                    self.avatarProfile.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('Contact')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 2)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 10)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 11)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.relation is not None:
            oprot.writeFieldBegin('relation', TType.I32, 21)
            oprot.writeI32(self.relation)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 22)
            oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName)
            oprot.writeFieldEnd()
        if self.phoneticName is not None:
            oprot.writeFieldBegin('phoneticName', TType.STRING, 23)
            oprot.writeString(self.phoneticName.encode('utf-8') if sys.version_info[0] == 2 else self.phoneticName)
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 24)
            oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus)
            oprot.writeFieldEnd()
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 25)
            oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl)
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 26)
            oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage)
            oprot.writeFieldEnd()
        if self.displayNameOverridden is not None:
            oprot.writeFieldBegin('displayNameOverridden', TType.STRING, 27)
            oprot.writeString(self.displayNameOverridden.encode('utf-8') if sys.version_info[0] == 2 else self.displayNameOverridden)
            oprot.writeFieldEnd()
        if self.favoriteTime is not None:
            oprot.writeFieldBegin('favoriteTime', TType.I64, 28)
            oprot.writeI64(self.favoriteTime)
            oprot.writeFieldEnd()
        if self.capableVoiceCall is not None:
            oprot.writeFieldBegin('capableVoiceCall', TType.BOOL, 31)
            oprot.writeBool(self.capableVoiceCall)
            oprot.writeFieldEnd()
        if self.capableVideoCall is not None:
            oprot.writeFieldBegin('capableVideoCall', TType.BOOL, 32)
            oprot.writeBool(self.capableVideoCall)
            oprot.writeFieldEnd()
        if self.capableMyhome is not None:
            oprot.writeFieldBegin('capableMyhome', TType.BOOL, 33)
            oprot.writeBool(self.capableMyhome)
            oprot.writeFieldEnd()
        if self.capableBuddy is not None:
            oprot.writeFieldBegin('capableBuddy', TType.BOOL, 34)
            oprot.writeBool(self.capableBuddy)
            oprot.writeFieldEnd()
        if self.attributes is not None:
            oprot.writeFieldBegin('attributes', TType.I32, 35)
            oprot.writeI32(self.attributes)
            oprot.writeFieldEnd()
        if self.settings is not None:
            oprot.writeFieldBegin('settings', TType.I64, 36)
            oprot.writeI64(self.settings)
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 37)
            oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        if self.recommendParams is not None:
            oprot.writeFieldBegin('recommendParams', TType.STRING, 38)
            oprot.writeString(self.recommendParams.encode('utf-8') if sys.version_info[0] == 2 else self.recommendParams)
            oprot.writeFieldEnd()
        if self.friendRequestStatus is not None:
            oprot.writeFieldBegin('friendRequestStatus', TType.I32, 39)
            oprot.writeI32(self.friendRequestStatus)
            oprot.writeFieldEnd()
        if self.musicProfile is not None:
            oprot.writeFieldBegin('musicProfile', TType.STRING, 40)
            oprot.writeString(self.musicProfile.encode('utf-8') if sys.version_info[0] == 2 else self.musicProfile)
            oprot.writeFieldEnd()
        if self.videoProfile is not None:
            oprot.writeFieldBegin('videoProfile', TType.STRING, 42)
            oprot.writeString(self.videoProfile.encode('utf-8') if sys.version_info[0] == 2 else self.videoProfile)
            oprot.writeFieldEnd()
        if self.statusMessageContentMetadata is not None:
            oprot.writeFieldBegin('statusMessageContentMetadata', TType.MAP, 43)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.statusMessageContentMetadata))
            for kiter16, viter17 in self.statusMessageContentMetadata.items():
                oprot.writeString(kiter16.encode('utf-8') if sys.version_info[0] == 2 else kiter16)
                oprot.writeString(viter17.encode('utf-8') if sys.version_info[0] == 2 else viter17)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.avatarProfile is not None:
            oprot.writeFieldBegin('avatarProfile', TType.STRUCT, 44)
            self.avatarProfile.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 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 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 Message(object):
    """
    Attributes:
     - toType
     - id
     - createdTime
     - deliveredTime
     - text
     - location
     - hasContent
     - contentType
     - contentMetadata
     - contentPreview
     - sessionId
     - chunks
     - relatedMessageId
     - messageRelationType
     - readCount
     - relatedMessageServiceCode
     - appExtensionType
     - _from
     - to

    """


    def __init__(self, toType=None, id=None, createdTime=None, deliveredTime=None, text=None, location=None, hasContent=None, contentType=None, contentMetadata=None, contentPreview=None, sessionId=None, chunks=None, relatedMessageId=None, messageRelationType=None, readCount=None, relatedMessageServiceCode=None, appExtensionType=None, _from=None, to=None,):
        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.contentMetadata = contentMetadata
        self.contentPreview = contentPreview
        self.sessionId = sessionId
        self.chunks = chunks
        self.relatedMessageId = relatedMessageId
        self.messageRelationType = messageRelationType
        self.readCount = readCount
        self.relatedMessageServiceCode = relatedMessageServiceCode
        self.appExtensionType = appExtensionType
        self._from = _from
        self.to = to

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(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.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 == 18:
                if ftype == TType.MAP:
                    self.contentMetadata = {}
                    (_ktype19, _vtype20, _size18) = iprot.readMapBegin()
                    for _i22 in range(_size18):
                        _key23 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val24 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.contentMetadata[_key23] = _val24
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRING:
                    self.contentPreview = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 19:
                if ftype == TType.BYTE:
                    self.sessionId = iprot.readByte()
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.LIST:
                    self.chunks = []
                    (_etype28, _size25) = iprot.readListBegin()
                    for _i29 in range(_size25):
                        _elem30 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.chunks.append(_elem30)
                    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)
            elif fid == 25:
                if ftype == TType.I32:
                    self.appExtensionType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRING:
                    self._from = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.to = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is 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.writeString(self.contentPreview.encode('utf-8') if sys.version_info[0] == 2 else 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 kiter31, viter32 in self.contentMetadata.items():
                oprot.writeString(kiter31.encode('utf-8') if sys.version_info[0] == 2 else kiter31)
                oprot.writeString(viter32.encode('utf-8') if sys.version_info[0] == 2 else viter32)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.sessionId is not None:
            oprot.writeFieldBegin('sessionId', TType.BYTE, 19)
            oprot.writeByte(self.sessionId)
            oprot.writeFieldEnd()
        if self.chunks is not None:
            oprot.writeFieldBegin('chunks', TType.LIST, 20)
            oprot.writeListBegin(TType.STRING, len(self.chunks))
            for iter33 in self.chunks:
                oprot.writeString(iter33.encode('utf-8') if sys.version_info[0] == 2 else iter33)
            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.appExtensionType is not None:
            oprot.writeFieldBegin('appExtensionType', TType.I32, 25)
            oprot.writeI32(self.appExtensionType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(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.I64:
                    self.reqSeq = iprot.readI64()
                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.I64, 4)
            oprot.writeI64(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 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 = []
                    (_etype37, _size34) = iprot.readListBegin()
                    for _i38 in range(_size34):
                        _elem39 = Contact()
                        _elem39.read(iprot)
                        self.contacts.append(_elem39)
                    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 = []
                    (_etype43, _size40) = iprot.readListBegin()
                    for _i44 in range(_size40):
                        _elem45 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.memberMids.append(_elem45)
                    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 iter46 in self.contacts:
                iter46.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 iter47 in self.memberMids:
                oprot.writeString(iter47.encode('utf-8') if sys.version_info[0] == 2 else iter47)
            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 UpdateChatResponse(object):


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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('UpdateChatResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class GroupExtra(object):
    """
    Attributes:
     - creator
     - preventedJoinByTicket
     - invitationTicket
     - memberMids
     - inviteeMids

    """


    def __init__(self, creator=None, preventedJoinByTicket=None, invitationTicket=None, memberMids=None, inviteeMids=None,):
        self.creator = creator
        self.preventedJoinByTicket = preventedJoinByTicket
        self.invitationTicket = invitationTicket
        self.memberMids = memberMids
        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.STRING:
                    self.creator = 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.preventedJoinByTicket = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                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 == 4:
                if ftype == TType.MAP:
                    self.memberMids = {}
                    (_ktype49, _vtype50, _size48) = iprot.readMapBegin()
                    for _i52 in range(_size48):
                        _key53 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val54 = iprot.readI64()
                        self.memberMids[_key53] = _val54
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.MAP:
                    self.inviteeMids = {}
                    (_ktype56, _vtype57, _size55) = iprot.readMapBegin()
                    for _i59 in range(_size55):
                        _key60 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val61 = iprot.readI64()
                        self.inviteeMids[_key60] = _val61
                    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('GroupExtra')
        if self.creator is not None:
            oprot.writeFieldBegin('creator', TType.STRING, 1)
            oprot.writeString(self.creator.encode('utf-8') if sys.version_info[0] == 2 else self.creator)
            oprot.writeFieldEnd()
        if self.preventedJoinByTicket is not None:
            oprot.writeFieldBegin('preventedJoinByTicket', TType.BOOL, 2)
            oprot.writeBool(self.preventedJoinByTicket)
            oprot.writeFieldEnd()
        if self.invitationTicket is not None:
            oprot.writeFieldBegin('invitationTicket', TType.STRING, 3)
            oprot.writeString(self.invitationTicket.encode('utf-8') if sys.version_info[0] == 2 else self.invitationTicket)
            oprot.writeFieldEnd()
        if self.memberMids is not None:
            oprot.writeFieldBegin('memberMids', TType.MAP, 4)
            oprot.writeMapBegin(TType.STRING, TType.I64, len(self.memberMids))
            for kiter62, viter63 in self.memberMids.items():
                oprot.writeString(kiter62.encode('utf-8') if sys.version_info[0] == 2 else kiter62)
                oprot.writeI64(viter63)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.inviteeMids is not None:
            oprot.writeFieldBegin('inviteeMids', TType.MAP, 5)
            oprot.writeMapBegin(TType.STRING, TType.I64, len(self.inviteeMids))
            for kiter64, viter65 in self.inviteeMids.items():
                oprot.writeString(kiter64.encode('utf-8') if sys.version_info[0] == 2 else kiter64)
                oprot.writeI64(viter65)
            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 PeerExtra(object):


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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PeerExtra')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class Extra(object):
    """
    Attributes:
     - groupExtra
     - peerExtra

    """


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

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

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

    def validate(self):
        return

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

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

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


class Chat(object):
    """
    Attributes:
     - type
     - chatMid
     - createdTime
     - notificationDisabled
     - favoriteTimestamp
     - chatName
     - picturePath
     - extra

    """


    def __init__(self, type=None, chatMid=None, createdTime=None, notificationDisabled=None, favoriteTimestamp=None, chatName=None, picturePath=None, extra=None,):
        self.type = type
        self.chatMid = chatMid
        self.createdTime = createdTime
        self.notificationDisabled = notificationDisabled
        self.favoriteTimestamp = favoriteTimestamp
        self.chatName = chatName
        self.picturePath = picturePath
        self.extra = extra

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.chatMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.createdTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.notificationDisabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.favoriteTimestamp = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.chatName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.picturePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRUCT:
                    self.extra = Extra()
                    self.extra.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Chat')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.chatMid is not None:
            oprot.writeFieldBegin('chatMid', TType.STRING, 2)
            oprot.writeString(self.chatMid.encode('utf-8') if sys.version_info[0] == 2 else self.chatMid)
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.I64, 3)
            oprot.writeI64(self.createdTime)
            oprot.writeFieldEnd()
        if self.notificationDisabled is not None:
            oprot.writeFieldBegin('notificationDisabled', TType.BOOL, 4)
            oprot.writeBool(self.notificationDisabled)
            oprot.writeFieldEnd()
        if self.favoriteTimestamp is not None:
            oprot.writeFieldBegin('favoriteTimestamp', TType.I64, 5)
            oprot.writeI64(self.favoriteTimestamp)
            oprot.writeFieldEnd()
        if self.chatName is not None:
            oprot.writeFieldBegin('chatName', TType.STRING, 6)
            oprot.writeString(self.chatName.encode('utf-8') if sys.version_info[0] == 2 else self.chatName)
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 7)
            oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        if self.extra is not None:
            oprot.writeFieldBegin('extra', TType.STRUCT, 8)
            self.extra.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """


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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('UpdateChatRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.chat is not None:
            oprot.writeFieldBegin('chat', TType.STRUCT, 2)
            self.chat.write(oprot)
            oprot.writeFieldEnd()
        if self.updatedAttribute is not None:
            oprot.writeFieldBegin('updatedAttribute', TType.I32, 3)
            oprot.writeI32(self.updatedAttribute)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class GetChatsResponse(object):
    """
    Attributes:
     - chats

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.chats = []
                    (_etype69, _size66) = iprot.readListBegin()
                    for _i70 in range(_size66):
                        _elem71 = Chat()
                        _elem71.read(iprot)
                        self.chats.append(_elem71)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetChatsResponse')
        if self.chats is not None:
            oprot.writeFieldBegin('chats', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.chats))
            for iter72 in self.chats:
                iter72.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 GetChatsRequest(object):
    """
    Attributes:
     - chatMids
     - withMembers
     - withInvitees

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.chatMids = []
                    (_etype76, _size73) = iprot.readListBegin()
                    for _i77 in range(_size73):
                        _elem78 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.chatMids.append(_elem78)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.withMembers = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.withInvitees = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetChatsRequest')
        if self.chatMids is not None:
            oprot.writeFieldBegin('chatMids', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.chatMids))
            for iter79 in self.chatMids:
                oprot.writeString(iter79.encode('utf-8') if sys.version_info[0] == 2 else iter79)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.withMembers is not None:
            oprot.writeFieldBegin('withMembers', TType.BOOL, 2)
            oprot.writeBool(self.withMembers)
            oprot.writeFieldEnd()
        if self.withInvitees is not None:
            oprot.writeFieldBegin('withInvitees', TType.BOOL, 3)
            oprot.writeBool(self.withInvitees)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class 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.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('E2EEPublicKey')
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.I32, 1)
            oprot.writeI32(self.version)
            oprot.writeFieldEnd()
        if self.keyId is not None:
            oprot.writeFieldBegin('keyId', TType.I32, 2)
            oprot.writeI32(self.keyId)
            oprot.writeFieldEnd()
        if self.keyData is not None:
            oprot.writeFieldBegin('keyData', TType.STRING, 4)
            oprot.writeString(self.keyData.encode('utf-8') if sys.version_info[0] == 2 else 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 E2EEGroupSharedKey(object):
    """
    Attributes:
     - keyVersion
     - groupKeyId
     - creator
     - creatorKeyId
     - receiver
     - receiverKeyId
     - encryptedSharedKey
     - allowedTypes
     - specVersion

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.keyVersion = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.groupKeyId = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.creator = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.creatorKeyId = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.receiver = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.receiverKeyId = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.encryptedSharedKey = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.SET:
                    self.allowedTypes = set()
                    (_etype83, _size80) = iprot.readSetBegin()
                    for _i84 in range(_size80):
                        _elem85 = iprot.readI32()
                        self.allowedTypes.add(_elem85)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I32:
                    self.specVersion = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('E2EEGroupSharedKey')
        if self.keyVersion is not None:
            oprot.writeFieldBegin('keyVersion', TType.I32, 1)
            oprot.writeI32(self.keyVersion)
            oprot.writeFieldEnd()
        if self.groupKeyId is not None:
            oprot.writeFieldBegin('groupKeyId', TType.I32, 2)
            oprot.writeI32(self.groupKeyId)
            oprot.writeFieldEnd()
        if self.creator is not None:
            oprot.writeFieldBegin('creator', TType.STRING, 3)
            oprot.writeString(self.creator.encode('utf-8') if sys.version_info[0] == 2 else self.creator)
            oprot.writeFieldEnd()
        if self.creatorKeyId is not None:
            oprot.writeFieldBegin('creatorKeyId', TType.I32, 4)
            oprot.writeI32(self.creatorKeyId)
            oprot.writeFieldEnd()
        if self.receiver is not None:
            oprot.writeFieldBegin('receiver', TType.STRING, 5)
            oprot.writeString(self.receiver.encode('utf-8') if sys.version_info[0] == 2 else self.receiver)
            oprot.writeFieldEnd()
        if self.receiverKeyId is not None:
            oprot.writeFieldBegin('receiverKeyId', TType.I32, 6)
            oprot.writeI32(self.receiverKeyId)
            oprot.writeFieldEnd()
        if self.encryptedSharedKey is not None:
            oprot.writeFieldBegin('encryptedSharedKey', TType.STRING, 7)
            oprot.writeString(self.encryptedSharedKey.encode('utf-8') if sys.version_info[0] == 2 else self.encryptedSharedKey)
            oprot.writeFieldEnd()
        if self.allowedTypes is not None:
            oprot.writeFieldBegin('allowedTypes', TType.SET, 8)
            oprot.writeSetBegin(TType.I32, len(self.allowedTypes))
            for iter86 in self.allowedTypes:
                oprot.writeI32(iter86)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.specVersion is not None:
            oprot.writeFieldBegin('specVersion', TType.I32, 9)
            oprot.writeI32(self.specVersion)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class Configurations(object):
    """
    Attributes:
     - revision
     - configMap

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.revision = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.configMap = {}
                    (_ktype88, _vtype89, _size87) = iprot.readMapBegin()
                    for _i91 in range(_size87):
                        _key92 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val93 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.configMap[_key92] = _val93
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Configurations')
        if self.revision is not None:
            oprot.writeFieldBegin('revision', TType.I64, 1)
            oprot.writeI64(self.revision)
            oprot.writeFieldEnd()
        if self.configMap is not None:
            oprot.writeFieldBegin('configMap', TType.MAP, 2)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.configMap))
            for kiter94, viter95 in self.configMap.items():
                oprot.writeString(kiter94.encode('utf-8') if sys.version_info[0] == 2 else kiter94)
                oprot.writeString(viter95.encode('utf-8') if sys.version_info[0] == 2 else viter95)
            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 Profile(object):
    """
    Attributes:
     - email
     - displayName
     - phoneticName
     - pictureStatus
     - thumbnailUrl
     - statusMessage
     - allowSearchByUserid
     - allowSearchByEmail
     - picturePath
     - musicProfile
     - videoProfile
     - statusMessageContentMetadata
     - avatarProfile
     - mid
     - userid
     - regionCode
     - phone

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 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 == 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)
            elif fid == 36:
                if ftype == TType.MAP:
                    self.statusMessageContentMetadata = {}
                    (_ktype97, _vtype98, _size96) = iprot.readMapBegin()
                    for _i100 in range(_size96):
                        _key101 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val102 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.statusMessageContentMetadata[_key101] = _val102
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 37:
                if ftype == TType.STRUCT:
                    self.avatarProfile = AvatarProfile()
                    self.avatarProfile.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 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 == 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 == 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)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Profile')
        if self.mid is not None:
            oprot.writeFieldBegin('mid', TType.STRING, 1)
            oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid)
            oprot.writeFieldEnd()
        if self.userid is not None:
            oprot.writeFieldBegin('userid', TType.STRING, 3)
            oprot.writeString(self.userid.encode('utf-8') if sys.version_info[0] == 2 else self.userid)
            oprot.writeFieldEnd()
        if self.phone is not None:
            oprot.writeFieldBegin('phone', TType.STRING, 10)
            oprot.writeString(self.phone.encode('utf-8') if sys.version_info[0] == 2 else self.phone)
            oprot.writeFieldEnd()
        if self.email is not None:
            oprot.writeFieldBegin('email', TType.STRING, 11)
            oprot.writeString(self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email)
            oprot.writeFieldEnd()
        if self.regionCode is not None:
            oprot.writeFieldBegin('regionCode', TType.STRING, 12)
            oprot.writeString(self.regionCode.encode('utf-8') if sys.version_info[0] == 2 else self.regionCode)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 20)
            oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName)
            oprot.writeFieldEnd()
        if self.phoneticName is not None:
            oprot.writeFieldBegin('phoneticName', TType.STRING, 21)
            oprot.writeString(self.phoneticName.encode('utf-8') if sys.version_info[0] == 2 else self.phoneticName)
            oprot.writeFieldEnd()
        if self.pictureStatus is not None:
            oprot.writeFieldBegin('pictureStatus', TType.STRING, 22)
            oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus)
            oprot.writeFieldEnd()
        if self.thumbnailUrl is not None:
            oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 23)
            oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl)
            oprot.writeFieldEnd()
        if self.statusMessage is not None:
            oprot.writeFieldBegin('statusMessage', TType.STRING, 24)
            oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage)
            oprot.writeFieldEnd()
        if self.allowSearchByUserid is not None:
            oprot.writeFieldBegin('allowSearchByUserid', TType.BOOL, 31)
            oprot.writeBool(self.allowSearchByUserid)
            oprot.writeFieldEnd()
        if self.allowSearchByEmail is not None:
            oprot.writeFieldBegin('allowSearchByEmail', TType.BOOL, 32)
            oprot.writeBool(self.allowSearchByEmail)
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 33)
            oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        if self.musicProfile is not None:
            oprot.writeFieldBegin('musicProfile', TType.STRING, 34)
            oprot.writeString(self.musicProfile.encode('utf-8') if sys.version_info[0] == 2 else self.musicProfile)
            oprot.writeFieldEnd()
        if self.videoProfile is not None:
            oprot.writeFieldBegin('videoProfile', TType.STRING, 35)
            oprot.writeString(self.videoProfile.encode('utf-8') if sys.version_info[0] == 2 else self.videoProfile)
            oprot.writeFieldEnd()
        if self.statusMessageContentMetadata is not None:
            oprot.writeFieldBegin('statusMessageContentMetadata', TType.MAP, 36)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.statusMessageContentMetadata))
            for kiter103, viter104 in self.statusMessageContentMetadata.items():
                oprot.writeString(kiter103.encode('utf-8') if sys.version_info[0] == 2 else kiter103)
                oprot.writeString(viter104.encode('utf-8') if sys.version_info[0] == 2 else viter104)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.avatarProfile is not None:
            oprot.writeFieldBegin('avatarProfile', TType.STRUCT, 37)
            self.avatarProfile.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 VerificationSessionData(object):
    """
    Attributes:
     - sessionId
     - method
     - callback
     - normalizedPhone
     - countryCode
     - nationalSignificantNumber
     - availableVerificationMethods
     - callerIdMask

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.sessionId = iprot.readString().decode('utf-8') 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 = []
                    (_etype108, _size105) = iprot.readListBegin()
                    for _i109 in range(_size105):
                        _elem110 = iprot.readI32()
                        self.availableVerificationMethods.append(_elem110)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.callerIdMask = 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('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 iter111 in self.availableVerificationMethods:
                oprot.writeI32(iter111)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.callerIdMask is not None:
            oprot.writeFieldBegin('callerIdMask', TType.STRING, 8)
            oprot.writeString(self.callerIdMask.encode('utf-8') if sys.version_info[0] == 2 else self.callerIdMask)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class DeviceInfo(object):
    """
    Attributes:
     - applicationType
     - deviceName
     - systemName
     - systemVersion
     - model
     - carrierCode
     - carrierName
     - webViewVersion

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 20:
                if ftype == TType.I32:
                    self.applicationType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif 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 == 5:
                if ftype == TType.STRING:
                    self.webViewVersion = 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('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.webViewVersion is not None:
            oprot.writeFieldBegin('webViewVersion', TType.STRING, 5)
            oprot.writeString(self.webViewVersion.encode('utf-8') if sys.version_info[0] == 2 else self.webViewVersion)
            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 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 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 Settings(object):
    """
    Attributes:
     - notificationThumbnail
     - privacySyncContacts
     - privacySearchByPhoneNumber
     - privacySearchByUserid
     - privacySearchByEmail
     - privacyAllowSecondaryDeviceLogin
     - privacyProfileImagePostToMyhome
     - privacyProfileMusicPostToMyhome
     - privacyAllowProfileHistory
     - privacyStatusMessageHistory
     - privacyReceiveMessagesFromNotFriend
     - privacyAgreeUseLineCoinToPaidCall
     - privacyAgreeUsePaidCall
     - privacyAllowFriendRequest
     - privacyAllowNearby
     - privacySharePersonalInfoToFriends
     - privacyAgeResult
     - privacyAgeResultReceived
     - privacyAllowFollow
     - privacyShowFollowList
     - contactMyTicket
     - identityProvider
     - identityIdentifier
     - snsAccounts
     - phoneRegistration
     - emailConfirmationStatus
     - accountMigrationPincodeType
     - enforcedInputAccountMigrationPincode
     - securityCenterSettingsType
     - allowUnregistrationSecondaryDevice
     - preferenceLocale
     - customModes
     - e2eeEnable
     - hitokotoBackupRequested
     - agreementNearbyTime
     - agreementSquareTime
     - botUseAgreementAcceptedAt
     - agreementShakeFunction
     - agreementMobileContactName
     - agreementSoundToText
     - privacyPolicyVersion
     - notificationEnable
     - agreementAdByWebAccess
     - notificationMuteExpiration
     - agreementPhoneNumberMatching
     - notificationNewMessage
     - agreementCommunicationInfo
     - notificationGroupInvitation
     - agreementThingsWirelessCommunication
     - notificationShowMessage
     - agreementGdpr
     - notificationIncomingCall
     - agreementProvideLocation
     - notificationSoundMessage
     - agreementBeacon
     - notificationSoundGroup
     - agreementContentsSuggest
     - notificationDisabledWithSub
     - agreementContentsSuggestDataCollection
     - notificationPayment
     - agreementOcrImageCollection
     - notificationMention

    """


    def __init__(self, notificationThumbnail=None, privacySyncContacts=None, privacySearchByPhoneNumber=None, privacySearchByUserid=None, privacySearchByEmail=None, privacyAllowSecondaryDeviceLogin=None, privacyProfileImagePostToMyhome=None, privacyProfileMusicPostToMyhome=None, privacyAllowProfileHistory=None, privacyStatusMessageHistory=None, privacyReceiveMessagesFromNotFriend=None, privacyAgreeUseLineCoinToPaidCall=None, privacyAgreeUsePaidCall=None, privacyAllowFriendRequest=None, privacyAllowNearby=None, privacySharePersonalInfoToFriends=None, privacyAgeResult=None, privacyAgeResultReceived=None, privacyAllowFollow=None, privacyShowFollowList=None, contactMyTicket=None, identityProvider=None, identityIdentifier=None, snsAccounts=None, phoneRegistration=None, emailConfirmationStatus=None, accountMigrationPincodeType=None, enforcedInputAccountMigrationPincode=None, securityCenterSettingsType=None, allowUnregistrationSecondaryDevice=None, preferenceLocale=None, customModes=None, e2eeEnable=None, hitokotoBackupRequested=None, agreementNearbyTime=None, agreementSquareTime=None, botUseAgreementAcceptedAt=None, agreementShakeFunction=None, agreementMobileContactName=None, agreementSoundToText=None, privacyPolicyVersion=None, notificationEnable=None, agreementAdByWebAccess=None, notificationMuteExpiration=None, agreementPhoneNumberMatching=None, notificationNewMessage=None, agreementCommunicationInfo=None, notificationGroupInvitation=None, agreementThingsWirelessCommunication=None, notificationShowMessage=None, agreementGdpr=None, notificationIncomingCall=None, agreementProvideLocation=None, notificationSoundMessage=None, agreementBeacon=None, notificationSoundGroup=None, agreementContentsSuggest=None, notificationDisabledWithSub=None, agreementContentsSuggestDataCollection=None, notificationPayment=None, agreementOcrImageCollection=None, notificationMention=None,):
        self.notificationThumbnail = notificationThumbnail
        self.privacySyncContacts = privacySyncContacts
        self.privacySearchByPhoneNumber = privacySearchByPhoneNumber
        self.privacySearchByUserid = privacySearchByUserid
        self.privacySearchByEmail = privacySearchByEmail
        self.privacyAllowSecondaryDeviceLogin = privacyAllowSecondaryDeviceLogin
        self.privacyProfileImagePostToMyhome = privacyProfileImagePostToMyhome
        self.privacyProfileMusicPostToMyhome = privacyProfileMusicPostToMyhome
        self.privacyAllowProfileHistory = privacyAllowProfileHistory
        self.privacyStatusMessageHistory = privacyStatusMessageHistory
        self.privacyReceiveMessagesFromNotFriend = privacyReceiveMessagesFromNotFriend
        self.privacyAgreeUseLineCoinToPaidCall = privacyAgreeUseLineCoinToPaidCall
        self.privacyAgreeUsePaidCall = privacyAgreeUsePaidCall
        self.privacyAllowFriendRequest = privacyAllowFriendRequest
        self.privacyAllowNearby = privacyAllowNearby
        self.privacySharePersonalInfoToFriends = privacySharePersonalInfoToFriends
        self.privacyAgeResult = privacyAgeResult
        self.privacyAgeResultReceived = privacyAgeResultReceived
        self.privacyAllowFollow = privacyAllowFollow
        self.privacyShowFollowList = privacyShowFollowList
        self.contactMyTicket = contactMyTicket
        self.identityProvider = identityProvider
        self.identityIdentifier = identityIdentifier
        self.snsAccounts = snsAccounts
        self.phoneRegistration = phoneRegistration
        self.emailConfirmationStatus = emailConfirmationStatus
        self.accountMigrationPincodeType = accountMigrationPincodeType
        self.enforcedInputAccountMigrationPincode = enforcedInputAccountMigrationPincode
        self.securityCenterSettingsType = securityCenterSettingsType
        self.allowUnregistrationSecondaryDevice = allowUnregistrationSecondaryDevice
        self.preferenceLocale = preferenceLocale
        self.customModes = customModes
        self.e2eeEnable = e2eeEnable
        self.hitokotoBackupRequested = hitokotoBackupRequested
        self.agreementNearbyTime = agreementNearbyTime
        self.agreementSquareTime = agreementSquareTime
        self.botUseAgreementAcceptedAt = botUseAgreementAcceptedAt
        self.agreementShakeFunction = agreementShakeFunction
        self.agreementMobileContactName = agreementMobileContactName
        self.agreementSoundToText = agreementSoundToText
        self.privacyPolicyVersion = privacyPolicyVersion
        self.notificationEnable = notificationEnable
        self.agreementAdByWebAccess = agreementAdByWebAccess
        self.notificationMuteExpiration = notificationMuteExpiration
        self.agreementPhoneNumberMatching = agreementPhoneNumberMatching
        self.notificationNewMessage = notificationNewMessage
        self.agreementCommunicationInfo = agreementCommunicationInfo
        self.notificationGroupInvitation = notificationGroupInvitation
        self.agreementThingsWirelessCommunication = agreementThingsWirelessCommunication
        self.notificationShowMessage = notificationShowMessage
        self.agreementGdpr = agreementGdpr
        self.notificationIncomingCall = notificationIncomingCall
        self.agreementProvideLocation = agreementProvideLocation
        self.notificationSoundMessage = notificationSoundMessage
        self.agreementBeacon = agreementBeacon
        self.notificationSoundGroup = notificationSoundGroup
        self.agreementContentsSuggest = agreementContentsSuggest
        self.notificationDisabledWithSub = notificationDisabledWithSub
        self.agreementContentsSuggestDataCollection = agreementContentsSuggestDataCollection
        self.notificationPayment = notificationPayment
        self.agreementOcrImageCollection = agreementOcrImageCollection
        self.notificationMention = notificationMention

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 72:
                if ftype == TType.BOOL:
                    self.notificationThumbnail = 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 == 63:
                if ftype == TType.BOOL:
                    self.privacyProfileMusicPostToMyhome = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 85:
                if ftype == TType.I32:
                    self.privacyAllowProfileHistory = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 81:
                if ftype == TType.I32:
                    self.privacyStatusMessageHistory = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 26:
                if ftype == TType.BOOL:
                    self.privacyReceiveMessagesFromNotFriend = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 27:
                if ftype == TType.BOOL:
                    self.privacyAgreeUseLineCoinToPaidCall = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 28:
                if ftype == TType.BOOL:
                    self.privacyAgreeUsePaidCall = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 29:
                if ftype == TType.BOOL:
                    self.privacyAllowFriendRequest = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 65:
                if ftype == TType.BOOL:
                    self.privacyAllowNearby = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 78:
                if ftype == TType.I32:
                    self.privacySharePersonalInfoToFriends = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 88:
                if ftype == TType.I32:
                    self.privacyAgeResult = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 89:
                if ftype == TType.BOOL:
                    self.privacyAgeResultReceived = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 91:
                if ftype == TType.BOOL:
                    self.privacyAllowFollow = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 92:
                if ftype == TType.BOOL:
                    self.privacyShowFollowList = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 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 = {}
                    (_ktype113, _vtype114, _size112) = iprot.readMapBegin()
                    for _i116 in range(_size112):
                        _key117 = iprot.readI32()
                        _val118 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.snsAccounts[_key117] = _val118
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 43:
                if ftype == TType.BOOL:
                    self.phoneRegistration = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 44:
                if ftype == TType.I32:
                    self.emailConfirmationStatus = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 45:
                if ftype == TType.I32:
                    self.accountMigrationPincodeType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 46:
                if ftype == TType.BOOL:
                    self.enforcedInputAccountMigrationPincode = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 47:
                if ftype == TType.I32:
                    self.securityCenterSettingsType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 48:
                if ftype == TType.BOOL:
                    self.allowUnregistrationSecondaryDevice = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 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.I32:
                    self.customModes = iprot.readI32()
                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 == 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 == 69:
                if ftype == TType.I64:
                    self.botUseAgreementAcceptedAt = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 70:
                if ftype == TType.I64:
                    self.agreementShakeFunction = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 71:
                if ftype == TType.I64:
                    self.agreementMobileContactName = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 73:
                if ftype == TType.I64:
                    self.agreementSoundToText = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 74:
                if ftype == TType.STRING:
                    self.privacyPolicyVersion = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.BOOL:
                    self.notificationEnable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 75:
                if ftype == TType.I64:
                    self.agreementAdByWebAccess = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.notificationMuteExpiration = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 76:
                if ftype == TType.I64:
                    self.agreementPhoneNumberMatching = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.BOOL:
                    self.notificationNewMessage = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 77:
                if ftype == TType.I64:
                    self.agreementCommunicationInfo = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.BOOL:
                    self.notificationGroupInvitation = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 79:
                if ftype == TType.I64:
                    self.agreementThingsWirelessCommunication = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.BOOL:
                    self.notificationShowMessage = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 80:
                if ftype == TType.I64:
                    self.agreementGdpr = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.BOOL:
                    self.notificationIncomingCall = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 82:
                if ftype == TType.I64:
                    self.agreementProvideLocation = iprot.readI64()
                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 == 83:
                if ftype == TType.I64:
                    self.agreementBeacon = iprot.readI64()
                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 == 86:
                if ftype == TType.I64:
                    self.agreementContentsSuggest = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 18:
                if ftype == TType.BOOL:
                    self.notificationDisabledWithSub = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 87:
                if ftype == TType.I64:
                    self.agreementContentsSuggestDataCollection = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 19:
                if ftype == TType.BOOL:
                    self.notificationPayment = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 90:
                if ftype == TType.I64:
                    self.agreementOcrImageCollection = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 68:
                if ftype == TType.BOOL:
                    self.notificationMention = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Settings')
        if self.notificationEnable is not None:
            oprot.writeFieldBegin('notificationEnable', TType.BOOL, 10)
            oprot.writeBool(self.notificationEnable)
            oprot.writeFieldEnd()
        if self.notificationMuteExpiration is not None:
            oprot.writeFieldBegin('notificationMuteExpiration', TType.I64, 11)
            oprot.writeI64(self.notificationMuteExpiration)
            oprot.writeFieldEnd()
        if self.notificationNewMessage is not None:
            oprot.writeFieldBegin('notificationNewMessage', TType.BOOL, 12)
            oprot.writeBool(self.notificationNewMessage)
            oprot.writeFieldEnd()
        if self.notificationGroupInvitation is not None:
            oprot.writeFieldBegin('notificationGroupInvitation', TType.BOOL, 13)
            oprot.writeBool(self.notificationGroupInvitation)
            oprot.writeFieldEnd()
        if self.notificationShowMessage is not None:
            oprot.writeFieldBegin('notificationShowMessage', TType.BOOL, 14)
            oprot.writeBool(self.notificationShowMessage)
            oprot.writeFieldEnd()
        if self.notificationIncomingCall is not None:
            oprot.writeFieldBegin('notificationIncomingCall', TType.BOOL, 15)
            oprot.writeBool(self.notificationIncomingCall)
            oprot.writeFieldEnd()
        if self.notificationSoundMessage is not None:
            oprot.writeFieldBegin('notificationSoundMessage', TType.STRING, 16)
            oprot.writeString(self.notificationSoundMessage.encode('utf-8') if sys.version_info[0] == 2 else self.notificationSoundMessage)
            oprot.writeFieldEnd()
        if self.notificationSoundGroup is not None:
            oprot.writeFieldBegin('notificationSoundGroup', TType.STRING, 17)
            oprot.writeString(self.notificationSoundGroup.encode('utf-8') if sys.version_info[0] == 2 else self.notificationSoundGroup)
            oprot.writeFieldEnd()
        if self.notificationDisabledWithSub is not None:
            oprot.writeFieldBegin('notificationDisabledWithSub', TType.BOOL, 18)
            oprot.writeBool(self.notificationDisabledWithSub)
            oprot.writeFieldEnd()
        if self.notificationPayment is not None:
            oprot.writeFieldBegin('notificationPayment', TType.BOOL, 19)
            oprot.writeBool(self.notificationPayment)
            oprot.writeFieldEnd()
        if self.privacySyncContacts is not None:
            oprot.writeFieldBegin('privacySyncContacts', TType.BOOL, 20)
            oprot.writeBool(self.privacySyncContacts)
            oprot.writeFieldEnd()
        if self.privacySearchByPhoneNumber is not None:
            oprot.writeFieldBegin('privacySearchByPhoneNumber', TType.BOOL, 21)
            oprot.writeBool(self.privacySearchByPhoneNumber)
            oprot.writeFieldEnd()
        if self.privacySearchByUserid is not None:
            oprot.writeFieldBegin('privacySearchByUserid', TType.BOOL, 22)
            oprot.writeBool(self.privacySearchByUserid)
            oprot.writeFieldEnd()
        if self.privacySearchByEmail is not None:
            oprot.writeFieldBegin('privacySearchByEmail', TType.BOOL, 23)
            oprot.writeBool(self.privacySearchByEmail)
            oprot.writeFieldEnd()
        if self.privacyAllowSecondaryDeviceLogin is not None:
            oprot.writeFieldBegin('privacyAllowSecondaryDeviceLogin', TType.BOOL, 24)
            oprot.writeBool(self.privacyAllowSecondaryDeviceLogin)
            oprot.writeFieldEnd()
        if self.privacyProfileImagePostToMyhome is not None:
            oprot.writeFieldBegin('privacyProfileImagePostToMyhome', TType.BOOL, 25)
            oprot.writeBool(self.privacyProfileImagePostToMyhome)
            oprot.writeFieldEnd()
        if self.privacyReceiveMessagesFromNotFriend is not None:
            oprot.writeFieldBegin('privacyReceiveMessagesFromNotFriend', TType.BOOL, 26)
            oprot.writeBool(self.privacyReceiveMessagesFromNotFriend)
            oprot.writeFieldEnd()
        if self.privacyAgreeUseLineCoinToPaidCall is not None:
            oprot.writeFieldBegin('privacyAgreeUseLineCoinToPaidCall', TType.BOOL, 27)
            oprot.writeBool(self.privacyAgreeUseLineCoinToPaidCall)
            oprot.writeFieldEnd()
        if self.privacyAgreeUsePaidCall is not None:
            oprot.writeFieldBegin('privacyAgreeUsePaidCall', TType.BOOL, 28)
            oprot.writeBool(self.privacyAgreeUsePaidCall)
            oprot.writeFieldEnd()
        if self.privacyAllowFriendRequest is not None:
            oprot.writeFieldBegin('privacyAllowFriendRequest', TType.BOOL, 29)
            oprot.writeBool(self.privacyAllowFriendRequest)
            oprot.writeFieldEnd()
        if self.contactMyTicket is not None:
            oprot.writeFieldBegin('contactMyTicket', TType.STRING, 30)
            oprot.writeString(self.contactMyTicket.encode('utf-8') if sys.version_info[0] == 2 else self.contactMyTicket)
            oprot.writeFieldEnd()
        if self.identityProvider is not None:
            oprot.writeFieldBegin('identityProvider', TType.I32, 40)
            oprot.writeI32(self.identityProvider)
            oprot.writeFieldEnd()
        if self.identityIdentifier is not None:
            oprot.writeFieldBegin('identityIdentifier', TType.STRING, 41)
            oprot.writeString(self.identityIdentifier.encode('utf-8') if sys.version_info[0] == 2 else self.identityIdentifier)
            oprot.writeFieldEnd()
        if self.snsAccounts is not None:
            oprot.writeFieldBegin('snsAccounts', TType.MAP, 42)
            oprot.writeMapBegin(TType.I32, TType.STRING, len(self.snsAccounts))
            for kiter119, viter120 in self.snsAccounts.items():
                oprot.writeI32(kiter119)
                oprot.writeString(viter120.encode('utf-8') if sys.version_info[0] == 2 else viter120)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.phoneRegistration is not None:
            oprot.writeFieldBegin('phoneRegistration', TType.BOOL, 43)
            oprot.writeBool(self.phoneRegistration)
            oprot.writeFieldEnd()
        if self.emailConfirmationStatus is not None:
            oprot.writeFieldBegin('emailConfirmationStatus', TType.I32, 44)
            oprot.writeI32(self.emailConfirmationStatus)
            oprot.writeFieldEnd()
        if self.accountMigrationPincodeType is not None:
            oprot.writeFieldBegin('accountMigrationPincodeType', TType.I32, 45)
            oprot.writeI32(self.accountMigrationPincodeType)
            oprot.writeFieldEnd()
        if self.enforcedInputAccountMigrationPincode is not None:
            oprot.writeFieldBegin('enforcedInputAccountMigrationPincode', TType.BOOL, 46)
            oprot.writeBool(self.enforcedInputAccountMigrationPincode)
            oprot.writeFieldEnd()
        if self.securityCenterSettingsType is not None:
            oprot.writeFieldBegin('securityCenterSettingsType', TType.I32, 47)
            oprot.writeI32(self.securityCenterSettingsType)
            oprot.writeFieldEnd()
        if self.allowUnregistrationSecondaryDevice is not None:
            oprot.writeFieldBegin('allowUnregistrationSecondaryDevice', TType.BOOL, 48)
            oprot.writeBool(self.allowUnregistrationSecondaryDevice)
            oprot.writeFieldEnd()
        if self.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.I32, 60)
            oprot.writeI32(self.customModes)
            oprot.writeFieldEnd()
        if self.e2eeEnable is not None:
            oprot.writeFieldBegin('e2eeEnable', TType.BOOL, 61)
            oprot.writeBool(self.e2eeEnable)
            oprot.writeFieldEnd()
        if self.hitokotoBackupRequested is not None:
            oprot.writeFieldBegin('hitokotoBackupRequested', TType.BOOL, 62)
            oprot.writeBool(self.hitokotoBackupRequested)
            oprot.writeFieldEnd()
        if self.privacyProfileMusicPostToMyhome is not None:
            oprot.writeFieldBegin('privacyProfileMusicPostToMyhome', TType.BOOL, 63)
            oprot.writeBool(self.privacyProfileMusicPostToMyhome)
            oprot.writeFieldEnd()
        if self.privacyAllowNearby is not None:
            oprot.writeFieldBegin('privacyAllowNearby', TType.BOOL, 65)
            oprot.writeBool(self.privacyAllowNearby)
            oprot.writeFieldEnd()
        if self.agreementNearbyTime is not None:
            oprot.writeFieldBegin('agreementNearbyTime', TType.I64, 66)
            oprot.writeI64(self.agreementNearbyTime)
            oprot.writeFieldEnd()
        if self.agreementSquareTime is not None:
            oprot.writeFieldBegin('agreementSquareTime', TType.I64, 67)
            oprot.writeI64(self.agreementSquareTime)
            oprot.writeFieldEnd()
        if self.notificationMention is not None:
            oprot.writeFieldBegin('notificationMention', TType.BOOL, 68)
            oprot.writeBool(self.notificationMention)
            oprot.writeFieldEnd()
        if self.botUseAgreementAcceptedAt is not None:
            oprot.writeFieldBegin('botUseAgreementAcceptedAt', TType.I64, 69)
            oprot.writeI64(self.botUseAgreementAcceptedAt)
            oprot.writeFieldEnd()
        if self.agreementShakeFunction is not None:
            oprot.writeFieldBegin('agreementShakeFunction', TType.I64, 70)
            oprot.writeI64(self.agreementShakeFunction)
            oprot.writeFieldEnd()
        if self.agreementMobileContactName is not None:
            oprot.writeFieldBegin('agreementMobileContactName', TType.I64, 71)
            oprot.writeI64(self.agreementMobileContactName)
            oprot.writeFieldEnd()
        if self.notificationThumbnail is not None:
            oprot.writeFieldBegin('notificationThumbnail', TType.BOOL, 72)
            oprot.writeBool(self.notificationThumbnail)
            oprot.writeFieldEnd()
        if self.agreementSoundToText is not None:
            oprot.writeFieldBegin('agreementSoundToText', TType.I64, 73)
            oprot.writeI64(self.agreementSoundToText)
            oprot.writeFieldEnd()
        if self.privacyPolicyVersion is not None:
            oprot.writeFieldBegin('privacyPolicyVersion', TType.STRING, 74)
            oprot.writeString(self.privacyPolicyVersion.encode('utf-8') if sys.version_info[0] == 2 else self.privacyPolicyVersion)
            oprot.writeFieldEnd()
        if self.agreementAdByWebAccess is not None:
            oprot.writeFieldBegin('agreementAdByWebAccess', TType.I64, 75)
            oprot.writeI64(self.agreementAdByWebAccess)
            oprot.writeFieldEnd()
        if self.agreementPhoneNumberMatching is not None:
            oprot.writeFieldBegin('agreementPhoneNumberMatching', TType.I64, 76)
            oprot.writeI64(self.agreementPhoneNumberMatching)
            oprot.writeFieldEnd()
        if self.agreementCommunicationInfo is not None:
            oprot.writeFieldBegin('agreementCommunicationInfo', TType.I64, 77)
            oprot.writeI64(self.agreementCommunicationInfo)
            oprot.writeFieldEnd()
        if self.privacySharePersonalInfoToFriends is not None:
            oprot.writeFieldBegin('privacySharePersonalInfoToFriends', TType.I32, 78)
            oprot.writeI32(self.privacySharePersonalInfoToFriends)
            oprot.writeFieldEnd()
        if self.agreementThingsWirelessCommunication is not None:
            oprot.writeFieldBegin('agreementThingsWirelessCommunication', TType.I64, 79)
            oprot.writeI64(self.agreementThingsWirelessCommunication)
            oprot.writeFieldEnd()
        if self.agreementGdpr is not None:
            oprot.writeFieldBegin('agreementGdpr', TType.I64, 80)
            oprot.writeI64(self.agreementGdpr)
            oprot.writeFieldEnd()
        if self.privacyStatusMessageHistory is not None:
            oprot.writeFieldBegin('privacyStatusMessageHistory', TType.I32, 81)
            oprot.writeI32(self.privacyStatusMessageHistory)
            oprot.writeFieldEnd()
        if self.agreementProvideLocation is not None:
            oprot.writeFieldBegin('agreementProvideLocation', TType.I64, 82)
            oprot.writeI64(self.agreementProvideLocation)
            oprot.writeFieldEnd()
        if self.agreementBeacon is not None:
            oprot.writeFieldBegin('agreementBeacon', TType.I64, 83)
            oprot.writeI64(self.agreementBeacon)
            oprot.writeFieldEnd()
        if self.privacyAllowProfileHistory is not None:
            oprot.writeFieldBegin('privacyAllowProfileHistory', TType.I32, 85)
            oprot.writeI32(self.privacyAllowProfileHistory)
            oprot.writeFieldEnd()
        if self.agreementContentsSuggest is not None:
            oprot.writeFieldBegin('agreementContentsSuggest', TType.I64, 86)
            oprot.writeI64(self.agreementContentsSuggest)
            oprot.writeFieldEnd()
        if self.agreementContentsSuggestDataCollection is not None:
            oprot.writeFieldBegin('agreementContentsSuggestDataCollection', TType.I64, 87)
            oprot.writeI64(self.agreementContentsSuggestDataCollection)
            oprot.writeFieldEnd()
        if self.privacyAgeResult is not None:
            oprot.writeFieldBegin('privacyAgeResult', TType.I32, 88)
            oprot.writeI32(self.privacyAgeResult)
            oprot.writeFieldEnd()
        if self.privacyAgeResultReceived is not None:
            oprot.writeFieldBegin('privacyAgeResultReceived', TType.BOOL, 89)
            oprot.writeBool(self.privacyAgeResultReceived)
            oprot.writeFieldEnd()
        if self.agreementOcrImageCollection is not None:
            oprot.writeFieldBegin('agreementOcrImageCollection', TType.I64, 90)
            oprot.writeI64(self.agreementOcrImageCollection)
            oprot.writeFieldEnd()
        if self.privacyAllowFollow is not None:
            oprot.writeFieldBegin('privacyAllowFollow', TType.BOOL, 91)
            oprot.writeBool(self.privacyAllowFollow)
            oprot.writeFieldEnd()
        if self.privacyShowFollowList is not None:
            oprot.writeFieldBegin('privacyShowFollowList', TType.BOOL, 92)
            oprot.writeBool(self.privacyShowFollowList)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

    """


    def __init__(self, luid=None, contactType=None, contactKey=None, contact=None,):
        self.luid = luid
        self.contactType = contactType
        self.contactKey = contactKey
        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 == 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)
            elif fid == 1:
                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('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 ContactModification(object):
    """
    Attributes:
     - type
     - luid
     - phones
     - emails
     - userids
     - mobileContactName
     - phoneticName

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, 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 = []
                    (_etype124, _size121) = iprot.readListBegin()
                    for _i125 in range(_size121):
                        _elem126 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.phones.append(_elem126)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.LIST:
                    self.emails = []
                    (_etype130, _size127) = iprot.readListBegin()
                    for _i131 in range(_size127):
                        _elem132 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.emails.append(_elem132)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.LIST:
                    self.userids = []
                    (_etype136, _size133) = iprot.readListBegin()
                    for _i137 in range(_size133):
                        _elem138 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.userids.append(_elem138)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRING:
                    self.mobileContactName = 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.phoneticName = 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('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 iter139 in self.phones:
                oprot.writeString(iter139.encode('utf-8') if sys.version_info[0] == 2 else iter139)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.emails is not None:
            oprot.writeFieldBegin('emails', TType.LIST, 12)
            oprot.writeListBegin(TType.STRING, len(self.emails))
            for iter140 in self.emails:
                oprot.writeString(iter140.encode('utf-8') if sys.version_info[0] == 2 else iter140)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.userids is not None:
            oprot.writeFieldBegin('userids', TType.LIST, 13)
            oprot.writeListBegin(TType.STRING, len(self.userids))
            for iter141 in self.userids:
                oprot.writeString(iter141.encode('utf-8') if sys.version_info[0] == 2 else iter141)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.mobileContactName is not None:
            oprot.writeFieldBegin('mobileContactName', TType.STRING, 14)
            oprot.writeString(self.mobileContactName.encode('utf-8') if sys.version_info[0] == 2 else self.mobileContactName)
            oprot.writeFieldEnd()
        if self.phoneticName is not None:
            oprot.writeFieldBegin('phoneticName', TType.STRING, 15)
            oprot.writeString(self.phoneticName.encode('utf-8') if sys.version_info[0] == 2 else self.phoneticName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class InviteIntoChatResponse(object):


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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('InviteIntoChatResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.chatMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.SET:
                    self.targetUserMids = set()
                    (_etype145, _size142) = iprot.readSetBegin()
                    for _i146 in range(_size142):
                        _elem147 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.targetUserMids.add(_elem147)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('InviteIntoChatRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.chatMid is not None:
            oprot.writeFieldBegin('chatMid', TType.STRING, 2)
            oprot.writeString(self.chatMid.encode('utf-8') if sys.version_info[0] == 2 else self.chatMid)
            oprot.writeFieldEnd()
        if self.targetUserMids is not None:
            oprot.writeFieldBegin('targetUserMids', TType.SET, 3)
            oprot.writeSetBegin(TType.STRING, len(self.targetUserMids))
            for iter148 in self.targetUserMids:
                oprot.writeString(iter148.encode('utf-8') if sys.version_info[0] == 2 else iter148)
            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 DeleteSelfFromChatResponse(object):


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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DeleteSelfFromChatResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """


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

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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DeleteSelfFromChatRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.chatMid is not None:
            oprot.writeFieldBegin('chatMid', TType.STRING, 2)
            oprot.writeString(self.chatMid.encode('utf-8') if sys.version_info[0] == 2 else self.chatMid)
            oprot.writeFieldEnd()
        if self.lastSeenMessageDeliveredTime is not None:
            oprot.writeFieldBegin('lastSeenMessageDeliveredTime', TType.I64, 3)
            oprot.writeI64(self.lastSeenMessageDeliveredTime)
            oprot.writeFieldEnd()
        if self.lastSeenMessageId is not None:
            oprot.writeFieldBegin('lastSeenMessageId', TType.STRING, 4)
            oprot.writeString(self.lastSeenMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.lastSeenMessageId)
            oprot.writeFieldEnd()
        if self.lastMessageDeliveredTime is not None:
            oprot.writeFieldBegin('lastMessageDeliveredTime', TType.I64, 5)
            oprot.writeI64(self.lastMessageDeliveredTime)
            oprot.writeFieldEnd()
        if self.lastMessageId is not None:
            oprot.writeFieldBegin('lastMessageId', TType.STRING, 6)
            oprot.writeString(self.lastMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.lastMessageId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class GetAllChatMidsResponse(object):
    """
    Attributes:
     - memberChatMids
     - invitedChatMids

    """


    def __init__(self, memberChatMids=None, invitedChatMids=None,):
        self.memberChatMids = memberChatMids
        self.invitedChatMids = invitedChatMids

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, 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.memberChatMids = set()
                    (_etype152, _size149) = iprot.readSetBegin()
                    for _i153 in range(_size149):
                        _elem154 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.memberChatMids.add(_elem154)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.SET:
                    self.invitedChatMids = set()
                    (_etype158, _size155) = iprot.readSetBegin()
                    for _i159 in range(_size155):
                        _elem160 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.invitedChatMids.add(_elem160)
                    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('GetAllChatMidsResponse')
        if self.memberChatMids is not None:
            oprot.writeFieldBegin('memberChatMids', TType.SET, 1)
            oprot.writeSetBegin(TType.STRING, len(self.memberChatMids))
            for iter161 in self.memberChatMids:
                oprot.writeString(iter161.encode('utf-8') if sys.version_info[0] == 2 else iter161)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.invitedChatMids is not None:
            oprot.writeFieldBegin('invitedChatMids', TType.SET, 2)
            oprot.writeSetBegin(TType.STRING, len(self.invitedChatMids))
            for iter162 in self.invitedChatMids:
                oprot.writeString(iter162.encode('utf-8') if sys.version_info[0] == 2 else iter162)
            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 GetAllChatMidsRequest(object):
    """
    Attributes:
     - withMemberChats
     - withInvitedChats

    """


    def __init__(self, withMemberChats=None, withInvitedChats=None,):
        self.withMemberChats = withMemberChats
        self.withInvitedChats = withInvitedChats

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, 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.withMemberChats = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.withInvitedChats = 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('GetAllChatMidsRequest')
        if self.withMemberChats is not None:
            oprot.writeFieldBegin('withMemberChats', TType.BOOL, 1)
            oprot.writeBool(self.withMemberChats)
            oprot.writeFieldEnd()
        if self.withInvitedChats is not None:
            oprot.writeFieldBegin('withInvitedChats', TType.BOOL, 2)
            oprot.writeBool(self.withInvitedChats)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CreateChatResponse(object):
    """
    Attributes:
     - chat

    """


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

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

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

    def validate(self):
        return

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

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

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


class CreateChatRequest(object):
    """
    Attributes:
     - reqSeq
     - type
     - name
     - targetUserMids
     - picturePath

    """


    def __init__(self, reqSeq=None, type=None, name=None, targetUserMids=None, picturePath=None,):
        self.reqSeq = reqSeq
        self.type = type
        self.name = name
        self.targetUserMids = targetUserMids
        self.picturePath = picturePath

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, 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.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.SET:
                    self.targetUserMids = set()
                    (_etype166, _size163) = iprot.readSetBegin()
                    for _i167 in range(_size163):
                        _elem168 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.targetUserMids.add(_elem168)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.picturePath = 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('CreateChatRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            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.targetUserMids is not None:
            oprot.writeFieldBegin('targetUserMids', TType.SET, 4)
            oprot.writeSetBegin(TType.STRING, len(self.targetUserMids))
            for iter169 in self.targetUserMids:
                oprot.writeString(iter169.encode('utf-8') if sys.version_info[0] == 2 else iter169)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.picturePath is not None:
            oprot.writeFieldBegin('picturePath', TType.STRING, 5)
            oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class AcceptChatInvitationResponse(object):


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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AcceptChatInvitationResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """


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

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

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

    def validate(self):
        return

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

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

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


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

    def validate(self):
        return

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

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

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


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

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.chatMid = iprot.readString().decode('utf-8') 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('RejectChatInvitationRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.chatMid is not None:
            oprot.writeFieldBegin('chatMid', TType.STRING, 2)
            oprot.writeString(self.chatMid.encode('utf-8') if sys.version_info[0] == 2 else self.chatMid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class DeleteOtherFromChatResponse(object):


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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DeleteOtherFromChatResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.chatMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.SET:
                    self.targetUserMids = set()
                    (_etype173, _size170) = iprot.readSetBegin()
                    for _i174 in range(_size170):
                        _elem175 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.targetUserMids.add(_elem175)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DeleteOtherFromChatRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.chatMid is not None:
            oprot.writeFieldBegin('chatMid', TType.STRING, 2)
            oprot.writeString(self.chatMid.encode('utf-8') if sys.version_info[0] == 2 else self.chatMid)
            oprot.writeFieldEnd()
        if self.targetUserMids is not None:
            oprot.writeFieldBegin('targetUserMids', TType.SET, 3)
            oprot.writeSetBegin(TType.STRING, len(self.targetUserMids))
            for iter176 in self.targetUserMids:
                oprot.writeString(iter176.encode('utf-8') if sys.version_info[0] == 2 else iter176)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


class CancelChatInvitationResponse(object):


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

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CancelChatInvitationResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

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

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

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


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

    """


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

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.reqSeq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.chatMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.SET:
                    self.targetUserMids = set()
                    (_etype180, _size177) = iprot.readSetBegin()
                    for _i181 in range(_size177):
                        _elem182 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.targetUserMids.add(_elem182)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CancelChatInvitationRequest')
        if self.reqSeq is not None:
            oprot.writeFieldBegin('reqSeq', TType.I32, 1)
            oprot.writeI32(self.reqSeq)
            oprot.writeFieldEnd()
        if self.chatMid is not None:
            oprot.writeFieldBegin('chatMid', TType.STRING, 2)
            oprot.writeString(self.chatMid.encode('utf-8') if sys.version_info[0] == 2 else self.chatMid)
            oprot.writeFieldEnd()
        if self.targetUserMids is not None:
            oprot.writeFieldBegin('targetUserMids', TType.SET, 3)
            oprot.writeSetBegin(TType.STRING, len(self.targetUserMids))
            for iter183 in self.targetUserMids:
                oprot.writeString(iter183.encode('utf-8') if sys.version_info[0] == 2 else iter183)
            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 LoginSession(object):
    """
    Attributes:
     - tokenKey
     - expirationTime
     - issueTime
     - applicationType
     - systemName
     - accessLocation

    """


    def __init__(self, tokenKey=None, expirationTime=None, issueTime=None, applicationType=None, systemName=None, accessLocation=None,):
        self.tokenKey = tokenKey
        self.expirationTime = expirationTime
        self.issueTime = issueTime
        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 == 4:
                if ftype == TType.I64:
                    self.issueTime = 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.issueTime is not None:
            oprot.writeFieldBegin('issueTime', TType.I64, 4)
            oprot.writeI64(self.issueTime)
            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 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 E2EENegotiationResult(object):
    """
    Attributes:
     - allowedTypes
     - publicKey
     - specVersion

    """


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

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

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

    def validate(self):
        return

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

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

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


class 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 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 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 = []
                    (_etype194, _size191) = iprot.readListBegin()
                    for _i195 in range(_size191):
                        _elem196 = SyncParamContact()
                        _elem196.read(iprot)
                        self.syncParamContact.append(_elem196)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.syncParamMid = []
                    (_etype200, _size197) = iprot.readListBegin()
                    for _i201 in range(_size197):
                        _elem202 = SyncParamMid()
                        _elem202.read(iprot)
                        self.syncParamMid.append(_elem202)
                    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 iter203 in self.syncParamContact:
                iter203.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 iter204 in self.syncParamMid:
                iter204.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 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)
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(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(AvatarProfile)
AvatarProfile.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'version', 'UTF8', None, ),  # 1
    (2, TType.I64, 'updatedMillis', None, None, ),  # 2
)
all_structs.append(Contact)
Contact.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'mid', 'UTF8', None, ),  # 1
    (2, TType.I64, 'createdTime', None, None, ),  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (10, TType.I32, 'type', None, None, ),  # 10
    (11, TType.I32, 'status', None, None, ),  # 11
    None,  # 12
    None,  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    None,  # 20
    (21, TType.I32, 'relation', None, None, ),  # 21
    (22, TType.STRING, 'displayName', 'UTF8', None, ),  # 22
    (23, TType.STRING, 'phoneticName', 'UTF8', None, ),  # 23
    (24, TType.STRING, 'pictureStatus', 'UTF8', None, ),  # 24
    (25, TType.STRING, 'thumbnailUrl', 'UTF8', None, ),  # 25
    (26, TType.STRING, 'statusMessage', 'UTF8', None, ),  # 26
    (27, TType.STRING, 'displayNameOverridden', 'UTF8', None, ),  # 27
    (28, TType.I64, 'favoriteTime', None, None, ),  # 28
    None,  # 29
    None,  # 30
    (31, TType.BOOL, 'capableVoiceCall', None, None, ),  # 31
    (32, TType.BOOL, 'capableVideoCall', None, None, ),  # 32
    (33, TType.BOOL, 'capableMyhome', None, None, ),  # 33
    (34, TType.BOOL, 'capableBuddy', None, None, ),  # 34
    (35, TType.I32, 'attributes', None, None, ),  # 35
    (36, TType.I64, 'settings', None, None, ),  # 36
    (37, TType.STRING, 'picturePath', 'UTF8', None, ),  # 37
    (38, TType.STRING, 'recommendParams', 'UTF8', None, ),  # 38
    (39, TType.I32, 'friendRequestStatus', None, None, ),  # 39
    (40, TType.STRING, 'musicProfile', 'UTF8', None, ),  # 40
    None,  # 41
    (42, TType.STRING, 'videoProfile', 'UTF8', None, ),  # 42
    (43, TType.MAP, 'statusMessageContentMetadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 43
    (44, TType.STRUCT, 'avatarProfile', [AvatarProfile, None], None, ),  # 44
)
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(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(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', 'UTF8', None, ),  # 17
    (18, TType.MAP, 'contentMetadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 18
    (19, TType.BYTE, 'sessionId', None, None, ),  # 19
    (20, TType.LIST, 'chunks', (TType.STRING, 'UTF8', 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
    (25, TType.I32, 'appExtensionType', None, None, ),  # 25
)
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.I64, '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(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(UpdateChatResponse)
UpdateChatResponse.thrift_spec = (
)
all_structs.append(GroupExtra)
GroupExtra.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'creator', 'UTF8', None, ),  # 1
    (2, TType.BOOL, 'preventedJoinByTicket', None, None, ),  # 2
    (3, TType.STRING, 'invitationTicket', 'UTF8', None, ),  # 3
    (4, TType.MAP, 'memberMids', (TType.STRING, 'UTF8', TType.I64, None, False), None, ),  # 4
    (5, TType.MAP, 'inviteeMids', (TType.STRING, 'UTF8', TType.I64, None, False), None, ),  # 5
)
all_structs.append(PeerExtra)
PeerExtra.thrift_spec = (
)
all_structs.append(Extra)
Extra.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'groupExtra', [GroupExtra, None], None, ),  # 1
    (2, TType.STRUCT, 'peerExtra', [PeerExtra, None], None, ),  # 2
)
all_structs.append(Chat)
Chat.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'type', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.I64, 'createdTime', None, None, ),  # 3
    (4, TType.BOOL, 'notificationDisabled', None, None, ),  # 4
    (5, TType.I64, 'favoriteTimestamp', None, None, ),  # 5
    (6, TType.STRING, 'chatName', 'UTF8', None, ),  # 6
    (7, TType.STRING, 'picturePath', 'UTF8', None, ),  # 7
    (8, TType.STRUCT, 'extra', [Extra, None], None, ),  # 8
)
all_structs.append(UpdateChatRequest)
UpdateChatRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRUCT, 'chat', [Chat, None], None, ),  # 2
    (3, TType.I32, 'updatedAttribute', None, None, ),  # 3
)
all_structs.append(GetChatsResponse)
GetChatsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'chats', (TType.STRUCT, [Chat, None], False), None, ),  # 1
)
all_structs.append(GetChatsRequest)
GetChatsRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'chatMids', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.BOOL, 'withMembers', None, None, ),  # 2
    (3, TType.BOOL, 'withInvitees', None, None, ),  # 3
)
all_structs.append(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', 'UTF8', None, ),  # 4
    (5, TType.I64, 'createdTime', None, None, ),  # 5
)
all_structs.append(E2EEGroupSharedKey)
E2EEGroupSharedKey.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'keyVersion', None, None, ),  # 1
    (2, TType.I32, 'groupKeyId', None, None, ),  # 2
    (3, TType.STRING, 'creator', 'UTF8', None, ),  # 3
    (4, TType.I32, 'creatorKeyId', None, None, ),  # 4
    (5, TType.STRING, 'receiver', 'UTF8', None, ),  # 5
    (6, TType.I32, 'receiverKeyId', None, None, ),  # 6
    (7, TType.STRING, 'encryptedSharedKey', 'UTF8', None, ),  # 7
    (8, TType.SET, 'allowedTypes', (TType.I32, None, False), None, ),  # 8
    (9, TType.I32, 'specVersion', None, None, ),  # 9
)
all_structs.append(Configurations)
Configurations.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'revision', None, None, ),  # 1
    (2, TType.MAP, 'configMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 2
)
all_structs.append(Profile)
Profile.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'mid', 'UTF8', None, ),  # 1
    None,  # 2
    (3, TType.STRING, 'userid', 'UTF8', None, ),  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (10, TType.STRING, 'phone', 'UTF8', None, ),  # 10
    (11, TType.STRING, 'email', 'UTF8', None, ),  # 11
    (12, TType.STRING, 'regionCode', 'UTF8', None, ),  # 12
    None,  # 13
    None,  # 14
    None,  # 15
    None,  # 16
    None,  # 17
    None,  # 18
    None,  # 19
    (20, TType.STRING, 'displayName', 'UTF8', None, ),  # 20
    (21, TType.STRING, 'phoneticName', 'UTF8', None, ),  # 21
    (22, TType.STRING, 'pictureStatus', 'UTF8', None, ),  # 22
    (23, TType.STRING, 'thumbnailUrl', 'UTF8', None, ),  # 23
    (24, TType.STRING, 'statusMessage', 'UTF8', None, ),  # 24
    None,  # 25
    None,  # 26
    None,  # 27
    None,  # 28
    None,  # 29
    None,  # 30
    (31, TType.BOOL, 'allowSearchByUserid', None, None, ),  # 31
    (32, TType.BOOL, 'allowSearchByEmail', None, None, ),  # 32
    (33, TType.STRING, 'picturePath', 'UTF8', None, ),  # 33
    (34, TType.STRING, 'musicProfile', 'UTF8', None, ),  # 34
    (35, TType.STRING, 'videoProfile', 'UTF8', None, ),  # 35
    (36, TType.MAP, 'statusMessageContentMetadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 36
    (37, TType.STRUCT, 'avatarProfile', [AvatarProfile, None], None, ),  # 37
)
all_structs.append(VerificationSessionData)
VerificationSessionData.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'sessionId', 'UTF8', None, ),  # 1
    (2, TType.I32, 'method', None, None, ),  # 2
    (3, TType.STRING, 'callback', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'normalizedPhone', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'countryCode', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'nationalSignificantNumber', 'UTF8', None, ),  # 6
    (7, TType.LIST, 'availableVerificationMethods', (TType.I32, None, False), None, ),  # 7
    (8, TType.STRING, 'callerIdMask', 'UTF8', None, ),  # 8
)
all_structs.append(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
    (5, TType.STRING, 'webViewVersion', 'UTF8', 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(SIMInfo)
SIMInfo.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'phoneNumber', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'countryCode', 'UTF8', None, ),  # 2
)
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(Settings)
Settings.thrift_spec = (
    None,  # 0
    None,  # 1
    None,  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    None,  # 7
    None,  # 8
    None,  # 9
    (10, TType.BOOL, 'notificationEnable', None, None, ),  # 10
    (11, TType.I64, 'notificationMuteExpiration', None, None, ),  # 11
    (12, TType.BOOL, 'notificationNewMessage', None, None, ),  # 12
    (13, TType.BOOL, 'notificationGroupInvitation', None, None, ),  # 13
    (14, TType.BOOL, 'notificationShowMessage', None, None, ),  # 14
    (15, TType.BOOL, 'notificationIncomingCall', None, None, ),  # 15
    (16, TType.STRING, 'notificationSoundMessage', 'UTF8', None, ),  # 16
    (17, TType.STRING, 'notificationSoundGroup', 'UTF8', None, ),  # 17
    (18, TType.BOOL, 'notificationDisabledWithSub', None, None, ),  # 18
    (19, TType.BOOL, 'notificationPayment', None, None, ),  # 19
    (20, TType.BOOL, 'privacySyncContacts', None, None, ),  # 20
    (21, TType.BOOL, 'privacySearchByPhoneNumber', None, None, ),  # 21
    (22, TType.BOOL, 'privacySearchByUserid', None, None, ),  # 22
    (23, TType.BOOL, 'privacySearchByEmail', None, None, ),  # 23
    (24, TType.BOOL, 'privacyAllowSecondaryDeviceLogin', None, None, ),  # 24
    (25, TType.BOOL, 'privacyProfileImagePostToMyhome', None, None, ),  # 25
    (26, TType.BOOL, 'privacyReceiveMessagesFromNotFriend', None, None, ),  # 26
    (27, TType.BOOL, 'privacyAgreeUseLineCoinToPaidCall', None, None, ),  # 27
    (28, TType.BOOL, 'privacyAgreeUsePaidCall', None, None, ),  # 28
    (29, TType.BOOL, 'privacyAllowFriendRequest', None, None, ),  # 29
    (30, TType.STRING, 'contactMyTicket', 'UTF8', None, ),  # 30
    None,  # 31
    None,  # 32
    None,  # 33
    None,  # 34
    None,  # 35
    None,  # 36
    None,  # 37
    None,  # 38
    None,  # 39
    (40, TType.I32, 'identityProvider', None, None, ),  # 40
    (41, TType.STRING, 'identityIdentifier', 'UTF8', None, ),  # 41
    (42, TType.MAP, 'snsAccounts', (TType.I32, None, TType.STRING, 'UTF8', False), None, ),  # 42
    (43, TType.BOOL, 'phoneRegistration', None, None, ),  # 43
    (44, TType.I32, 'emailConfirmationStatus', None, None, ),  # 44
    (45, TType.I32, 'accountMigrationPincodeType', None, None, ),  # 45
    (46, TType.BOOL, 'enforcedInputAccountMigrationPincode', None, None, ),  # 46
    (47, TType.I32, 'securityCenterSettingsType', None, None, ),  # 47
    (48, TType.BOOL, 'allowUnregistrationSecondaryDevice', None, None, ),  # 48
    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.I32, 'customModes', None, None, ),  # 60
    (61, TType.BOOL, 'e2eeEnable', None, None, ),  # 61
    (62, TType.BOOL, 'hitokotoBackupRequested', None, None, ),  # 62
    (63, TType.BOOL, 'privacyProfileMusicPostToMyhome', None, None, ),  # 63
    None,  # 64
    (65, TType.BOOL, 'privacyAllowNearby', None, None, ),  # 65
    (66, TType.I64, 'agreementNearbyTime', None, None, ),  # 66
    (67, TType.I64, 'agreementSquareTime', None, None, ),  # 67
    (68, TType.BOOL, 'notificationMention', None, None, ),  # 68
    (69, TType.I64, 'botUseAgreementAcceptedAt', None, None, ),  # 69
    (70, TType.I64, 'agreementShakeFunction', None, None, ),  # 70
    (71, TType.I64, 'agreementMobileContactName', None, None, ),  # 71
    (72, TType.BOOL, 'notificationThumbnail', None, None, ),  # 72
    (73, TType.I64, 'agreementSoundToText', None, None, ),  # 73
    (74, TType.STRING, 'privacyPolicyVersion', 'UTF8', None, ),  # 74
    (75, TType.I64, 'agreementAdByWebAccess', None, None, ),  # 75
    (76, TType.I64, 'agreementPhoneNumberMatching', None, None, ),  # 76
    (77, TType.I64, 'agreementCommunicationInfo', None, None, ),  # 77
    (78, TType.I32, 'privacySharePersonalInfoToFriends', None, None, ),  # 78
    (79, TType.I64, 'agreementThingsWirelessCommunication', None, None, ),  # 79
    (80, TType.I64, 'agreementGdpr', None, None, ),  # 80
    (81, TType.I32, 'privacyStatusMessageHistory', None, None, ),  # 81
    (82, TType.I64, 'agreementProvideLocation', None, None, ),  # 82
    (83, TType.I64, 'agreementBeacon', None, None, ),  # 83
    None,  # 84
    (85, TType.I32, 'privacyAllowProfileHistory', None, None, ),  # 85
    (86, TType.I64, 'agreementContentsSuggest', None, None, ),  # 86
    (87, TType.I64, 'agreementContentsSuggestDataCollection', None, None, ),  # 87
    (88, TType.I32, 'privacyAgeResult', None, None, ),  # 88
    (89, TType.BOOL, 'privacyAgeResultReceived', None, None, ),  # 89
    (90, TType.I64, 'agreementOcrImageCollection', None, None, ),  # 90
    (91, TType.BOOL, 'privacyAllowFollow', None, None, ),  # 91
    (92, TType.BOOL, 'privacyShowFollowList', None, None, ),  # 92
)
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(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
    (14, TType.STRING, 'mobileContactName', 'UTF8', None, ),  # 14
    (15, TType.STRING, 'phoneticName', 'UTF8', None, ),  # 15
)
all_structs.append(InviteIntoChatResponse)
InviteIntoChatResponse.thrift_spec = (
)
all_structs.append(InviteIntoChatRequest)
InviteIntoChatRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.SET, 'targetUserMids', (TType.STRING, 'UTF8', False), None, ),  # 3
)
all_structs.append(DeleteSelfFromChatResponse)
DeleteSelfFromChatResponse.thrift_spec = (
)
all_structs.append(DeleteSelfFromChatRequest)
DeleteSelfFromChatRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.I64, 'lastSeenMessageDeliveredTime', None, None, ),  # 3
    (4, TType.STRING, 'lastSeenMessageId', 'UTF8', None, ),  # 4
    (5, TType.I64, 'lastMessageDeliveredTime', None, None, ),  # 5
    (6, TType.STRING, 'lastMessageId', 'UTF8', None, ),  # 6
)
all_structs.append(GetAllChatMidsResponse)
GetAllChatMidsResponse.thrift_spec = (
    None,  # 0
    (1, TType.SET, 'memberChatMids', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.SET, 'invitedChatMids', (TType.STRING, 'UTF8', False), None, ),  # 2
)
all_structs.append(GetAllChatMidsRequest)
GetAllChatMidsRequest.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'withMemberChats', None, None, ),  # 1
    (2, TType.BOOL, 'withInvitedChats', None, None, ),  # 2
)
all_structs.append(CreateChatResponse)
CreateChatResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'chat', [Chat, None], None, ),  # 1
)
all_structs.append(CreateChatRequest)
CreateChatRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.I32, 'type', None, None, ),  # 2
    (3, TType.STRING, 'name', 'UTF8', None, ),  # 3
    (4, TType.SET, 'targetUserMids', (TType.STRING, 'UTF8', False), None, ),  # 4
    (5, TType.STRING, 'picturePath', 'UTF8', None, ),  # 5
)
all_structs.append(AcceptChatInvitationResponse)
AcceptChatInvitationResponse.thrift_spec = (
)
all_structs.append(AcceptChatInvitationRequest)
AcceptChatInvitationRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
)
all_structs.append(RejectChatInvitationResponse)
RejectChatInvitationResponse.thrift_spec = (
)
all_structs.append(RejectChatInvitationRequest)
RejectChatInvitationRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
)
all_structs.append(DeleteOtherFromChatResponse)
DeleteOtherFromChatResponse.thrift_spec = (
)
all_structs.append(DeleteOtherFromChatRequest)
DeleteOtherFromChatRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.SET, 'targetUserMids', (TType.STRING, 'UTF8', False), None, ),  # 3
)
all_structs.append(CancelChatInvitationResponse)
CancelChatInvitationResponse.thrift_spec = (
)
all_structs.append(CancelChatInvitationRequest)
CancelChatInvitationRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'reqSeq', None, None, ),  # 1
    (2, TType.STRING, 'chatMid', 'UTF8', None, ),  # 2
    (3, TType.SET, 'targetUserMids', (TType.STRING, 'UTF8', False), None, ),  # 3
)
all_structs.append(LoginSession)
LoginSession.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'tokenKey', 'UTF8', None, ),  # 1
    None,  # 2
    (3, TType.I64, 'expirationTime', None, None, ),  # 3
    (4, TType.I64, 'issueTime', None, 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(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(E2EENegotiationResult)
E2EENegotiationResult.thrift_spec = (
    None,  # 0
    (1, TType.SET, 'allowedTypes', (TType.I32, None, False), None, ),  # 1
    (2, TType.STRUCT, 'publicKey', [E2EEPublicKey, None], None, ),  # 2
    (3, TType.I32, 'specVersion', None, None, ),  # 3
)
all_structs.append(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(SyncParamContact)
SyncParamContact.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'syncParamMid', [SyncParamMid, None], None, ),  # 1
    (2, TType.I32, 'contactStatus', None, None, ),  # 2
)
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(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
)
fix_spec(all_structs)
del all_structs
