import type { NobjcObject } from "objc-js";
import type { _NSArray } from "./NSArray.js";
import type { _NSCopying } from "./NSCopying.js";
import type { _NSObject } from "./NSObject.js";
import type { _NSSecureCoding } from "./NSSecureCoding.js";
import type { _NSString } from "./NSString.js";
import type { NSURLCredentialPersistence } from "./NSURLCredentialPersistence.js";
export declare class _NSURLCredential extends _NSObject {
    static alloc(): _NSURLCredential;
    static new(): _NSURLCredential;
    init(): _NSURLCredential;
    /**
     * @method credentialWithUser:password:persistence: @abstract Create a new NSURLCredential with a user and password @param user the username @param password the password @param persistence enum that says to store per session, permanently or not at all @result The new autoreleased NSURLCredential
     */
    static credentialWithUser$password$persistence$(user: _NSString, password: _NSString, persistence: NSURLCredentialPersistence): _NSURLCredential;
    /**
     * @method credentialWithIdentity:certificates:persistence: @abstract Create a new NSURLCredential with an identity and certificate array @param identity a SecIdentityRef object @param certArray an array containing at least one SecCertificateRef objects @param persistence enum that says to store per session, permanently or not at all @result The new autoreleased NSURLCredential
     */
    static credentialWithIdentity$certificates$persistence$(identity: Uint8Array, certArray: _NSArray | null, persistence: NSURLCredentialPersistence): _NSURLCredential;
    /**
     * @method credentialForTrust: @abstract Create a new NSURLCredential which specifies that a handshake has been trusted. @result The new autoreleased NSURLCredential
     */
    static credentialForTrust$(trust: Uint8Array): _NSURLCredential;
    /**
     * @method initWithUser:password:persistence: @abstract Initialize a NSURLCredential with a user and password @param user the username @param password the password @param persistence enum that says to store per session, permanently or not at all @result The initialized NSURLCredential
     */
    initWithUser$password$persistence$(user: _NSString, password: _NSString, persistence: NSURLCredentialPersistence): _NSURLCredential;
    /**
     * @method initWithIdentity:certificates:persistence: @abstract Initialize an NSURLCredential with an identity and array of at least 1 client certificates (SecCertificateRef) @param identity a SecIdentityRef object @param certArray an array containing at least one SecCertificateRef objects @param persistence enum that says to store per session, permanently or not at all @result the Initialized NSURLCredential
     */
    initWithIdentity$certificates$persistence$(identity: Uint8Array, certArray: _NSArray | null, persistence: NSURLCredentialPersistence): _NSURLCredential;
    /**
     * @method initWithTrust: @abstract Initialize a new NSURLCredential which specifies that the specified trust has been accepted. @result the Initialized NSURLCredential
     */
    initWithTrust$(trust: Uint8Array): _NSURLCredential;
    /**
     * @abstract Determine whether this credential is or should be stored persistently @result A value indicating whether this credential is stored permanently, per session or not at all.
     */
    persistence(): NSURLCredentialPersistence;
    /** @abstract Get the username @result The user string */
    user(): _NSString | null;
    /**
     * @abstract Get the password @result The password string @discussion This method might actually attempt to retrieve the password from an external store, possible resulting in prompting, so do not call it unless needed.
     */
    password(): _NSString | null;
    /**
     * @abstract Find out if this credential has a password, without trying to get it @result YES if this credential has a password, otherwise NO @discussion If this credential's password is actually kept in an external store, the password method may return nil even if this method returns YES, since getting the password may fail, or the user may refuse access.
     */
    hasPassword(): boolean;
    /**
     * @abstract Returns the SecIdentityRef of this credential, if it was created with a certificate and identity @result A SecIdentityRef or NULL if this is a username/password credential
     */
    identity(): NobjcObject;
    /**
     * @abstract Returns an NSArray of SecCertificateRef objects representing the client certificate for this credential, if this credential was created with an identity and certificate. @result an NSArray of SecCertificateRef or NULL if this is a username/password credential
     */
    certificates(): _NSArray;
}
export interface _NSURLCredential extends _NSSecureCoding, _NSCopying {
}
