"""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 TypeInputUser, TypeSecureValueError class GetFullUserRequest(TLRequest): CONSTRUCTOR_ID = 0xb60f5918 SUBCLASS_OF_ID = 0x83df9df5 def __init__(self, id: 'TypeInputUser'): """ :returns users.UserFull: Instance of UserFull. """ 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 { '_': 'GetFullUserRequest', 'id': self.id.to_dict() if isinstance(self.id, TLObject) else self.id } def _bytes(self): return b''.join(( b'\x18Y\x0f\xb6', self.id._bytes(), )) @classmethod def from_reader(cls, reader): _id = reader.tgread_object() return cls(id=_id) class GetIsPremiumRequiredToContactRequest(TLRequest): CONSTRUCTOR_ID = 0xa622aa10 SUBCLASS_OF_ID = 0x15dfc3f1 def __init__(self, id: List['TypeInputUser']): """ :returns Vector: This type has no constructors. """ self.id = id async def resolve(self, client, utils): _tmp = [] for _x in self.id: _tmp.append(utils.get_input_user(await client.get_input_entity(_x))) self.id = _tmp def to_dict(self): return { '_': 'GetIsPremiumRequiredToContactRequest', 'id': [] if self.id is None else [x.to_dict() if isinstance(x, TLObject) else x for x in self.id] } def _bytes(self): return b''.join(( b'\x10\xaa"\xa6', b'\x15\xc4\xb5\x1c',struct.pack(': This type has no constructors. """ self.id = id async def resolve(self, client, utils): _tmp = [] for _x in self.id: _tmp.append(utils.get_input_user(await client.get_input_entity(_x))) self.id = _tmp def to_dict(self): return { '_': 'GetUsersRequest', 'id': [] if self.id is None else [x.to_dict() if isinstance(x, TLObject) else x for x in self.id] } def _bytes(self): return b''.join(( b'H\xa5\x91\r', b'\x15\xc4\xb5\x1c',struct.pack('