import type { NobjcObject } from "objc-js";
import type { _NSDate } from "../Foundation/NSDate.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NEVPNManager } from "./NEVPNManager.js";
import type { NEVPNStatus } from "./NEVPNStatus.js";
export declare class _NEVPNConnection extends _NSObject {
    static alloc(): _NEVPNConnection;
    static new(): _NEVPNConnection;
    init(): _NEVPNConnection;
    /**
     * @method startVPNTunnelAndReturnError: @discussion This function is used to start the VPN tunnel using the current VPN configuration. The VPN tunnel connection process is started and this function returns immediately. @param error If the VPN tunnel was started successfully, this parameter is set to nil. Otherwise this parameter is set to the error that occurred. Possible errors include: 1. NEVPNErrorConfigurationInvalid 2. NEVPNErrorConfigurationDisabled @return YES if the VPN tunnel was started successfully, NO if an error occurred.
     */
    startVPNTunnelAndReturnError$(error: NobjcObject | null): boolean;
    /**
     * @method startVPNTunnelWithOptions:andReturnError: @discussion This function is used to start the VPN tunnel using the current VPN configuration. The VPN tunnel connection process is started and this function returns immediately. @param options A dictionary that will be passed to the tunnel provider during the process of starting the tunnel. If not nil, 'options' is an NSDictionary may contain the following keys NEVPNConnectionStartOptionUsername NEVPNConnectionStartOptionPassword @param error If the VPN tunnel was started successfully, this parameter is set to nil. Otherwise this parameter is set to the error that occurred. Possible errors include: 1. NEVPNErrorConfigurationInvalid 2. NEVPNErrorConfigurationDisabled @return YES if the VPN tunnel was started successfully, NO if an error occurred.
     */
    startVPNTunnelWithOptions$andReturnError$(options: _NSDictionary | null, error: NobjcObject | null): boolean;
    /**
     * @method stopVPNTunnel: @discussion This function is used to stop the VPN tunnel. The VPN tunnel disconnect process is started and this function returns immediately.
     */
    stopVPNTunnel(): void;
    /**
     * @method fetchLastDisconnectErrorWithCompletionHandler: @discussion Retrive the most recent error that caused the VPN to disconnect. If the error was generated by the VPN system (including the IPsec client) then the error will be in the NEVPNConnectionErrorDomain error domain. If the error was generated by a tunnel provider app extension then the error will be the NSError that the provider passed when disconnecting the tunnel. @param handler A block which takes an optional NSError that will be called when the error is obtained.
     */
    fetchLastDisconnectErrorWithCompletionHandler$(handler: ((arg0: _NSError) => void) | null): void;
    /** @property status @discussion The current status of the VPN. */
    status(): NEVPNStatus;
    /**
     * @property connectedDate @discussion The date and time when the connection status changed to NEVPNStatusConnected. This property is nil if the connection is not fully established.
     */
    connectedDate(): _NSDate;
    /**
     * @property manager @discussion The NEVPNManager associated with this NEVPNConnection.
     */
    manager(): _NEVPNManager;
}
