from ....tl.mtproto_request import MTProtoRequest


class ExportCardRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    contacts.exportCard#84e53737  = Vector<int>"""

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

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

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

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

    def on_response(self, reader):
        reader.read_int()  # Vector id
        count = reader.read_int()
        self.result = [reader.read_int() for _ in range(count)]

    def __repr__(self):
        return 'contacts.exportCard#84e53737  = Vector<int>'

    def __str__(self):
        return '(contacts.exportCard (ID: 0x84e53737) = ())'.format()
