"""File generated by TLObjects' generator. All changes will be ERASED""" from ...tl.tlobject import TLObject from ...tl.tlobject import TLRequest from typing import Optional, List, Union, TYPE_CHECKING import os import struct from datetime import datetime if TYPE_CHECKING: from ...tl.types import TypeCodeSettings, TypeEmailVerification, TypeInputCheckPasswordSRP from ...tl.types.account import TypePasswordInputSettings class AcceptLoginTokenRequest(TLRequest): CONSTRUCTOR_ID = 0xe894ad4d SUBCLASS_OF_ID = 0xc913c01a def __init__(self, token: bytes): """ :returns Authorization: Instance of Authorization. """ self.token = token def to_dict(self): return { '_': 'AcceptLoginTokenRequest', 'token': self.token } def _bytes(self): return b''.join(( b'M\xad\x94\xe8', self.serialize_bytes(self.token), )) @classmethod def from_reader(cls, reader): _token = reader.tgread_bytes() return cls(token=_token) class BindTempAuthKeyRequest(TLRequest): CONSTRUCTOR_ID = 0xcdd42a05 SUBCLASS_OF_ID = 0xf5b399ac def __init__(self, perm_auth_key_id: int, nonce: int, expires_at: Optional[datetime], encrypted_message: bytes): """ :returns Bool: This type has no constructors. """ self.perm_auth_key_id = perm_auth_key_id self.nonce = nonce self.expires_at = expires_at self.encrypted_message = encrypted_message def to_dict(self): return { '_': 'BindTempAuthKeyRequest', 'perm_auth_key_id': self.perm_auth_key_id, 'nonce': self.nonce, 'expires_at': self.expires_at, 'encrypted_message': self.encrypted_message } def _bytes(self): return b''.join(( b'\x05*\xd4\xcd', struct.pack('', )) @classmethod def from_reader(cls, reader): return cls() class RecoverPasswordRequest(TLRequest): CONSTRUCTOR_ID = 0x37096c70 SUBCLASS_OF_ID = 0xb9e04e39 def __init__(self, code: str, new_settings: Optional['TypePasswordInputSettings']=None): """ :returns auth.Authorization: Instance of either Authorization, AuthorizationSignUpRequired. """ self.code = code self.new_settings = new_settings def to_dict(self): return { '_': 'RecoverPasswordRequest', 'code': self.code, 'new_settings': self.new_settings.to_dict() if isinstance(self.new_settings, TLObject) else self.new_settings } def _bytes(self): return b''.join(( b'pl\t7', struct.pack('