from telethon.tl.mtproto_request import MTProtoRequest


class ChatEmpty(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    chatEmpty#9ba2d800 id:int = Chat"""

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

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

        self.id = id

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

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

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

    def __repr__(self):
        return 'chatEmpty#9ba2d800 id:int = Chat'

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