from ....tl.mtproto_request import MTProtoRequest


class DropTempAuthKeysRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    auth.dropTempAuthKeys#8e48a188 except_auth_keys:Vector<long> = Bool"""

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

    def __init__(self, except_auth_keys):
        """
        :param except_auth_keys: Telegram type: «long». Must be a list.

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.confirmed = True  # Confirmed by default

        self.except_auth_keys = except_auth_keys

    def on_send(self, writer):
        writer.write_int(DropTempAuthKeysRequest.constructor_id, signed=False)
        writer.write_int(0x1cb5c415, signed=False)  # Vector's constructor ID
        writer.write_int(len(self.except_auth_keys))
        for except_auth_keys_item in self.except_auth_keys:
            writer.write_long(except_auth_keys_item)

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

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

    def __repr__(self):
        return 'auth.dropTempAuthKeys#8e48a188 except_auth_keys:Vector<long> = Bool'

    def __str__(self):
        return '(auth.dropTempAuthKeys (ID: 0x8e48a188) = (except_auth_keys={}))'.format(None if not self.except_auth_keys else [str(_) for _ in self.except_auth_keys])
