objc2_virtualization/generated/
VZMacOSConfigurationRequirements.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// VZMacOSConfigurationRequirements describes the parameter constraints required by a specific configuration of macOS.
10    ///
11    /// When a VZMacOSRestoreImage is loaded, it can be inspected to determine the configurations supported by that restore image.
12    ///
13    /// See also: VZMacHardwareModel
14    ///
15    /// See also: VZMacOSRestoreImage
16    ///
17    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzmacosconfigurationrequirements?language=objc)
18    #[unsafe(super(NSObject))]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    pub struct VZMacOSConfigurationRequirements;
21);
22
23extern_conformance!(
24    unsafe impl NSObjectProtocol for VZMacOSConfigurationRequirements {}
25);
26
27impl VZMacOSConfigurationRequirements {
28    extern_methods!(
29        #[unsafe(method(new))]
30        #[unsafe(method_family = new)]
31        pub unsafe fn new() -> Retained<Self>;
32
33        #[unsafe(method(init))]
34        #[unsafe(method_family = init)]
35        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
36
37        #[cfg(feature = "VZMacHardwareModel")]
38        /// The hardware model for this configuration.
39        ///
40        /// The hardware model can be used to configure a new virtual machine that meets the requirements.
41        /// Use VZMacPlatformConfiguration.hardwareModel to configure the Mac platform, and -[VZMacAuxiliaryStorage initCreatingStorageAtURL:hardwareModel:options:error:] to create its auxiliary storage.
42        ///
43        /// See also: VZMacPlatformConfiguration
44        ///
45        /// See also: VZMacAuxiliaryStorage
46        #[unsafe(method(hardwareModel))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn hardwareModel(&self) -> Retained<VZMacHardwareModel>;
49
50        /// The minimum supported number of CPUs for this configuration.
51        ///
52        /// A VZMacOSConfigurationRequirements object is associated with a specific VZMacOSRestoreImage object, and thus a specific macOS configuration.
53        /// This property specifies the minimum number of CPUs required by the associated macOS configuration.
54        /// Installing or running the associated configuration of macOS on a virtual machine with fewer than this number of CPUs will result in undefined behavior.
55        #[unsafe(method(minimumSupportedCPUCount))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn minimumSupportedCPUCount(&self) -> NSUInteger;
58
59        /// The minimum supported memory size for this configuration.
60        ///
61        /// A VZMacOSConfigurationRequirements object is associated with a specific VZMacOSRestoreImage object, and thus a specific macOS configuration.
62        /// This property specifies the minimum amount of memory required by the associated macOS configuration.
63        /// Installing or running the associated configuration of macOS on a virtual machine with less than this amount of memory will result in undefined behavior.
64        #[unsafe(method(minimumSupportedMemorySize))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn minimumSupportedMemorySize(&self) -> u64;
67    );
68}