from telethon.tl.mtproto_request import MTProtoRequest


class InputPeerChat(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    inputPeerChat#179be863 chat_id:int = InputPeer"""

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

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

        self.chat_id = chat_id

    def on_send(self, writer):
        writer.write_int(InputPeerChat.constructor_id, signed=False)
        writer.write_int(self.chat_id)

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

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

    def __repr__(self):
        return 'inputPeerChat#179be863 chat_id:int = InputPeer'

    def __str__(self):
        return '(inputPeerChat (ID: 0x179be863) = (chat_id={}))'.format(str(self.chat_id))
