from telethon.tl.mtproto_request import MTProtoRequest


class DocumentEmpty(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    documentEmpty#36f8c871 id:long = Document"""

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

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

        self.id = id

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

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

    def on_response(self, reader):
        self.id = reader.read_long()

    def __repr__(self):
        return 'documentEmpty#36f8c871 id:long = Document'

    def __str__(self):
        return '(documentEmpty (ID: 0x36f8c871) = (id={}))'.format(str(self.id))
