"""File generated by TLObjects' generator. All changes will be ERASED"""
from ...tl.tlobject import TLObject
from typing import Optional, List, Union, TYPE_CHECKING
import os
import struct
if TYPE_CHECKING:
    from ...tl.types import TypeInputUser



class GetFullUserRequest(TLObject):
    CONSTRUCTOR_ID = 0xca30a5b1
    SUBCLASS_OF_ID = 0x1f4661b9

    def __init__(self, id):
        """
        :param TypeInputUser id:

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

        self.id = id  # type: TypeInputUser

    def resolve(self, client, utils):
        self.id = utils.get_input_user(client.get_input_entity(self.id))

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

    def __bytes__(self):
        return b''.join((
            b'\xb1\xa50\xca',
            bytes(self.id),
        ))

    @classmethod
    def from_reader(cls, reader):
        _id = reader.tgread_object()
        return cls(id=_id)


class GetUsersRequest(TLObject):
    CONSTRUCTOR_ID = 0xd91a548
    SUBCLASS_OF_ID = 0x406da4d

    def __init__(self, id):
        """
        :param List[TypeInputUser] id:

        :returns Vector<User>: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.id = id  # type: List[TypeInputUser]

    def resolve(self, client, utils):
        self.id = [utils.get_input_user(client.get_input_entity(_x)) for _x in self.id]

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

    def __bytes__(self):
        return b''.join((
            b'H\xa5\x91\r',
            b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(bytes(x) for x in self.id),
        ))

    @classmethod
    def from_reader(cls, reader):
        reader.read_int()
        _id = []
        for _ in range(reader.read_int()):
            _x = reader.tgread_object()
            _id.append(_x)

        return cls(id=_id)

