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";
export declare class _NSURLProtectionSpace extends _NSObject {
    static alloc(): _NSURLProtectionSpace;
    static new(): _NSURLProtectionSpace;
    init(): _NSURLProtectionSpace;
    /**
     * @method initWithHost:port:protocol:realm:authenticationMethod: @abstract Initialize a protection space representing an origin server, or a realm on one @param host The hostname of the server @param port The port for the server @param protocol The protocol for this server - e.g. "http", "ftp", "https" @param realm A string indicating a protocol-specific subdivision of a single host. For http and https, this maps to the realm string in http authentication challenges. For many other protocols it is unused. @param authenticationMethod The authentication method to use to access this protection space - valid values include nil (default method), @"digest" and @"form". @result The initialized object.
     */
    initWithHost$port$protocol$realm$authenticationMethod$(host: _NSString, port: number, protocol: _NSString | null, realm: _NSString | null, authenticationMethod: _NSString | null): _NSURLProtectionSpace;
    /**
     * @method initWithProxyHost:port:type:realm:authenticationMethod: @abstract Initialize a protection space representing a proxy server, or a realm on one @param host The hostname of the proxy server @param port The port for the proxy server @param type The type of proxy - e.g. "http", "ftp", "SOCKS" @param realm A string indicating a protocol-specific subdivision of a single host. For http and https, this maps to the realm string in http authentication challenges. For many other protocols it is unused. @param authenticationMethod The authentication method to use to access this protection space - valid values include nil (default method) and @"digest" @result The initialized object.
     */
    initWithProxyHost$port$type$realm$authenticationMethod$(host: _NSString, port: number, type: _NSString | null, realm: _NSString | null, authenticationMethod: _NSString | null): _NSURLProtectionSpace;
    /**
     * @abstract Get the authentication realm for which the protection space that needs authentication @discussion This is generally only available for http authentication, and may be nil otherwise. @result The realm string
     */
    realm(): _NSString | null;
    /**
     * @abstract Determine if the password for this protection space can be sent securely @result YES if a secure authentication method or protocol will be used, NO otherwise
     */
    receivesCredentialSecurely(): boolean;
    /**
     * @abstract Determine if this authenticating protection space is a proxy server @result YES if a proxy, NO otherwise
     */
    isProxy(): boolean;
    /**
     * @abstract Get the proxy host if this is a proxy authentication, or the host from the URL. @result The host for this protection space.
     */
    host(): _NSString;
    /**
     * @abstract Get the proxy port if this is a proxy authentication, or the port from the URL. @result The port for this protection space, or 0 if not set.
     */
    port(): number;
    /**
     * @abstract Get the type of this protection space, if a proxy @result The type string, or nil if not a proxy.
     */
    proxyType(): _NSString | null;
    /**
     * @abstract Get the protocol of this protection space, if not a proxy @result The type string, or nil if a proxy.
     */
    protocol(): _NSString | null;
    /**
     * @abstract Get the authentication method to be used for this protection space @result The authentication method
     */
    authenticationMethod(): _NSString;
    /**
     * @abstract Returns an array of acceptable certificate issuing authorities for client certification authentication. Issuers are identified by their distinguished name and returned as a DER encoded data. @result An array of NSData objects. (Nil if the authenticationMethod is not NSURLAuthenticationMethodClientCertificate)
     */
    distinguishedNames(): _NSArray | null;
    /**
     * @abstract Returns a SecTrustRef which represents the state of the servers SSL transaction state @result A SecTrustRef from Security.framework. (Nil if the authenticationMethod is not NSURLAuthenticationMethodServerTrust)
     */
    serverTrust(): NobjcObject;
}
export interface _NSURLProtectionSpace extends _NSSecureCoding, _NSCopying {
}
