"""File generated by TLObjects' generator. All changes will be ERASED"""
from ...tl.tlobject import TLObject
from ...utils import get_input_peer, get_input_channel, get_input_user, get_input_media
import os
import struct


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

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

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

        self.id = get_input_user(id)

    def to_dict(self, recursive=True):
        return {
            'id': (None if self.id is None else self.id.to_dict()) if recursive else self.id,
        }

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

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

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

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

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


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

    def __init__(self, id):
        """
        :param list[TLObject] id:

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

        self.id = [get_input_user(_x) for _x in id]

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

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

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

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

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

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