1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct VZVirtualMachineConfiguration;

    unsafe impl ClassType for VZVirtualMachineConfiguration {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSCopying for VZVirtualMachineConfiguration {}

unsafe impl NSObjectProtocol for VZVirtualMachineConfiguration {}

extern_methods!(
    unsafe impl VZVirtualMachineConfiguration {
        #[cfg(feature = "VZBootLoader")]
        #[method_id(@__retain_semantics Other bootLoader)]
        pub unsafe fn bootLoader(&self) -> Option<Retained<VZBootLoader>>;

        #[cfg(feature = "VZBootLoader")]
        #[method(setBootLoader:)]
        pub unsafe fn setBootLoader(&self, boot_loader: Option<&VZBootLoader>);

        #[method(memorySize)]
        pub unsafe fn memorySize(&self) -> u64;

        #[method(setMemorySize:)]
        pub unsafe fn setMemorySize(&self, memory_size: u64);

        #[method(CPUCount)]
        pub unsafe fn CPUCount(&self) -> NSUInteger;

        #[method(setCPUCount:)]
        pub unsafe fn setCPUCount(&self, cpu_count: NSUInteger);

        #[cfg(feature = "VZPlatformConfiguration")]
        #[method_id(@__retain_semantics Other platform)]
        pub unsafe fn platform(&self) -> Retained<VZPlatformConfiguration>;

        #[cfg(feature = "VZPlatformConfiguration")]
        #[method(setPlatform:)]
        pub unsafe fn setPlatform(&self, platform: &VZPlatformConfiguration);

        #[cfg(feature = "VZAudioDeviceConfiguration")]
        #[method_id(@__retain_semantics Other audioDevices)]
        pub unsafe fn audioDevices(&self) -> Retained<NSArray<VZAudioDeviceConfiguration>>;

        #[cfg(feature = "VZAudioDeviceConfiguration")]
        #[method(setAudioDevices:)]
        pub unsafe fn setAudioDevices(&self, audio_devices: &NSArray<VZAudioDeviceConfiguration>);

        #[cfg(feature = "VZConsoleDeviceConfiguration")]
        #[method_id(@__retain_semantics Other consoleDevices)]
        pub unsafe fn consoleDevices(&self) -> Retained<NSArray<VZConsoleDeviceConfiguration>>;

        #[cfg(feature = "VZConsoleDeviceConfiguration")]
        #[method(setConsoleDevices:)]
        pub unsafe fn setConsoleDevices(
            &self,
            console_devices: &NSArray<VZConsoleDeviceConfiguration>,
        );

        #[cfg(feature = "VZDirectorySharingDeviceConfiguration")]
        #[method_id(@__retain_semantics Other directorySharingDevices)]
        pub unsafe fn directorySharingDevices(
            &self,
        ) -> Retained<NSArray<VZDirectorySharingDeviceConfiguration>>;

        #[cfg(feature = "VZDirectorySharingDeviceConfiguration")]
        #[method(setDirectorySharingDevices:)]
        pub unsafe fn setDirectorySharingDevices(
            &self,
            directory_sharing_devices: &NSArray<VZDirectorySharingDeviceConfiguration>,
        );

        #[cfg(feature = "VZEntropyDeviceConfiguration")]
        #[method_id(@__retain_semantics Other entropyDevices)]
        pub unsafe fn entropyDevices(&self) -> Retained<NSArray<VZEntropyDeviceConfiguration>>;

        #[cfg(feature = "VZEntropyDeviceConfiguration")]
        #[method(setEntropyDevices:)]
        pub unsafe fn setEntropyDevices(
            &self,
            entropy_devices: &NSArray<VZEntropyDeviceConfiguration>,
        );

        #[cfg(feature = "VZMemoryBalloonDeviceConfiguration")]
        #[method_id(@__retain_semantics Other memoryBalloonDevices)]
        pub unsafe fn memoryBalloonDevices(
            &self,
        ) -> Retained<NSArray<VZMemoryBalloonDeviceConfiguration>>;

        #[cfg(feature = "VZMemoryBalloonDeviceConfiguration")]
        #[method(setMemoryBalloonDevices:)]
        pub unsafe fn setMemoryBalloonDevices(
            &self,
            memory_balloon_devices: &NSArray<VZMemoryBalloonDeviceConfiguration>,
        );

        #[cfg(feature = "VZNetworkDeviceConfiguration")]
        #[method_id(@__retain_semantics Other networkDevices)]
        pub unsafe fn networkDevices(&self) -> Retained<NSArray<VZNetworkDeviceConfiguration>>;

        #[cfg(feature = "VZNetworkDeviceConfiguration")]
        #[method(setNetworkDevices:)]
        pub unsafe fn setNetworkDevices(
            &self,
            network_devices: &NSArray<VZNetworkDeviceConfiguration>,
        );

        #[cfg(feature = "VZSerialPortConfiguration")]
        #[method_id(@__retain_semantics Other serialPorts)]
        pub unsafe fn serialPorts(&self) -> Retained<NSArray<VZSerialPortConfiguration>>;

        #[cfg(feature = "VZSerialPortConfiguration")]
        #[method(setSerialPorts:)]
        pub unsafe fn setSerialPorts(&self, serial_ports: &NSArray<VZSerialPortConfiguration>);

        #[cfg(feature = "VZSocketDeviceConfiguration")]
        #[method_id(@__retain_semantics Other socketDevices)]
        pub unsafe fn socketDevices(&self) -> Retained<NSArray<VZSocketDeviceConfiguration>>;

        #[cfg(feature = "VZSocketDeviceConfiguration")]
        #[method(setSocketDevices:)]
        pub unsafe fn setSocketDevices(
            &self,
            socket_devices: &NSArray<VZSocketDeviceConfiguration>,
        );

        #[cfg(feature = "VZStorageDeviceConfiguration")]
        #[method_id(@__retain_semantics Other storageDevices)]
        pub unsafe fn storageDevices(&self) -> Retained<NSArray<VZStorageDeviceConfiguration>>;

        #[cfg(feature = "VZStorageDeviceConfiguration")]
        #[method(setStorageDevices:)]
        pub unsafe fn setStorageDevices(
            &self,
            storage_devices: &NSArray<VZStorageDeviceConfiguration>,
        );

        #[cfg(feature = "VZKeyboardConfiguration")]
        #[method_id(@__retain_semantics Other keyboards)]
        pub unsafe fn keyboards(&self) -> Retained<NSArray<VZKeyboardConfiguration>>;

        #[cfg(feature = "VZKeyboardConfiguration")]
        #[method(setKeyboards:)]
        pub unsafe fn setKeyboards(&self, keyboards: &NSArray<VZKeyboardConfiguration>);

        #[cfg(feature = "VZPointingDeviceConfiguration")]
        #[method_id(@__retain_semantics Other pointingDevices)]
        pub unsafe fn pointingDevices(&self) -> Retained<NSArray<VZPointingDeviceConfiguration>>;

        #[cfg(feature = "VZPointingDeviceConfiguration")]
        #[method(setPointingDevices:)]
        pub unsafe fn setPointingDevices(
            &self,
            pointing_devices: &NSArray<VZPointingDeviceConfiguration>,
        );

        #[cfg(feature = "VZGraphicsDeviceConfiguration")]
        #[method_id(@__retain_semantics Other graphicsDevices)]
        pub unsafe fn graphicsDevices(&self) -> Retained<NSArray<VZGraphicsDeviceConfiguration>>;

        #[cfg(feature = "VZGraphicsDeviceConfiguration")]
        #[method(setGraphicsDevices:)]
        pub unsafe fn setGraphicsDevices(
            &self,
            graphics_devices: &NSArray<VZGraphicsDeviceConfiguration>,
        );
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl VZVirtualMachineConfiguration {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);

extern_methods!(
    /// VZVirtualMachineConfigurationValidation
    unsafe impl VZVirtualMachineConfiguration {
        #[method(validateWithError:_)]
        pub unsafe fn validateWithError(&self) -> Result<(), Retained<NSError>>;

        #[method(validateSaveRestoreSupportWithError:_)]
        pub unsafe fn validateSaveRestoreSupportWithError(&self) -> Result<(), Retained<NSError>>;

        #[method(minimumAllowedMemorySize)]
        pub unsafe fn minimumAllowedMemorySize() -> u64;

        #[method(maximumAllowedMemorySize)]
        pub unsafe fn maximumAllowedMemorySize() -> u64;

        #[method(minimumAllowedCPUCount)]
        pub unsafe fn minimumAllowedCPUCount() -> NSUInteger;

        #[method(maximumAllowedCPUCount)]
        pub unsafe fn maximumAllowedCPUCount() -> NSUInteger;
    }
);