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
23unsafe impl NSObjectProtocol for VZMacOSConfigurationRequirements {}
24
25impl VZMacOSConfigurationRequirements {
26 extern_methods!(
27 #[unsafe(method(new))]
28 #[unsafe(method_family = new)]
29 pub unsafe fn new() -> Retained<Self>;
30
31 #[unsafe(method(init))]
32 #[unsafe(method_family = init)]
33 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
34
35 #[cfg(feature = "VZMacHardwareModel")]
36 /// The hardware model for this configuration.
37 ///
38 /// The hardware model can be used to configure a new virtual machine that meets the requirements.
39 /// Use VZMacPlatformConfiguration.hardwareModel to configure the Mac platform, and -[VZMacAuxiliaryStorage initCreatingStorageAtURL:hardwareModel:options:error:] to create its auxiliary storage.
40 ///
41 /// See also: VZMacPlatformConfiguration
42 ///
43 /// See also: VZMacAuxiliaryStorage
44 #[unsafe(method(hardwareModel))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn hardwareModel(&self) -> Retained<VZMacHardwareModel>;
47
48 /// The minimum supported number of CPUs for this configuration.
49 ///
50 /// A VZMacOSConfigurationRequirements object is associated with a specific VZMacOSRestoreImage object, and thus a specific macOS configuration.
51 /// This property specifies the minimum number of CPUs required by the associated macOS configuration.
52 /// Installing or running the associated configuration of macOS on a virtual machine with fewer than this number of CPUs will result in undefined behavior.
53 #[unsafe(method(minimumSupportedCPUCount))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn minimumSupportedCPUCount(&self) -> NSUInteger;
56
57 /// The minimum supported memory size for this configuration.
58 ///
59 /// A VZMacOSConfigurationRequirements object is associated with a specific VZMacOSRestoreImage object, and thus a specific macOS configuration.
60 /// This property specifies the minimum amount of memory required by the associated macOS configuration.
61 /// Installing or running the associated configuration of macOS on a virtual machine with less than this amount of memory will result in undefined behavior.
62 #[unsafe(method(minimumSupportedMemorySize))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn minimumSupportedMemorySize(&self) -> u64;
65 );
66}