from ...tl.tlobject import TLObject


class BotCommand(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    botCommand#c27ac8c7 command:string description:string = BotCommand"""

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

    def __init__(self, command, description):
        """
        :param command: Telegram type: "string".
        :param description: Telegram type: "string".

        Constructor for BotCommand: Instance of BotCommand.
        """
        super().__init__()

        self.command = command
        self.description = description

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

    def on_send(self, writer):
        writer.write_int(BotCommand.constructor_id, signed=False)
        writer.tgwrite_string(self.command)
        writer.tgwrite_string(self.description)

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

    def on_response(self, reader):
        self.command = reader.tgread_string()
        self.description = reader.tgread_string()

    def __repr__(self):
        return 'botCommand#c27ac8c7 command:string description:string = BotCommand'

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

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