import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSCopying } from "../Foundation/NSCopying.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSIndexSet } from "../Foundation/NSIndexSet.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _MLCPUComputeDevice } from "../CoreML/MLCPUComputeDevice.js";
import type { _MLComputeDeviceProtocol } from "../CoreML/MLComputeDeviceProtocol.js";
import type { _MLGPUComputeDevice } from "../CoreML/MLGPUComputeDevice.js";
import type { _MLNeuralEngineComputeDevice } from "../CoreML/MLNeuralEngineComputeDevice.js";
import type { VNComputeStage } from "./VNComputeStage.js";
export declare class _VNRequest extends _NSObject {
    static alloc(): _VNRequest;
    static new(): _VNRequest;
    /**
     * @abstract Provides the collection of currently-supported algorithm or implementation versions for the class of request. @discussion This method allows clients to introspect at runtime what capabilities are available for each class of VNRequest in the Vision framework.
     */
    static supportedRevisions(): _NSIndexSet;
    /**
     * @abstract Provides the revision of the request that was latest for the particular SDK that was linked with the client application.
     */
    static defaultRevision(): number;
    /** @abstract Provides the current revision supported by the request. */
    static currentRevision(): number;
    /** @abstract Creates a new VNRequest with no completion handler. */
    init(): _VNRequest;
    /**
     * @abstract Creates a new VNRequest with an optional completion handler. @param completionHandler The block to be invoked after the request has completed its processing. The completion handler gets executed on the same dispatch queue as the request being executed.
     */
    initWithCompletionHandler$(completionHandler: ((arg0: _VNRequest, arg1: _NSError) => void) | null): _VNRequest;
    /**
     * @discussion Tries to abort the request as soon as possible. Results will be nil. The completionHandler (if present) will be called with an error of VNErrorRequestCancelled.
     */
    cancel(): void;
    /**
     * @brief Obtain the collection of compute device per stage that are supported by the request. @discussion This method's result is based on the current state of configuration of the target request at the time of the call. @param error The address of a variable that will be populated with the error that describes the failure. If the caller does not require this information, NULL can be passed. @return A dictionary of per-stage supported compute devices, or `nil` if an error occurs.
     */
    supportedComputeStageDevicesAndReturnError$(error: NobjcObject | null): _NSDictionary | null;
    /**
     * @brief Determine what the currently configured compute device is for a specific compute stage. @param computeStage The compute stage to be introspected. @return The currently assigned compute device, or `nil` if there is no explicit assignment.
     */
    computeDeviceForComputeStage$(computeStage: VNComputeStage): _MLCPUComputeDevice | _MLGPUComputeDevice | _MLNeuralEngineComputeDevice | null;
    /**
     * @brief Assign a specific compute device for a compute stage. @discussion It is important to note that any compute device can be configured for a given compute stage. Only when the request is performed is the validity of the (compute device / compute stage) assignments checked. Valid compute devices for a request's compute stages can be obtained via `-supportedComputeStageDevicesAndReturnError:`. @param computeDevice The compute device to assign to the compute stage. Passing nil for this parameter will remove any explicit compute device assignment, allowing Vision to select which device to use. @param computeStage The compute stage being configured.
     */
    setComputeDevice$forComputeStage$(computeDevice: _MLComputeDeviceProtocol | null, computeStage: VNComputeStage): void;
    /**
     * @abstract A hint used to minimize the resource burden of the request. Memory footprint, processing footprint and/or CPU/GPU contention will be reduced (depending on the request), at the potential cost of longer execution time. This can help, for example, with ensuring UI updates and rendering are not getting blocked by Vision processing.
     */
    preferBackgroundProcessing(): boolean;
    setPreferBackgroundProcessing$(value: boolean): void;
    /**
     * @abstract This property, if set to YES, signifies that the request should be performed exclusively on the CPU and not on the GPU. The default value is NO, which signifies that the request is free to leverage the GPU to accelerate any work the request may require.
     * @deprecated -setComputeDevice:forComputeStage:
     */
    usesCPUOnly(): boolean;
    setUsesCPUOnly$(value: boolean): void;
    /**
     * @property results @abstract The collection of VNObservations generated by the processing of the request. @discussion The only valid time to access this property is after the request has been processed by a request handler. If the request failed, this property will be nil; otherwise, it will be an array of zero or more VNObservation subclasses specific to the VNRequest subclass.
     */
    results(): _NSArray | null;
    /**
     * @property completionHandler @abstract The completion handler block that will be invoked after the request has completed processing.
     */
    completionHandler(): ((arg0: _VNRequest, arg1: _NSError) => void) | null;
    /**
     * @abstract The specific algorithm or implementation revision that is to be used to perform the request.
     */
    revision(): number;
    setRevision$(value: number): void;
}
export interface _VNRequest extends _NSCopying {
}
