"""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 TypeInputContact, TypeInputGeoPoint, TypeInputPeer, TypeInputUser, TypeTopPeerCategory class AcceptContactRequest(TLRequest): CONSTRUCTOR_ID = 0xf831a20f SUBCLASS_OF_ID = 0x8af52aac def __init__(self, id: 'TypeInputUser'): """ :returns Updates: Instance of either UpdatesTooLong, UpdateShortMessage, UpdateShortChatMessage, UpdateShort, UpdatesCombined, Updates, UpdateShortSentMessage. """ self.id = id async def resolve(self, client, utils): self.id = utils.get_input_user(await client.get_input_entity(self.id)) def to_dict(self): return { '_': 'AcceptContactRequest', 'id': self.id.to_dict() if isinstance(self.id, TLObject) else self.id } def _bytes(self): return b''.join(( b'\x0f\xa21\xf8', self.id._bytes(), )) @classmethod def from_reader(cls, reader): _id = reader.tgread_object() return cls(id=_id) class AddContactRequest(TLRequest): CONSTRUCTOR_ID = 0xe8f463d0 SUBCLASS_OF_ID = 0x8af52aac def __init__(self, id: 'TypeInputUser', first_name: str, last_name: str, phone: str, add_phone_privacy_exception: Optional[bool]=None): """ :returns Updates: Instance of either UpdatesTooLong, UpdateShortMessage, UpdateShortChatMessage, UpdateShort, UpdatesCombined, Updates, UpdateShortSentMessage. """ self.id = id self.first_name = first_name self.last_name = last_name self.phone = phone self.add_phone_privacy_exception = add_phone_privacy_exception async def resolve(self, client, utils): self.id = utils.get_input_user(await client.get_input_entity(self.id)) def to_dict(self): return { '_': 'AddContactRequest', 'id': self.id.to_dict() if isinstance(self.id, TLObject) else self.id, 'first_name': self.first_name, 'last_name': self.last_name, 'phone': self.phone, 'add_phone_privacy_exception': self.add_phone_privacy_exception } def _bytes(self): return b''.join(( b'\xd0c\xf4\xe8', struct.pack(': This type has no constructors. """ self.hash = hash def to_dict(self): return { '_': 'GetContactIDsRequest', 'hash': self.hash } def _bytes(self): return b''.join(( b'\x9df\xdcz', struct.pack('