import type { _NSDictionary } from "./NSDictionary.js";
import type { _NSObject } from "./NSObject.js";
import type { _NSURLCredential } from "./NSURLCredential.js";
import type { _NSURLProtectionSpace } from "./NSURLProtectionSpace.js";
import type { _NSURLSessionTask } from "./NSURLSessionTask.js";
export declare class _NSURLCredentialStorage extends _NSObject {
    static alloc(): _NSURLCredentialStorage;
    static new(): _NSURLCredentialStorage;
    init(): _NSURLCredentialStorage;
    /**
     * @property sharedCredentialStorage @abstract Get the shared singleton authentication storage @result the shared authentication storage
     */
    static sharedCredentialStorage(): _NSURLCredentialStorage;
    /**
     * @method credentialsForProtectionSpace: @abstract Get a dictionary mapping usernames to credentials for the specified protection space. @param space An NSURLProtectionSpace indicating the protection space for which to get credentials @result A dictionary where the keys are usernames and the values are the corresponding NSURLCredentials.
     */
    credentialsForProtectionSpace$(space: _NSURLProtectionSpace): _NSDictionary | null;
    /**
     * @method setCredential:forProtectionSpace: @abstract Add a new credential to the set for the specified protection space or replace an existing one. @param credential The credential to set. @param space The protection space for which to add it. @discussion Multiple credentials may be set for a given protection space, but each must have a distinct user. If a credential with the same user is already set for the protection space, the new one will replace it.
     */
    setCredential$forProtectionSpace$(credential: _NSURLCredential, space: _NSURLProtectionSpace): void;
    /**
     * @method removeCredential:forProtectionSpace: @abstract Remove the credential from the set for the specified protection space. @param credential The credential to remove. @param space The protection space for which a credential should be removed @discussion The credential is removed from both persistent and temporary storage. A credential that has a persistence policy of NSURLCredentialPersistenceSynchronizable will fail. See removeCredential:forProtectionSpace:options.
     */
    removeCredential$forProtectionSpace$(credential: _NSURLCredential, space: _NSURLProtectionSpace): void;
    /**
     * @method removeCredential:forProtectionSpace:options @abstract Remove the credential from the set for the specified protection space based on options. @param credential The credential to remove. @param space The protection space for which a credential should be removed @param options A dictionary containing options to consider when removing the credential. This should be used when trying to delete a credential that has the NSURLCredentialPersistenceSynchronizable policy. Please note that when NSURLCredential objects that have a NSURLCredentialPersistenceSynchronizable policy are removed, the credential will be removed on all devices that contain this credential. @discussion The credential is removed from both persistent and temporary storage.
     */
    removeCredential$forProtectionSpace$options$(credential: _NSURLCredential, space: _NSURLProtectionSpace, options: _NSDictionary | null): void;
    /**
     * @method defaultCredentialForProtectionSpace: @abstract Get the default credential for the specified protection space. @param space The protection space for which to get the default credential.
     */
    defaultCredentialForProtectionSpace$(space: _NSURLProtectionSpace): _NSURLCredential | null;
    /**
     * @method setDefaultCredential:forProtectionSpace: @abstract Set the default credential for the specified protection space. @param credential The credential to set as default. @param space The protection space for which the credential should be set as default. @discussion If the credential is not yet in the set for the protection space, it will be added to it.
     */
    setDefaultCredential$forProtectionSpace$(credential: _NSURLCredential, space: _NSURLProtectionSpace): void;
    getCredentialsForProtectionSpace$task$completionHandler$(protectionSpace: _NSURLProtectionSpace, task: _NSURLSessionTask, completionHandler: ((credentials: _NSDictionary) => void) | null): void;
    setCredential$forProtectionSpace$task$(credential: _NSURLCredential, protectionSpace: _NSURLProtectionSpace, task: _NSURLSessionTask): void;
    removeCredential$forProtectionSpace$options$task$(credential: _NSURLCredential, protectionSpace: _NSURLProtectionSpace, options: _NSDictionary | null, task: _NSURLSessionTask): void;
    getDefaultCredentialForProtectionSpace$task$completionHandler$(space: _NSURLProtectionSpace, task: _NSURLSessionTask, completionHandler: ((credential: _NSURLCredential) => void) | null): void;
    setDefaultCredential$forProtectionSpace$task$(credential: _NSURLCredential, protectionSpace: _NSURLProtectionSpace, task: _NSURLSessionTask): void;
    /**
     * @abstract Get a dictionary mapping NSURLProtectionSpaces to dictionaries which map usernames to NSURLCredentials @result an NSDictionary where the keys are NSURLProtectionSpaces and the values are dictionaries, in which the keys are usernames and the values are NSURLCredentials
     */
    allCredentials(): _NSDictionary;
}
