from ....tl.mtproto_request import MTProtoRequest


class GetSavedInfoRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    payments.getSavedInfo#227d824b = payments.SavedInfo"""

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

    def __init__(self):
        super().__init__()
        self.result = None
        self.confirmed = True  # Confirmed by default

    @staticmethod
    def to_dict():
        return {}

    def on_send(self, writer):
        writer.write_int(GetSavedInfoRequest.constructor_id, signed=False)

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

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'payments.getSavedInfo#227d824b = payments.SavedInfo'

    def __str__(self):
        return '(payments.getSavedInfo (ID: 0x227d824b) = ())'.format()
