import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _VZVirtualMachineConfiguration } from "./VZVirtualMachineConfiguration.js";
import type { _VZVirtualMachineDelegate } from "./VZVirtualMachineDelegate.js";
import type { _VZVirtualMachineStartOptions } from "./VZVirtualMachineStartOptions.js";
import type { VZVirtualMachineState } from "./VZVirtualMachineState.js";
export declare class _VZVirtualMachine extends _NSObject {
    static alloc(): _VZVirtualMachine;
    static new(): _VZVirtualMachine;
    init(): _VZVirtualMachine;
    /**
     * @abstract Indicate whether or not virtualization is available. @discussion If virtualization is unavailable, no VZVirtualMachineConfiguration will validate. The validation error of the VZVirtualMachineConfiguration provides more information about why virtualization is unavailable.
     */
    static supported(): boolean;
    /**
     * @abstract Initialize the virtual machine. @discussion This initializer uses the main queue to operate the virtual machine. Every call must be done on the main queue and the callbacks are invoked on the main queue. @param configuration The configuration of the virtual machine. The configuration must be valid. Validation can be performed at runtime with [VZVirtualMachineConfiguration validateWithError:]. The configuration is copied by the initializer.
     */
    initWithConfiguration$(configuration: _VZVirtualMachineConfiguration): _VZVirtualMachine;
    /**
     * @abstract Initialize the virtual machine. @param configuration The configuration of the virtual machine. The configuration must be valid. Validation can be performed at runtime with [VZVirtualMachineConfiguration validateWithError:]. The configuration is copied by the initializer. @param queue The serial queue on which the virtual machine operates. Every operation on the virtual machine must be done on that queue. The callbacks and delegate methods are invoked on that queue. If the queue is not serial, the behavior is undefined.
     */
    initWithConfiguration$queue$(configuration: _VZVirtualMachineConfiguration, queue: _NSObject): _VZVirtualMachine;
    /**
     * @abstract Start a virtual machine. @discussion Start a virtual machine that is in either Stopped or Error state. @param completionHandler Block called after the virtual machine has been successfully started or on error. The error parameter passed to the block is nil if the start was successful.
     */
    startWithCompletionHandler$(completionHandler: ((errorOrNil: _NSError) => void) | null): void;
    /**
     * @abstract Start a virtual machine with options. @discussion Start a virtual machine that is in either Stopped or Error state. @param options Options used to control how the virtual machine is started. @param completionHandler Block called after the virtual machine has been successfully started or on error. The error parameter passed to the block is nil if the start was successful. @seealso VZMacOSVirtualMachineStartOptions
     */
    startWithOptions$completionHandler$(options: _VZVirtualMachineStartOptions, completionHandler: ((errorOrNil: _NSError) => void) | null): void;
    /**
     * @abstract Stop a virtual machine. @discussion Stop a virtual machine that is in either Running or Paused state. @param completionHandler Block called after the virtual machine has been successfully stopped or on error. The error parameter passed to the block is nil if the stop was successful. @discussion This is a destructive operation. It stops the virtual machine without giving the guest a chance to stop cleanly. @seealso -[VZVirtualMachine requestStopWithError:]
     */
    stopWithCompletionHandler$(completionHandler: ((errorOrNil: _NSError) => void) | null): void;
    /**
     * @abstract Pause a virtual machine. @discussion Pause a virtual machine that is in Running state. @param completionHandler Block called after the virtual machine has been successfully paused or on error. The error parameter passed to the block is nil if the pause was successful.
     */
    pauseWithCompletionHandler$(completionHandler: ((errorOrNil: _NSError) => void) | null): void;
    /**
     * @abstract Resume a virtual machine. @discussion Resume a virtual machine that is in the Paused state. @param completionHandler Block called after the virtual machine has been successfully resumed or on error. The error parameter passed to the block is nil if the resumption was successful.
     */
    resumeWithCompletionHandler$(completionHandler: ((errorOrNil: _NSError) => void) | null): void;
    /**
     * @abstract Restore a virtual machine. @discussion Restore a stopped virtual machine to a state previously saved to file through `saveMachineStateToURL:completionHandler:`. If the file cannot be read, or contains otherwise invalid contents, this operation will fail with a `VZErrorRestore` error. If the virtual machine is not in the stopped state, this operation will fail with a `VZErrorInvalidVirtualMachineStateTransition` error. If the virtual machine cannot be started due to an internal error, this operation will fail with a `VZErrorInternal` error. The `VZVirtualMachineConfiguration` must also support restoring, which can be checked with `-[VZVirtualMachineConfiguration validateSaveRestoreSupportWithError:]`. If this operation fails, the virtual machine state is unchanged. If successful, the virtual machine is restored and placed in the paused state. @param saveFileURL URL to file containing saved state of a suspended virtual machine. The file must have been generated by `saveMachineStateToURL:completionHandler:` on the same host. Otherwise, this operation will fail with a `VZErrorRestore` error indicating a permission denied failure reason. The virtual machine must also be configured compatibly with the state contained in the file. If the `VZVirtualMachineConfiguration` is not compatible with the content of the file, this operation will fail with a `VZErrorRestore` error indicating an invalid argument failure reason. Files generated with `saveMachineStateToURL:completionHandler:` on a software version that is newer than the current version will also be rejected with an invalid argument failure reason. In some cases, `restoreMachineStateFromURL:completionHandler:` can fail if a software update has changed the host in a way that would be incompatible with the previous format. In this case, an invalid argument error will be surfaced. In most cases, the virtual machine should be restarted with `startWithCompletionHandler:`. @param completionHandler Block called after the virtual machine has been successfully started or on error. The error parameter passed to the block is nil if the restore was successful. @see -[VZVirtualMachineConfiguration validateSaveRestoreSupportWithError:]
     */
    restoreMachineStateFromURL$completionHandler$(saveFileURL: _NSURL, completionHandler: ((errorOrNil: _NSError) => void) | null): void;
    /**
     * @abstract Save a virtual machine. @discussion Save a paused virtual machine to file. The contents of this file can be used later to restore the state of the paused virtual machine. If the virtual machine is not paused, this operation will fail with a `VZErrorInvalidVirtualMachineState` error. If the virtual machine cannot be saved, this operation will fail with a `VZErrorSave` error. The `VZVirtualMachineConfiguration` must also support saving, which can be checked with `-[VZVirtualMachineConfiguration validateSaveRestoreSupportWithError:]`. If this operation fails, the virtual machine state is unchanged. If successful, the file is written out and the virtual machine state is unchanged. @param saveFileURL URL to location where the saved state of the virtual machine is to be written. Each file is protected by an encryption key that is tied to the host on which it is created. @param completionHandler Block called after the virtual machine has been successfully saved or on error. The error parameter passed to the block is nil if the save was successful. @see -[VZVirtualMachineConfiguration validateSaveRestoreSupportWithError:]
     */
    saveMachineStateToURL$completionHandler$(saveFileURL: _NSURL, completionHandler: ((errorOrNil: _NSError) => void) | null): void;
    /**
     * @abstract Request that the guest turns itself off. @param error If not nil, assigned with the error if the request failed. @return YES if the request was made successfully. @discussion The -[VZVirtualMachineDelegate guestDidStopVirtualMachine:] delegate method is invoked when the guest has turned itself off. @seealso -[VZVirtualMachineDelegate guestDidStopVirtualMachine:].
     */
    requestStopWithError$(error: NobjcObject | null): boolean;
    /**
     * @abstract The queue associated with this virtual machine. @discussion This property is a reference to the queue used to create the virtual machine. If no queue was passed, the default queue is the main queue. The property can be accessed from any queue or actor. Other properties or function calls on the VZVirtualMachine must happen on this queue. The completion handlers from the asynchronous functions are also invoked on this queue.
     */
    queue(): _NSObject;
    /** @abstract Execution state of the virtual machine. */
    state(): VZVirtualMachineState;
    /** @abstract The virtual machine delegate. */
    delegate(): _VZVirtualMachineDelegate | null;
    setDelegate$(value: _VZVirtualMachineDelegate | null): void;
    /**
     * @abstract Return YES if the machine is in a state that can be started. @see -[VZVirtualMachine startWithCompletionHandler:]. @see -[VZVirtualMachine state]
     */
    canStart(): boolean;
    /**
     * @abstract Return YES if the machine is in a state that can be stopped. @see -[VZVirtualMachine stopWithCompletionHandler:] @see -[VZVirtualMachine state]
     */
    canStop(): boolean;
    /**
     * @abstract Return YES if the machine is in a state that can be paused. @see -[VZVirtualMachine pauseWithCompletionHandler:] @see -[VZVirtualMachine state]
     */
    canPause(): boolean;
    /**
     * @abstract Return YES if the machine is in a state that can be resumed. @see -[VZVirtualMachine resumeWithCompletionHandler:] @see -[VZVirtualMachine state]
     */
    canResume(): boolean;
    /**
     * @abstract Returns whether the machine is in a state where the guest can be asked to stop. @see -[VZVirtualMachine requestStopWithError:] @see -[VZVirtualMachine state]
     */
    canRequestStop(): boolean;
    /**
     * @abstract Return the list of console devices configured on this virtual machine. Return an empty array if no console device is configured. @see VZVirtioConsoleDeviceConfiguration @see VZVirtualMachineConfiguration
     */
    consoleDevices(): _NSArray;
    /**
     * @abstract Return the list of directory sharing devices configured on this virtual machine. Return an empty array if no directory sharing device is configured. @see VZVirtioFileSystemDeviceConfiguration @see VZVirtualMachineConfiguration
     */
    directorySharingDevices(): _NSArray;
    /**
     * @abstract Return the list of graphics devices configured on this virtual machine. Return an empty array if no graphics device is configured. @see VZGraphicsDeviceConfiguration @see VZVirtualMachineConfiguration
     */
    graphicsDevices(): _NSArray;
    /**
     * @abstract Return the list of memory balloon devices configured on this virtual machine. Return an empty array if no memory balloon device is configured. @see VZVirtioTraditionalMemoryBalloonDeviceConfiguration @see VZVirtualMachineConfiguration
     */
    memoryBalloonDevices(): _NSArray;
    /**
     * @abstract Return the list of network devices configured on this virtual machine. Return an empty array if no network device is configured. @see VZVirtioNetworkDeviceConfiguration @see VZVirtualMachineConfiguration
     */
    networkDevices(): _NSArray;
    /**
     * @abstract Return the list of socket devices configured on this virtual machine. Return an empty array if no socket device is configured. @see VZVirtioSocketDeviceConfiguration @see VZVirtualMachineConfiguration
     */
    socketDevices(): _NSArray;
    /**
     * @abstract Return the list of USB controllers configured on this virtual machine. Return an empty array if no USB controller is configured. @see VZUSBControllerConfiguration @see VZVirtualMachineConfiguration
     */
    usbControllers(): _NSArray;
}
