from ...tl.tlobject import TLObject


class EncryptedChatDiscarded(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    encryptedChatDiscarded#13d6dd27 id:int = EncryptedChat"""

    # Telegram's constructor (U)ID for this class
    constructor_id = 0x13d6dd27
    # Also the ID of its resulting type for fast checks
    subclass_of_id = 0x6d28a37a

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

        Constructor for EncryptedChat: Instance of either EncryptedChatEmpty, EncryptedChatWaiting, EncryptedChatRequested, EncryptedChat, EncryptedChatDiscarded.
        """
        super().__init__()

        self.id = id

    def to_dict(self):
        return {
            'id': self.id,
        }

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

    @staticmethod
    def empty():
        """Returns an "empty" instance (attributes=None)"""
        return EncryptedChatDiscarded(None)

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

    def __repr__(self):
        return 'encryptedChatDiscarded#13d6dd27 id:int = EncryptedChat'

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

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