from ....tl.tlobject import TLObject


class InviteText(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    help.inviteText#18cb9f78 message:string = help.InviteText"""

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

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

        Constructor for help.InviteText: Instance of InviteText.
        """
        super().__init__()

        self.message = message

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

    def on_send(self, writer):
        writer.write_int(InviteText.constructor_id, signed=False)
        writer.tgwrite_string(self.message)

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

    def on_response(self, reader):
        self.message = reader.tgread_string()

    def __repr__(self):
        return 'help.inviteText#18cb9f78 message:string = help.InviteText'

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

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