from ....tl.mtproto_request import MTProtoRequest


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

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

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

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

        self.message = 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 (all attributes are 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 '(help.inviteText (ID: 0x18cb9f78) = (message={}))'.format(str(self.message))
