from ...tl.tlobject import TLObject


class MessageActionChatDeleteUser(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    messageActionChatDeleteUser#b2ae9b0c user_id:int = MessageAction"""

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

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

        Constructor for MessageAction: Instance of either MessageActionEmpty, MessageActionChatCreate, MessageActionChatEditTitle, MessageActionChatEditPhoto, MessageActionChatDeletePhoto, MessageActionChatAddUser, MessageActionChatDeleteUser, MessageActionChatJoinedByLink, MessageActionChannelCreate, MessageActionChatMigrateTo, MessageActionChannelMigrateFrom, MessageActionPinMessage, MessageActionHistoryClear, MessageActionGameScore, MessageActionPaymentSentMe, MessageActionPaymentSent, MessageActionPhoneCall, MessageActionScreenshotTaken.
        """
        super().__init__()

        self.user_id = user_id

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

    def on_send(self, writer):
        writer.write_int(MessageActionChatDeleteUser.constructor_id, signed=False)
        writer.write_int(self.user_id)

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

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

    def __repr__(self):
        return 'messageActionChatDeleteUser#b2ae9b0c user_id:int = MessageAction'

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

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