from telethon.tl.mtproto_request import MTProtoRequest


class PhotoSizeEmpty(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    photoSizeEmpty#0e17e23c type:string = PhotoSize"""

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

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

        self.type = type

    def on_send(self, writer):
        writer.write_int(PhotoSizeEmpty.constructor_id, signed=False)
        writer.tgwrite_string(self.type)

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

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

    def __repr__(self):
        return 'photoSizeEmpty#0e17e23c type:string = PhotoSize'

    def __str__(self):
        return '(photoSizeEmpty (ID: 0xe17e23c) = (type={}))'.format(str(self.type))
