"""File generated by TLObjects' generator. All changes will be ERASED"""
from ...tl.tlobject import TLObject


class ChangePhoneRequest(TLObject):
    constructor_id = 0x70c32edb
    subclass_of_id = 0x2da17977

    def __init__(self, phone_number, phone_code_hash, phone_code):
        """
        :param phone_number: Telegram type: "string".
        :param phone_code_hash: Telegram type: "string".
        :param phone_code: Telegram type: "string".

        :returns User: Instance of either UserEmpty, User.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.phone_number = phone_number
        self.phone_code_hash = phone_code_hash
        self.phone_code = phone_code

    def to_dict(self):
        return {
            'phone_number': self.phone_number,
            'phone_code_hash': self.phone_code_hash,
            'phone_code': self.phone_code,
        }

    def on_send(self, writer):
        writer.write_int(ChangePhoneRequest.constructor_id, signed=False)
        writer.tgwrite_string(self.phone_number)
        writer.tgwrite_string(self.phone_code_hash)
        writer.tgwrite_string(self.phone_code)

    @staticmethod
    def empty():
        return ChangePhoneRequest(None, None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class CheckUsernameRequest(TLObject):
    constructor_id = 0x2714d86c
    subclass_of_id = 0xf5b399ac

    def __init__(self, username):
        """
        :param username: Telegram type: "string".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.username = username

    def to_dict(self):
        return {
            'username': self.username,
        }

    def on_send(self, writer):
        writer.write_int(CheckUsernameRequest.constructor_id, signed=False)
        writer.tgwrite_string(self.username)

    @staticmethod
    def empty():
        return CheckUsernameRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.checkUsername#2714d86c username:string = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class ConfirmPhoneRequest(TLObject):
    constructor_id = 0x5f2178c3
    subclass_of_id = 0xf5b399ac

    def __init__(self, phone_code_hash, phone_code):
        """
        :param phone_code_hash: Telegram type: "string".
        :param phone_code: Telegram type: "string".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.phone_code_hash = phone_code_hash
        self.phone_code = phone_code

    def to_dict(self):
        return {
            'phone_code_hash': self.phone_code_hash,
            'phone_code': self.phone_code,
        }

    def on_send(self, writer):
        writer.write_int(ConfirmPhoneRequest.constructor_id, signed=False)
        writer.tgwrite_string(self.phone_code_hash)
        writer.tgwrite_string(self.phone_code)

    @staticmethod
    def empty():
        return ConfirmPhoneRequest(None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.confirmPhone#5f2178c3 phone_code_hash:string phone_code:string = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class DeleteAccountRequest(TLObject):
    constructor_id = 0x418d4e0b
    subclass_of_id = 0xf5b399ac

    def __init__(self, reason):
        """
        :param reason: Telegram type: "string".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.reason = reason

    def to_dict(self):
        return {
            'reason': self.reason,
        }

    def on_send(self, writer):
        writer.write_int(DeleteAccountRequest.constructor_id, signed=False)
        writer.tgwrite_string(self.reason)

    @staticmethod
    def empty():
        return DeleteAccountRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.deleteAccount#418d4e0b reason:string = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class GetAccountTTLRequest(TLObject):
    constructor_id = 0x8fc711d
    subclass_of_id = 0xbaa39d88

    def __init__(self):
        super().__init__()
        self.result = None
        self.content_related = True

    @staticmethod
    def to_dict():
        return {}

    def on_send(self, writer):
        writer.write_int(GetAccountTTLRequest.constructor_id, signed=False)

    @staticmethod
    def empty():
        return GetAccountTTLRequest()

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.getAccountTTL#08fc711d = AccountDaysTTL'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class GetAuthorizationsRequest(TLObject):
    constructor_id = 0xe320c158
    subclass_of_id = 0xbf5e0ff

    def __init__(self):
        super().__init__()
        self.result = None
        self.content_related = True

    @staticmethod
    def to_dict():
        return {}

    def on_send(self, writer):
        writer.write_int(GetAuthorizationsRequest.constructor_id, signed=False)

    @staticmethod
    def empty():
        return GetAuthorizationsRequest()

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.getAuthorizations#e320c158 = account.Authorizations'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class GetNotifySettingsRequest(TLObject):
    constructor_id = 0x12b3ad31
    subclass_of_id = 0xcf20c074

    def __init__(self, peer):
        """
        :param peer: Telegram type: "InputNotifyPeer".

        :returns PeerNotifySettings: Instance of either PeerNotifySettingsEmpty, PeerNotifySettings.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.peer = peer

    def to_dict(self):
        return {
            'peer': None if self.peer is None else self.peer.to_dict(),
        }

    def on_send(self, writer):
        writer.write_int(GetNotifySettingsRequest.constructor_id, signed=False)
        self.peer.on_send(writer)

    @staticmethod
    def empty():
        return GetNotifySettingsRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.getNotifySettings#12b3ad31 peer:InputNotifyPeer = PeerNotifySettings'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class GetPasswordRequest(TLObject):
    constructor_id = 0x548a30f5
    subclass_of_id = 0x53a211a3

    def __init__(self):
        super().__init__()
        self.result = None
        self.content_related = True

    @staticmethod
    def to_dict():
        return {}

    def on_send(self, writer):
        writer.write_int(GetPasswordRequest.constructor_id, signed=False)

    @staticmethod
    def empty():
        return GetPasswordRequest()

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.getPassword#548a30f5 = account.Password'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class GetPasswordSettingsRequest(TLObject):
    constructor_id = 0xbc8d11bb
    subclass_of_id = 0xd23fb078

    def __init__(self, current_password_hash):
        """
        :param current_password_hash: Telegram type: "bytes".

        :returns account.PasswordSettings: Instance of PasswordSettings.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.current_password_hash = current_password_hash

    def to_dict(self):
        return {
            'current_password_hash': self.current_password_hash,
        }

    def on_send(self, writer):
        writer.write_int(GetPasswordSettingsRequest.constructor_id, signed=False)
        writer.tgwrite_bytes(self.current_password_hash)

    @staticmethod
    def empty():
        return GetPasswordSettingsRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.getPasswordSettings#bc8d11bb current_password_hash:bytes = account.PasswordSettings'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class GetPrivacyRequest(TLObject):
    constructor_id = 0xdadbc950
    subclass_of_id = 0xb55aba82

    def __init__(self, key):
        """
        :param key: Telegram type: "InputPrivacyKey".

        :returns account.PrivacyRules: Instance of PrivacyRules.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.key = key

    def to_dict(self):
        return {
            'key': None if self.key is None else self.key.to_dict(),
        }

    def on_send(self, writer):
        writer.write_int(GetPrivacyRequest.constructor_id, signed=False)
        self.key.on_send(writer)

    @staticmethod
    def empty():
        return GetPrivacyRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class GetTmpPasswordRequest(TLObject):
    constructor_id = 0x4a82327e
    subclass_of_id = 0xb064992d

    def __init__(self, password_hash, period):
        """
        :param password_hash: Telegram type: "bytes".
        :param period: Telegram type: "int".

        :returns account.TmpPassword: Instance of TmpPassword.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.password_hash = password_hash
        self.period = period

    def to_dict(self):
        return {
            'password_hash': self.password_hash,
            'period': self.period,
        }

    def on_send(self, writer):
        writer.write_int(GetTmpPasswordRequest.constructor_id, signed=False)
        writer.tgwrite_bytes(self.password_hash)
        writer.write_int(self.period)

    @staticmethod
    def empty():
        return GetTmpPasswordRequest(None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.getTmpPassword#4a82327e password_hash:bytes period:int = account.TmpPassword'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class GetWallPapersRequest(TLObject):
    constructor_id = 0xc04cfac2
    subclass_of_id = 0x8ec35283

    def __init__(self):
        super().__init__()
        self.result = None
        self.content_related = True

    @staticmethod
    def to_dict():
        return {}

    def on_send(self, writer):
        writer.write_int(GetWallPapersRequest.constructor_id, signed=False)

    @staticmethod
    def empty():
        return GetWallPapersRequest()

    def on_response(self, reader):
        self.result = reader.tgread_vector()

    def __repr__(self):
        return 'account.getWallPapers#c04cfac2 = Vector<WallPaper>'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class RegisterDeviceRequest(TLObject):
    constructor_id = 0x637ea878
    subclass_of_id = 0xf5b399ac

    def __init__(self, token_type, token):
        """
        :param token_type: Telegram type: "int".
        :param token: Telegram type: "string".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.token_type = token_type
        self.token = token

    def to_dict(self):
        return {
            'token_type': self.token_type,
            'token': self.token,
        }

    def on_send(self, writer):
        writer.write_int(RegisterDeviceRequest.constructor_id, signed=False)
        writer.write_int(self.token_type)
        writer.tgwrite_string(self.token)

    @staticmethod
    def empty():
        return RegisterDeviceRequest(None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.registerDevice#637ea878 token_type:int token:string = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)

from ...utils import get_input_peer


class ReportPeerRequest(TLObject):
    constructor_id = 0xae189d5f
    subclass_of_id = 0xf5b399ac

    def __init__(self, peer, reason):
        """
        :param peer: Telegram type: "InputPeer".
        :param reason: Telegram type: "ReportReason".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.peer = get_input_peer(peer)
        self.reason = reason

    def to_dict(self):
        return {
            'peer': None if self.peer is None else self.peer.to_dict(),
            'reason': None if self.reason is None else self.reason.to_dict(),
        }

    def on_send(self, writer):
        writer.write_int(ReportPeerRequest.constructor_id, signed=False)
        self.peer.on_send(writer)
        self.reason.on_send(writer)

    @staticmethod
    def empty():
        return ReportPeerRequest(None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.reportPeer#ae189d5f peer:InputPeer reason:ReportReason = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class ResetAuthorizationRequest(TLObject):
    constructor_id = 0xdf77f3bc
    subclass_of_id = 0xf5b399ac

    def __init__(self, hash):
        """
        :param hash: Telegram type: "long".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.hash = hash

    def to_dict(self):
        return {
            'hash': self.hash,
        }

    def on_send(self, writer):
        writer.write_int(ResetAuthorizationRequest.constructor_id, signed=False)
        writer.write_long(self.hash)

    @staticmethod
    def empty():
        return ResetAuthorizationRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.resetAuthorization#df77f3bc hash:long = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class ResetNotifySettingsRequest(TLObject):
    constructor_id = 0xdb7e1747
    subclass_of_id = 0xf5b399ac

    def __init__(self):
        super().__init__()
        self.result = None
        self.content_related = True

    @staticmethod
    def to_dict():
        return {}

    def on_send(self, writer):
        writer.write_int(ResetNotifySettingsRequest.constructor_id, signed=False)

    @staticmethod
    def empty():
        return ResetNotifySettingsRequest()

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.resetNotifySettings#db7e1747 = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class SendChangePhoneCodeRequest(TLObject):
    constructor_id = 0x8e57deb
    subclass_of_id = 0x6ce87081

    def __init__(self, phone_number, allow_flashcall=None, current_number=None):
        """
        :param allow_flashcall: Telegram type: "true".
        :param phone_number: Telegram type: "string".
        :param current_number: Telegram type: "Bool".

        :returns auth.SentCode: Instance of SentCode.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.allow_flashcall = allow_flashcall
        self.phone_number = phone_number
        self.current_number = current_number

    def to_dict(self):
        return {
            'allow_flashcall': self.allow_flashcall,
            'phone_number': self.phone_number,
            'current_number': self.current_number,
        }

    def on_send(self, writer):
        writer.write_int(SendChangePhoneCodeRequest.constructor_id, signed=False)
        flags = 0
        flags |= (1 << 0) if self.allow_flashcall else 0
        flags |= (1 << 0) if self.current_number else 0
        writer.write_int(flags)

        writer.tgwrite_string(self.phone_number)
        if self.current_number:
            writer.tgwrite_bool(self.current_number)

    @staticmethod
    def empty():
        return SendChangePhoneCodeRequest(None, None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.sendChangePhoneCode#08e57deb flags:# allow_flashcall:flags.0?true phone_number:string current_number:flags.0?Bool = auth.SentCode'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class SendConfirmPhoneCodeRequest(TLObject):
    constructor_id = 0x1516d7bd
    subclass_of_id = 0x6ce87081

    def __init__(self, hash, allow_flashcall=None, current_number=None):
        """
        :param allow_flashcall: Telegram type: "true".
        :param hash: Telegram type: "string".
        :param current_number: Telegram type: "Bool".

        :returns auth.SentCode: Instance of SentCode.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.allow_flashcall = allow_flashcall
        self.hash = hash
        self.current_number = current_number

    def to_dict(self):
        return {
            'allow_flashcall': self.allow_flashcall,
            'hash': self.hash,
            'current_number': self.current_number,
        }

    def on_send(self, writer):
        writer.write_int(SendConfirmPhoneCodeRequest.constructor_id, signed=False)
        flags = 0
        flags |= (1 << 0) if self.allow_flashcall else 0
        flags |= (1 << 0) if self.current_number else 0
        writer.write_int(flags)

        writer.tgwrite_string(self.hash)
        if self.current_number:
            writer.tgwrite_bool(self.current_number)

    @staticmethod
    def empty():
        return SendConfirmPhoneCodeRequest(None, None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.sendConfirmPhoneCode#1516d7bd flags:# allow_flashcall:flags.0?true hash:string current_number:flags.0?Bool = auth.SentCode'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class SetAccountTTLRequest(TLObject):
    constructor_id = 0x2442485e
    subclass_of_id = 0xf5b399ac

    def __init__(self, ttl):
        """
        :param ttl: Telegram type: "AccountDaysTTL".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.ttl = ttl

    def to_dict(self):
        return {
            'ttl': None if self.ttl is None else self.ttl.to_dict(),
        }

    def on_send(self, writer):
        writer.write_int(SetAccountTTLRequest.constructor_id, signed=False)
        self.ttl.on_send(writer)

    @staticmethod
    def empty():
        return SetAccountTTLRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.setAccountTTL#2442485e ttl:AccountDaysTTL = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class SetPrivacyRequest(TLObject):
    constructor_id = 0xc9f81ce8
    subclass_of_id = 0xb55aba82

    def __init__(self, key, rules):
        """
        :param key: Telegram type: "InputPrivacyKey".
        :param rules: Telegram type: "InputPrivacyRule". Must be a list.

        :returns account.PrivacyRules: Instance of PrivacyRules.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.key = key
        self.rules = rules

    def to_dict(self):
        return {
            'key': None if self.key is None else self.key.to_dict(),
            'rules': [] if self.rules is None else [None if x is None else x.to_dict() for x in self.rules],
        }

    def on_send(self, writer):
        writer.write_int(SetPrivacyRequest.constructor_id, signed=False)
        self.key.on_send(writer)
        writer.write_int(0x1cb5c415, signed=False)  # Vector's constructor ID
        writer.write_int(len(self.rules))
        for _x in self.rules:
            _x.on_send(writer)

    @staticmethod
    def empty():
        return SetPrivacyRequest(None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector<InputPrivacyRule> = account.PrivacyRules'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class UnregisterDeviceRequest(TLObject):
    constructor_id = 0x65c55b40
    subclass_of_id = 0xf5b399ac

    def __init__(self, token_type, token):
        """
        :param token_type: Telegram type: "int".
        :param token: Telegram type: "string".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.token_type = token_type
        self.token = token

    def to_dict(self):
        return {
            'token_type': self.token_type,
            'token': self.token,
        }

    def on_send(self, writer):
        writer.write_int(UnregisterDeviceRequest.constructor_id, signed=False)
        writer.write_int(self.token_type)
        writer.tgwrite_string(self.token)

    @staticmethod
    def empty():
        return UnregisterDeviceRequest(None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.unregisterDevice#65c55b40 token_type:int token:string = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class UpdateDeviceLockedRequest(TLObject):
    constructor_id = 0x38df3532
    subclass_of_id = 0xf5b399ac

    def __init__(self, period):
        """
        :param period: Telegram type: "int".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.period = period

    def to_dict(self):
        return {
            'period': self.period,
        }

    def on_send(self, writer):
        writer.write_int(UpdateDeviceLockedRequest.constructor_id, signed=False)
        writer.write_int(self.period)

    @staticmethod
    def empty():
        return UpdateDeviceLockedRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.updateDeviceLocked#38df3532 period:int = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class UpdateNotifySettingsRequest(TLObject):
    constructor_id = 0x84be5b93
    subclass_of_id = 0xf5b399ac

    def __init__(self, peer, settings):
        """
        :param peer: Telegram type: "InputNotifyPeer".
        :param settings: Telegram type: "InputPeerNotifySettings".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.peer = peer
        self.settings = settings

    def to_dict(self):
        return {
            'peer': None if self.peer is None else self.peer.to_dict(),
            'settings': None if self.settings is None else self.settings.to_dict(),
        }

    def on_send(self, writer):
        writer.write_int(UpdateNotifySettingsRequest.constructor_id, signed=False)
        self.peer.on_send(writer)
        self.settings.on_send(writer)

    @staticmethod
    def empty():
        return UpdateNotifySettingsRequest(None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.updateNotifySettings#84be5b93 peer:InputNotifyPeer settings:InputPeerNotifySettings = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class UpdatePasswordSettingsRequest(TLObject):
    constructor_id = 0xfa7c4b86
    subclass_of_id = 0xf5b399ac

    def __init__(self, current_password_hash, new_settings):
        """
        :param current_password_hash: Telegram type: "bytes".
        :param new_settings: Telegram type: "account.PasswordInputSettings".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.current_password_hash = current_password_hash
        self.new_settings = new_settings

    def to_dict(self):
        return {
            'current_password_hash': self.current_password_hash,
            'new_settings': None if self.new_settings is None else self.new_settings.to_dict(),
        }

    def on_send(self, writer):
        writer.write_int(UpdatePasswordSettingsRequest.constructor_id, signed=False)
        writer.tgwrite_bytes(self.current_password_hash)
        self.new_settings.on_send(writer)

    @staticmethod
    def empty():
        return UpdatePasswordSettingsRequest(None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.updatePasswordSettings#fa7c4b86 current_password_hash:bytes new_settings:account.PasswordInputSettings = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class UpdateProfileRequest(TLObject):
    constructor_id = 0x78515775
    subclass_of_id = 0x2da17977

    def __init__(self, first_name=None, last_name=None, about=None):
        """
        :param first_name: Telegram type: "string".
        :param last_name: Telegram type: "string".
        :param about: Telegram type: "string".

        :returns User: Instance of either UserEmpty, User.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.first_name = first_name
        self.last_name = last_name
        self.about = about

    def to_dict(self):
        return {
            'first_name': self.first_name,
            'last_name': self.last_name,
            'about': self.about,
        }

    def on_send(self, writer):
        writer.write_int(UpdateProfileRequest.constructor_id, signed=False)
        flags = 0
        flags |= (1 << 0) if self.first_name else 0
        flags |= (1 << 1) if self.last_name else 0
        flags |= (1 << 2) if self.about else 0
        writer.write_int(flags)

        if self.first_name:
            writer.tgwrite_string(self.first_name)

        if self.last_name:
            writer.tgwrite_string(self.last_name)

        if self.about:
            writer.tgwrite_string(self.about)

    @staticmethod
    def empty():
        return UpdateProfileRequest(None, None, None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.updateProfile#78515775 flags:# first_name:flags.0?string last_name:flags.1?string about:flags.2?string = User'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class UpdateStatusRequest(TLObject):
    constructor_id = 0x6628562c
    subclass_of_id = 0xf5b399ac

    def __init__(self, offline):
        """
        :param offline: Telegram type: "Bool".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.offline = offline

    def to_dict(self):
        return {
            'offline': self.offline,
        }

    def on_send(self, writer):
        writer.write_int(UpdateStatusRequest.constructor_id, signed=False)
        writer.tgwrite_bool(self.offline)

    @staticmethod
    def empty():
        return UpdateStatusRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.updateStatus#6628562c offline:Bool = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)



class UpdateUsernameRequest(TLObject):
    constructor_id = 0x3e0bdd7c
    subclass_of_id = 0x2da17977

    def __init__(self, username):
        """
        :param username: Telegram type: "string".

        :returns User: Instance of either UserEmpty, User.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.username = username

    def to_dict(self):
        return {
            'username': self.username,
        }

    def on_send(self, writer):
        writer.write_int(UpdateUsernameRequest.constructor_id, signed=False)
        writer.tgwrite_string(self.username)

    @staticmethod
    def empty():
        return UpdateUsernameRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.updateUsername#3e0bdd7c username:string = User'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)

