from telethon.tl.mtproto_request import MTProtoRequest


class DisabledFeature(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    disabledFeature#ae636f24 feature:string description:string = DisabledFeature"""

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

    def __init__(self, feature, description):
        """
        :param feature: Telegram type: «string».
        :param description: Telegram type: «string».
        """
        super().__init__()

        self.feature = feature
        self.description = description

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

    @staticmethod
    def empty():
        """Returns an "empty" instance (all attributes are None)"""
        return DisabledFeature(None, None)

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

    def __repr__(self):
        return 'disabledFeature#ae636f24 feature:string description:string = DisabledFeature'

    def __str__(self):
        return '(disabledFeature (ID: 0xae636f24) = (feature={}, description={}))'.format(str(self.feature), str(self.description))
