from ....tl.mtproto_request import MTProtoRequest


class GetFullUserRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    users.getFullUser#ca30a5b1 id:InputUser = UserFull"""

    # Telegram's constructor ID (and unique identifier) for this class
    constructor_id = 0xca30a5b1

    def __init__(self, id):
        """
        :param id: Telegram type: «InputUser».

        :returns UserFull: Instance of UserFull.
        """
        super().__init__()
        self.result = None
        self.confirmed = True  # Confirmed by default

        self.id = id

    def on_send(self, writer):
        writer.write_int(GetFullUserRequest.constructor_id, signed=False)
        self.id.on_send(writer)

    @staticmethod
    def empty():
        """Returns an "empty" instance (all attributes are None)"""
        return GetFullUserRequest(None)

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

    def __repr__(self):
        return 'users.getFullUser#ca30a5b1 id:InputUser = UserFull'

    def __str__(self):
        return '(users.getFullUser (ID: 0xca30a5b1) = (id={}))'.format(str(self.id))
