vim_rs 0.4.4

Rust Bindings for the VMware by Broadcom vCenter VI JSON API
Documentation
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
use std::sync::Arc;
use crate::core::client::{VimClient, Result};
/// This managed object consolidates vSAN Health APIs that operate on a single
/// ESXi host, i.e., the APIs in this Managed Object do not correlate health
/// among multiple nodes in a vSAN cluster.
/// 
/// Typically this level is not very
/// useful for direct user consumption, and the cluster level APIs should be used
/// instead. The cluster level APIs build upon the APIs in this Managed Object.
/// All information retrieved is as seen by this host, which under network
/// partitions is not the global view.  
/// The ManagedEntity can be accessed with MOID of 'ha-vsan-health-system',
/// through vSAN service at at ESXi host side.
#[derive(Clone)]
pub struct HostVsanHealthSystem {
    client: Arc<dyn VimClient>,
    mo_id: String,
}
impl HostVsanHealthSystem {
    pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self {
        Self {
            client,
            mo_id: mo_id.to_string(),
        }
    }
    /// Check CLOMD liveness on vSAN host.
    /// 
    /// It returns True only if CLOMD is alive,
    /// otherwise it throws *VsanFault*. It never returns False.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Errors:
    ///
    /// ***VsanFault***: when CLOMD is not alive.
    pub async fn vsan_host_clomd_liveness(&self) -> Result<bool> {
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostClomdLiveness", None).await?;
        let result: bool = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Deprecated as of vSphere API 6.7.
    /// 
    /// Cleanup the VMDK load test.
    /// 
    /// It will delete the created test VMDKs during this
    /// test.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### runname
    /// The name for this VMDK load test
    ///
    /// ### specs
    /// The VMDK load test spec list each of which includes
    /// the VMDK creation spec and IO load test spec.
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_cleanup_vmdk_load_test(&self, runname: &str, specs: Option<&[crate::types::structs::VsanVmdkLoadTestSpec]>) -> Result<String> {
        let input = VsanHostCleanupVmdkLoadTestRequestType {runname, specs, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostCleanupVmdkLoadTest", Some(&input)).await?;
        let result: String = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Perform VM creation test on localhost.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### timeout
    /// time out for the creation of VM
    ///
    /// ## Returns:
    ///
    /// summarized creation vm test result on the host
    ///
    /// ## Errors:
    ///
    /// ***VsanFault***:
    pub async fn vsan_host_create_vm_health_test(&self, timeout: i32) -> Result<crate::types::structs::VsanHostCreateVmHealthTestResult> {
        let input = VsanHostCreateVmHealthTestRequestType {timeout, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostCreateVmHealthTest", Some(&input)).await?;
        let result: crate::types::structs::VsanHostCreateVmHealthTestResult = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Deprecated as of vSphere API 8.0.
    /// 
    /// Perform a SCSI controller firmware upgrade.
    /// 
    /// Pre-requisites:
    /// - Host must be in maintenance mode to ensure vSAN is in a stable
    ///   quiesced state
    /// - The vendor tools required to perform the firmware upgrade must
    ///   have been installed
    ///   
    /// ***Required privileges:*** Host.Config.Storage
    ///
    /// ## Parameters:
    ///
    /// ### spec
    /// Firmware update specification.
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_flash_scsi_controller_firmware_task(&self, spec: &crate::types::structs::VsanHclFirmwareUpdateSpec) -> Result<crate::types::structs::ManagedObjectReference> {
        let input = VsanFlashScsiControllerFirmwareRequestType {spec, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanFlashScsiControllerFirmware_Task", Some(&input)).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Fetch HCL information about all devices in use by vSAN.
    /// 
    /// Currently covers SCSI controllers.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### include_vendor_info
    /// Include vendor tool controller raw info in the result
    ///
    /// ### vsan_esa_eligible_disks_only
    /// True indicates the query is only for
    /// vSAN ESA eligible disks. Other details of
    /// physical NICs or compute resources will not
    /// be returned.
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_get_hcl_info(&self, include_vendor_info: Option<bool>, vsan_esa_eligible_disks_only: Option<bool>) -> Result<crate::types::structs::VsanHostHclInfo> {
        let input = VsanGetHclInfoRequestType {include_vendor_info, vsan_esa_eligible_disks_only, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanGetHclInfo", Some(&input)).await?;
        let result: crate::types::structs::VsanHostHclInfo = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query the network related information of the host for health check.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Returns:
    ///
    /// The network diagnostics information.
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_get_network_diagnostics_health_info(&self) -> Result<crate::types::structs::VsanNetworkDiagnosticsHealthInfo> {
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanGetNetworkDiagnosticsHealthInfo", None).await?;
        let result: crate::types::structs::VsanNetworkDiagnosticsHealthInfo = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Retrieve information of proactive rebalance on this host
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Returns:
    ///
    /// The current proactive rebalance information
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_get_proactive_rebalance_info(&self) -> Result<crate::types::structs::VsanProactiveRebalanceInfoEx> {
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanGetProactiveRebalanceInfo", None).await?;
        let result: crate::types::structs::VsanProactiveRebalanceInfoEx = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Deprecated as of vSphere API 6.7.
    /// 
    /// Prepare the VMDK load test.
    /// 
    /// It will create VMDKs on the host according to the
    /// VMDK creation spec given in the specs parameter.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### runname
    /// The name for this VMDK load test
    ///
    /// ### specs
    /// The VMDK load test spec list each of which includes
    /// the VMDK creation spec and IO load test spec
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_prepare_vmdk_load_test(&self, runname: &str, specs: &[crate::types::structs::VsanVmdkLoadTestSpec]) -> Result<String> {
        let input = VsanHostPrepareVmdkLoadTestRequestType {runname, specs, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostPrepareVmdkLoadTest", Some(&input)).await?;
        let result: String = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query advanced configuration on host
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### options
    /// list of path for the configuration name
    /// for example: \[VSAN.VsanSparseCacheThreshold, VSAN.ClomRepairDelay, VSAN.ClomRebalanceThreshold, VSAN.DomLongOpTraceMS...\]
    ///
    /// ### include_all_adv_options
    /// Flag to check for all possible config options.
    /// If set to True the options parameter is ignored.
    ///
    /// ### non_default_only
    /// Flag to return only options with non-default values.
    ///
    /// ## Returns:
    ///
    /// list of key value pair of the querying options &lt;Option: configValue&gt;
    /// for example:&lt;'VSAN.VsanSparseCacheThreshold':1&gt;, &lt;'VSAN.ClomRepairDelay':60&gt;...
    /// Allow to return empty list.
    ///
    /// ## Errors:
    ///
    /// ***NotFound***: the path is not found
    pub async fn vsan_host_query_adv_cfg(&self, options: &[String], include_all_adv_options: Option<bool>, non_default_only: Option<bool>) -> Result<Option<Vec<Box<dyn crate::types::traits::OptionValueTrait>>>> {
        let input = VsanHostQueryAdvCfgRequestType {options, include_all_adv_options, non_default_only, };
        let bytes_opt = self.client.invoke_optional("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryAdvCfg", Some(&input)).await?;
        match bytes_opt {
            Some(ref b) => Ok(Some(crate::core::client::unmarshal_array(self.client.transport(), b)?)),
            None => Ok(None),
        }
    }
    /// Determines limit health, i.e.
    /// 
    /// if any system resources (free disk space, vSAN component
    /// counts, etc.) are exhausted, or would be exhausted after simulated failures. All
    /// information is as seen by this host, which under network partitions is not the global
    /// view.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### spec
    /// Please refer to *VsanHostQueryCheckLimitsSpec* for more details.
    ///
    /// ## Returns:
    ///
    /// Summarized limit health as seen by this host
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_query_check_limits(&self, spec: Option<&crate::types::structs::VsanHostQueryCheckLimitsSpec>) -> Result<crate::types::structs::VsanLimitHealthResult> {
        let input = VsanHostQueryCheckLimitsRequestType {spec, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryCheckLimits", Some(&input)).await?;
        let result: crate::types::structs::VsanLimitHealthResult = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query the encryption health summary on the host.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Returns:
    ///
    /// The encryption health summary result
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_query_encryption_health_summary(&self) -> Result<crate::types::structs::VsanEncryptionHealthSummary> {
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryEncryptionHealthSummary", None).await?;
        let result: crate::types::structs::VsanEncryptionHealthSummary = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query the file service health summary on the host.
    /// 
    /// It will include
    /// infra health at least.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Returns:
    ///
    /// The file service health summary result.
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_query_file_service_health_summary(&self) -> Result<crate::types::structs::VsanFileServiceHealthSummary> {
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryFileServiceHealthSummary", None).await?;
        let result: crate::types::structs::VsanFileServiceHealthSummary = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query the host's maintenance mode and vSAN node decommission state.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Returns:
    ///
    /// the summary including if host is in MM and node decommission state on this host.
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_query_host_emm_state(&self) -> Result<crate::types::structs::VsanHostEmmSummary> {
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanQueryHostEMMState", None).await?;
        let result: crate::types::structs::VsanHostEmmSummary = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query host info by host uuid.
    /// 
    /// Multiple vSAN Host UUIDs may be passed in.
    /// If a uuid can't be resolved, it is still included in the result set, but without
    /// any additional information given.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### uuids
    /// List of vSAN Host/Node UUIDs
    ///
    /// ## Returns:
    ///
    /// The hosts information for the given vSAN host/node UUIDs
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_query_host_info_by_uuids(&self, uuids: &[String]) -> Result<Vec<crate::types::structs::VsanQueryResultHostInfo>> {
        let input = VsanHostQueryHostInfoByUuidsRequestType {uuids, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryHostInfoByUuids", Some(&input)).await?;
        let result: Vec<crate::types::structs::VsanQueryResultHostInfo> = crate::core::client::unmarshal_array(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query the object health status
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### obj_uuids
    /// The DOM object UUID list to be queried.
    /// None to query all of objects
    ///
    /// ### include_obj_uuids
    /// True to include the object UUID list
    /// in the returned list and default is False
    ///
    /// ### local_host_only
    /// True to only query the objects owned by the host
    /// and default is False
    ///
    /// ### include_non_compliance_obj_detail
    /// True to include all of non-compliant objects
    /// detail information. The default is False
    ///
    /// ### spec
    /// The additional query spec for object health.
    /// If the object health version is v2 *VsanObjectHealthVersion_enum*,
    /// it will try to convert v1 to v2 if not all of host can
    /// support the new object health version.
    /// If the object health version is unknown, it will always
    /// try to return the v2 object health version if all hosts support
    /// or return v1 if it doesn't
    ///
    /// ## Returns:
    ///
    /// The object health status query result
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_query_object_health_summary(&self, obj_uuids: Option<&[String]>, include_obj_uuids: Option<bool>, local_host_only: Option<bool>, include_non_compliance_obj_detail: Option<bool>, spec: Option<&crate::types::structs::VsanHealthQuerySpec>) -> Result<crate::types::structs::VsanObjectOverallHealth> {
        let input = VsanHostQueryObjectHealthSummaryRequestType {obj_uuids, include_obj_uuids, local_host_only, include_non_compliance_obj_detail, spec, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryObjectHealthSummary", Some(&input)).await?;
        let result: crate::types::structs::VsanObjectOverallHealth = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query the physical disks health summary on the host
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Returns:
    ///
    /// The physical disks health summary result
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_query_physical_disk_health_summary(&self) -> Result<crate::types::structs::VsanPhysicalDiskHealthSummary> {
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryPhysicalDiskHealthSummary", None).await?;
        let result: crate::types::structs::VsanPhysicalDiskHealthSummary = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Run the network performance test client side program to act as the
    /// sender to send the packet to each of receiver.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### multicast
    /// True to test mutlicast network performance.
    /// False to test unicast network performance.
    ///
    /// ### server_ip
    /// The server IP binding to in the test
    ///
    /// ### duration_sec
    /// The duration of the network performance test.
    /// Default is 15 seconds if not set.
    ///
    /// ### spec
    /// The additional query spec for iperf client.
    ///
    /// ## Returns:
    ///
    /// The network performance test result
    ///
    /// ## Errors:
    ///
    /// ***NotFound***: If the host can not be contacted to perform
    /// the operation.
    /// 
    /// ***NotSupported***: If run multicast in vSphere 6.7 above
    /// version.
    pub async fn vsan_host_query_run_iperf_client(&self, multicast: bool, server_ip: &str, duration_sec: Option<i32>, spec: Option<&crate::types::structs::VsanIperfClientSpec>) -> Result<crate::types::structs::VsanNetworkLoadTestResult> {
        let input = VsanHostQueryRunIperfClientRequestType {multicast, server_ip, duration_sec, spec, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryRunIperfClient", Some(&input)).await?;
        let result: crate::types::structs::VsanNetworkLoadTestResult = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Run the network performance test server side program to act as the
    /// receiver to receive the packet from sender.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### multicast
    /// True to test mutlicast network performance.
    /// False to test unicast network performance.
    ///
    /// ### server_ip
    /// The server IP binding to in the test
    ///
    /// ### duration_sec
    /// The duration of the network performance test.
    /// Default is 15 seconds if not set.
    ///
    /// ## Returns:
    ///
    /// The network performance test result
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_query_run_iperf_server(&self, multicast: bool, server_ip: Option<&str>, duration_sec: Option<i32>) -> Result<crate::types::structs::VsanNetworkLoadTestResult> {
        let input = VsanHostQueryRunIperfServerRequestType {multicast, server_ip, duration_sec, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryRunIperfServer", Some(&input)).await?;
        let result: crate::types::structs::VsanNetworkLoadTestResult = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query the physical disks S.M.A.R.T.
    /// 
    /// stats on the host
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### disks
    /// -
    ///
    /// ### include_all_disks
    /// -
    ///
    /// ## Returns:
    ///
    /// The physical disks S.M.A.R.T. stats
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_query_smart_stats(&self, disks: Option<&[String]>, include_all_disks: Option<bool>) -> Result<crate::types::structs::VsanSmartStatsHostSummary> {
        let input = VsanHostQuerySmartStatsRequestType {disks, include_all_disks, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQuerySmartStats", Some(&input)).await?;
        let result: crate::types::structs::VsanSmartStatsHostSummary = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Queries all network settings required to perform a cluster wide network health
    /// check.
    /// 
    /// In addition, for all specified peers connectivity checks are performed,
    /// providing network health from the perspective of this ESXi host.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### peers
    /// List of IP addresses of other hosts in the vSAN cluster.
    /// Used to perform connectivity checks.
    ///
    /// ### robo_stretched_cluster_witnesses
    /// List of ROBO witness IPs.
    /// Used to info host that during the network connectivity check, the
    /// time out threshold should be different.
    ///
    /// ### v_motion_peers
    /// List of IP addresses of vMotion traffic enabled NICs excludes this host.
    /// Used to perform vMotion connectivity checks.
    ///
    /// ### spec
    /// -
    ///
    /// ## Returns:
    ///
    /// Summarized network health related information from the perspective of this host.
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_query_verify_network_settings(&self, peers: Option<&[String]>, robo_stretched_cluster_witnesses: Option<&[String]>, v_motion_peers: Option<&[String]>, spec: Option<&crate::types::structs::VsanHealthQuerySpec>) -> Result<crate::types::structs::VsanNetworkHealthResult> {
        let input = VsanHostQueryVerifyNetworkSettingsRequestType {peers, robo_stretched_cluster_witnesses, v_motion_peers, spec, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryVerifyNetworkSettings", Some(&input)).await?;
        let result: crate::types::structs::VsanNetworkHealthResult = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Return a string which represents vSAN version number for the querying host.
    /// 
    /// for example: vSphere 6.0u2 host will return '6.2.0.0'
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### display_version
    /// True to return vSAN display version instead of
    /// internal version. Default is False.
    ///
    /// ## Returns:
    ///
    /// The vSAN version.
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_query_health_system_version(&self, display_version: Option<bool>) -> Result<String> {
        let input = VsanHostQueryHealthSystemVersionRequestType {display_version, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostQueryHealthSystemVersion", Some(&input)).await?;
        let result: String = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// When the health check for vSAN object health test detects issues,
    /// this API can be used to repair the objects immediately.
    /// 
    /// the result would return objects in three lists
    /// the queuing repairing list: contains objects which are queuing for repairing
    /// the failed repaired list: contains objects which fails to repaired
    /// the not in queue list: contains objects which are not in repairing queue due
    /// to out of slot even though the objects are in the queuing repairing list, it
    /// does not mean the repair process is done. The completing time for repairing
    /// all of objects is unpredictable and depends on vSAN backend.
    /// 
    /// ***Required privileges:*** Host.Config.Storage
    ///
    /// ## Parameters:
    ///
    /// ### uuids
    /// UUID list of the objects to be fixed
    ///
    /// ### repair_type
    /// Type of repair, can be 'fix-object-immediate' (default) or 'crawler'
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_repair_immediate_objects(&self, uuids: Option<&[String]>, repair_type: Option<&str>) -> Result<crate::types::structs::VsanRepairObjectsResult> {
        let input = VsanHostRepairImmediateObjectsRequestType {uuids, repair_type, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostRepairImmediateObjects", Some(&input)).await?;
        let result: crate::types::structs::VsanRepairObjectsResult = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Deprecated as of vSphere API 6.7.
    /// 
    /// Run the VMDK load test according to the IO load test spec.
    /// 
    /// It cannot be run before the test VMDK is created by invoking
    /// QueryPrepareVmdkLoadTest() API.
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### runname
    /// The name for this VMDK load test
    ///
    /// ### duration_sec
    /// The duration time for each of VMDK load test
    ///
    /// ### specs
    /// The VMDK load test spec list each of which includes
    /// the VMDK creation spec and IO load test spec
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_host_run_vmdk_load_test(&self, runname: &str, duration_sec: i32, specs: &[crate::types::structs::VsanVmdkLoadTestSpec]) -> Result<Vec<crate::types::structs::VsanVmdkLoadTestResult>> {
        let input = VsanHostRunVmdkLoadTestRequestType {runname, duration_sec, specs, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanHostRunVmdkLoadTest", Some(&input)).await?;
        let result: Vec<crate::types::structs::VsanVmdkLoadTestResult> = crate::core::client::unmarshal_array(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Initiate proactive rebalance on target host
    /// 
    /// ***Required privileges:*** Host.Config.Storage
    ///
    /// ## Parameters:
    ///
    /// ### time_span
    /// Determines how long this proactive rebalance
    /// operation lasts in seconds, default 86400.
    ///
    /// ### variance_threshold
    /// Only if the disk's fullness (defined as
    /// used\_capacity/disk\_capacity) is above mean fullness
    /// and exceeds the lowest-usage disk in the cluster than
    /// this threshold, this disk is qualified for proactive
    /// rebalancing, default 0.3.
    ///
    /// ### time_threshold
    /// Only if the variance threshold has been
    /// continuously exceeded for this amount of time (in sec),
    /// the proactive rebalance operation will be applied to
    /// this disk, default 1800.
    ///
    /// ### rate_threshold
    /// Determines how many bytes CLOMD on this node can
    /// move out per hour (MB/hr) for proactive rebalancing,
    /// default 51200.
    ///
    /// ## Returns:
    ///
    /// True if the proactive rebalance has been triggered successfully but
    /// doesn't mean the proactive rebalance has been finished
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_start_proactive_rebalance(&self, time_span: Option<i32>, variance_threshold: Option<f32>, time_threshold: Option<i32>, rate_threshold: Option<i32>) -> Result<bool> {
        let input = VsanStartProactiveRebalanceRequestType {time_span, variance_threshold, time_threshold, rate_threshold, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanStartProactiveRebalance", Some(&input)).await?;
        let result: bool = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Stop proactive rebalance on target host
    /// 
    /// ***Required privileges:*** Host.Config.Storage
    ///
    /// ## Returns:
    ///
    /// True if triggering stopping proactive rebalance successfully but
    /// doesn't mean the proactive rebalance has been stopped
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_stop_proactive_rebalance(&self) -> Result<bool> {
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanStopProactiveRebalance", None).await?;
        let result: bool = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Waiting until the change of current vSAN health generation ID or timed out.
    /// 
    /// The change of generation ID indicates there are potential vSAN health status
    /// changes in the host
    /// 
    /// ***Required privileges:*** System.Read
    ///
    /// ## Parameters:
    ///
    /// ### timeout
    /// The timeout in seconds. The recommended timeout is 10s
    ///
    /// ## Returns:
    ///
    /// True indicates there is generation ID change
    ///
    /// ## Errors:
    ///
    /// Failure
    pub async fn vsan_wait_for_vsan_health_generation_id_change(&self, timeout: i32) -> Result<bool> {
        let input = VsanWaitForVsanHealthGenerationIdChangeRequestType {timeout, };
        let bytes = self.client.invoke("vsan", "HostVsanHealthSystem", &self.mo_id, "VsanWaitForVsanHealthGenerationIdChange", Some(&input)).await?;
        let result: bool = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
}
struct VsanHostCleanupVmdkLoadTestRequestType<'a> {
    runname: &'a str,
    specs: Option<&'a [crate::types::structs::VsanVmdkLoadTestSpec]>,
}

impl<'a> miniserde::Serialize for VsanHostCleanupVmdkLoadTestRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostCleanupVmdkLoadTestRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostCleanupVmdkLoadTestRequestTypeSer<'b, 'a> {
    data: &'b VsanHostCleanupVmdkLoadTestRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostCleanupVmdkLoadTestRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostCleanupVmdkLoadTestRequestType")),
                1 => return Some((std::borrow::Cow::Borrowed("runname"), &self.data.runname as &dyn miniserde::Serialize)),
                2 => {
                    let Some(ref val) = self.data.specs else { continue; };
                    return Some((std::borrow::Cow::Borrowed("specs"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostCreateVmHealthTestRequestType {
    timeout: i32,
}

impl miniserde::Serialize for VsanHostCreateVmHealthTestRequestType {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostCreateVmHealthTestRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostCreateVmHealthTestRequestTypeSer<'b> {
    data: &'b VsanHostCreateVmHealthTestRequestType,
    seq: usize,
}

impl<'b> miniserde::ser::Map for VsanHostCreateVmHealthTestRequestTypeSer<'b> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        let seq = self.seq;
        self.seq += 1;
        match seq {
            0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostCreateVmHealthTestRequestType")),
            1 => return Some((std::borrow::Cow::Borrowed("timeout"), &self.data.timeout as &dyn miniserde::Serialize)),
            _ => return None,
        }
    }
}
struct VsanFlashScsiControllerFirmwareRequestType<'a> {
    spec: &'a crate::types::structs::VsanHclFirmwareUpdateSpec,
}

impl<'a> miniserde::Serialize for VsanFlashScsiControllerFirmwareRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanFlashScsiControllerFirmwareRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanFlashScsiControllerFirmwareRequestTypeSer<'b, 'a> {
    data: &'b VsanFlashScsiControllerFirmwareRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanFlashScsiControllerFirmwareRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        let seq = self.seq;
        self.seq += 1;
        match seq {
            0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanFlashScsiControllerFirmwareRequestType")),
            1 => return Some((std::borrow::Cow::Borrowed("spec"), &self.data.spec as &dyn miniserde::Serialize)),
            _ => return None,
        }
    }
}
struct VsanGetHclInfoRequestType {
    include_vendor_info: Option<bool>,
    vsan_esa_eligible_disks_only: Option<bool>,
}

impl miniserde::Serialize for VsanGetHclInfoRequestType {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanGetHclInfoRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanGetHclInfoRequestTypeSer<'b> {
    data: &'b VsanGetHclInfoRequestType,
    seq: usize,
}

impl<'b> miniserde::ser::Map for VsanGetHclInfoRequestTypeSer<'b> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanGetHclInfoRequestType")),
                1 => {
                    let Some(ref val) = self.data.include_vendor_info else { continue; };
                    return Some((std::borrow::Cow::Borrowed("includeVendorInfo"), val as &dyn miniserde::Serialize));
                }
                2 => {
                    let Some(ref val) = self.data.vsan_esa_eligible_disks_only else { continue; };
                    return Some((std::borrow::Cow::Borrowed("vsanEsaEligibleDisksOnly"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostPrepareVmdkLoadTestRequestType<'a> {
    runname: &'a str,
    specs: &'a [crate::types::structs::VsanVmdkLoadTestSpec],
}

impl<'a> miniserde::Serialize for VsanHostPrepareVmdkLoadTestRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostPrepareVmdkLoadTestRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostPrepareVmdkLoadTestRequestTypeSer<'b, 'a> {
    data: &'b VsanHostPrepareVmdkLoadTestRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostPrepareVmdkLoadTestRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        let seq = self.seq;
        self.seq += 1;
        match seq {
            0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostPrepareVmdkLoadTestRequestType")),
            1 => return Some((std::borrow::Cow::Borrowed("runname"), &self.data.runname as &dyn miniserde::Serialize)),
            2 => return Some((std::borrow::Cow::Borrowed("specs"), &self.data.specs as &dyn miniserde::Serialize)),
            _ => return None,
        }
    }
}
struct VsanHostQueryAdvCfgRequestType<'a> {
    options: &'a [String],
    include_all_adv_options: Option<bool>,
    non_default_only: Option<bool>,
}

impl<'a> miniserde::Serialize for VsanHostQueryAdvCfgRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostQueryAdvCfgRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostQueryAdvCfgRequestTypeSer<'b, 'a> {
    data: &'b VsanHostQueryAdvCfgRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostQueryAdvCfgRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostQueryAdvCfgRequestType")),
                1 => return Some((std::borrow::Cow::Borrowed("options"), &self.data.options as &dyn miniserde::Serialize)),
                2 => {
                    let Some(ref val) = self.data.include_all_adv_options else { continue; };
                    return Some((std::borrow::Cow::Borrowed("includeAllAdvOptions"), val as &dyn miniserde::Serialize));
                }
                3 => {
                    let Some(ref val) = self.data.non_default_only else { continue; };
                    return Some((std::borrow::Cow::Borrowed("nonDefaultOnly"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostQueryCheckLimitsRequestType<'a> {
    spec: Option<&'a crate::types::structs::VsanHostQueryCheckLimitsSpec>,
}

impl<'a> miniserde::Serialize for VsanHostQueryCheckLimitsRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostQueryCheckLimitsRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostQueryCheckLimitsRequestTypeSer<'b, 'a> {
    data: &'b VsanHostQueryCheckLimitsRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostQueryCheckLimitsRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostQueryCheckLimitsRequestType")),
                1 => {
                    let Some(ref val) = self.data.spec else { continue; };
                    return Some((std::borrow::Cow::Borrowed("spec"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostQueryHostInfoByUuidsRequestType<'a> {
    uuids: &'a [String],
}

impl<'a> miniserde::Serialize for VsanHostQueryHostInfoByUuidsRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostQueryHostInfoByUuidsRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostQueryHostInfoByUuidsRequestTypeSer<'b, 'a> {
    data: &'b VsanHostQueryHostInfoByUuidsRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostQueryHostInfoByUuidsRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        let seq = self.seq;
        self.seq += 1;
        match seq {
            0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostQueryHostInfoByUuidsRequestType")),
            1 => return Some((std::borrow::Cow::Borrowed("uuids"), &self.data.uuids as &dyn miniserde::Serialize)),
            _ => return None,
        }
    }
}
struct VsanHostQueryObjectHealthSummaryRequestType<'a> {
    obj_uuids: Option<&'a [String]>,
    include_obj_uuids: Option<bool>,
    local_host_only: Option<bool>,
    include_non_compliance_obj_detail: Option<bool>,
    spec: Option<&'a crate::types::structs::VsanHealthQuerySpec>,
}

impl<'a> miniserde::Serialize for VsanHostQueryObjectHealthSummaryRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostQueryObjectHealthSummaryRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostQueryObjectHealthSummaryRequestTypeSer<'b, 'a> {
    data: &'b VsanHostQueryObjectHealthSummaryRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostQueryObjectHealthSummaryRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostQueryObjectHealthSummaryRequestType")),
                1 => {
                    let Some(ref val) = self.data.obj_uuids else { continue; };
                    return Some((std::borrow::Cow::Borrowed("objUuids"), val as &dyn miniserde::Serialize));
                }
                2 => {
                    let Some(ref val) = self.data.include_obj_uuids else { continue; };
                    return Some((std::borrow::Cow::Borrowed("includeObjUuids"), val as &dyn miniserde::Serialize));
                }
                3 => {
                    let Some(ref val) = self.data.local_host_only else { continue; };
                    return Some((std::borrow::Cow::Borrowed("localHostOnly"), val as &dyn miniserde::Serialize));
                }
                4 => {
                    let Some(ref val) = self.data.include_non_compliance_obj_detail else { continue; };
                    return Some((std::borrow::Cow::Borrowed("includeNonComplianceObjDetail"), val as &dyn miniserde::Serialize));
                }
                5 => {
                    let Some(ref val) = self.data.spec else { continue; };
                    return Some((std::borrow::Cow::Borrowed("spec"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostQueryRunIperfClientRequestType<'a> {
    multicast: bool,
    server_ip: &'a str,
    duration_sec: Option<i32>,
    spec: Option<&'a crate::types::structs::VsanIperfClientSpec>,
}

impl<'a> miniserde::Serialize for VsanHostQueryRunIperfClientRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostQueryRunIperfClientRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostQueryRunIperfClientRequestTypeSer<'b, 'a> {
    data: &'b VsanHostQueryRunIperfClientRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostQueryRunIperfClientRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostQueryRunIperfClientRequestType")),
                1 => return Some((std::borrow::Cow::Borrowed("multicast"), &self.data.multicast as &dyn miniserde::Serialize)),
                2 => return Some((std::borrow::Cow::Borrowed("serverIp"), &self.data.server_ip as &dyn miniserde::Serialize)),
                3 => {
                    let Some(ref val) = self.data.duration_sec else { continue; };
                    return Some((std::borrow::Cow::Borrowed("durationSec"), val as &dyn miniserde::Serialize));
                }
                4 => {
                    let Some(ref val) = self.data.spec else { continue; };
                    return Some((std::borrow::Cow::Borrowed("spec"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostQueryRunIperfServerRequestType<'a> {
    multicast: bool,
    server_ip: Option<&'a str>,
    duration_sec: Option<i32>,
}

impl<'a> miniserde::Serialize for VsanHostQueryRunIperfServerRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostQueryRunIperfServerRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostQueryRunIperfServerRequestTypeSer<'b, 'a> {
    data: &'b VsanHostQueryRunIperfServerRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostQueryRunIperfServerRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostQueryRunIperfServerRequestType")),
                1 => return Some((std::borrow::Cow::Borrowed("multicast"), &self.data.multicast as &dyn miniserde::Serialize)),
                2 => {
                    let Some(ref val) = self.data.server_ip else { continue; };
                    return Some((std::borrow::Cow::Borrowed("serverIp"), val as &dyn miniserde::Serialize));
                }
                3 => {
                    let Some(ref val) = self.data.duration_sec else { continue; };
                    return Some((std::borrow::Cow::Borrowed("durationSec"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostQuerySmartStatsRequestType<'a> {
    disks: Option<&'a [String]>,
    include_all_disks: Option<bool>,
}

impl<'a> miniserde::Serialize for VsanHostQuerySmartStatsRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostQuerySmartStatsRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostQuerySmartStatsRequestTypeSer<'b, 'a> {
    data: &'b VsanHostQuerySmartStatsRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostQuerySmartStatsRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostQuerySmartStatsRequestType")),
                1 => {
                    let Some(ref val) = self.data.disks else { continue; };
                    return Some((std::borrow::Cow::Borrowed("disks"), val as &dyn miniserde::Serialize));
                }
                2 => {
                    let Some(ref val) = self.data.include_all_disks else { continue; };
                    return Some((std::borrow::Cow::Borrowed("includeAllDisks"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostQueryVerifyNetworkSettingsRequestType<'a> {
    peers: Option<&'a [String]>,
    robo_stretched_cluster_witnesses: Option<&'a [String]>,
    v_motion_peers: Option<&'a [String]>,
    spec: Option<&'a crate::types::structs::VsanHealthQuerySpec>,
}

impl<'a> miniserde::Serialize for VsanHostQueryVerifyNetworkSettingsRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostQueryVerifyNetworkSettingsRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostQueryVerifyNetworkSettingsRequestTypeSer<'b, 'a> {
    data: &'b VsanHostQueryVerifyNetworkSettingsRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostQueryVerifyNetworkSettingsRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostQueryVerifyNetworkSettingsRequestType")),
                1 => {
                    let Some(ref val) = self.data.peers else { continue; };
                    return Some((std::borrow::Cow::Borrowed("peers"), val as &dyn miniserde::Serialize));
                }
                2 => {
                    let Some(ref val) = self.data.robo_stretched_cluster_witnesses else { continue; };
                    return Some((std::borrow::Cow::Borrowed("ROBOStretchedClusterWitnesses"), val as &dyn miniserde::Serialize));
                }
                3 => {
                    let Some(ref val) = self.data.v_motion_peers else { continue; };
                    return Some((std::borrow::Cow::Borrowed("vMotionPeers"), val as &dyn miniserde::Serialize));
                }
                4 => {
                    let Some(ref val) = self.data.spec else { continue; };
                    return Some((std::borrow::Cow::Borrowed("spec"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostQueryHealthSystemVersionRequestType {
    display_version: Option<bool>,
}

impl miniserde::Serialize for VsanHostQueryHealthSystemVersionRequestType {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostQueryHealthSystemVersionRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostQueryHealthSystemVersionRequestTypeSer<'b> {
    data: &'b VsanHostQueryHealthSystemVersionRequestType,
    seq: usize,
}

impl<'b> miniserde::ser::Map for VsanHostQueryHealthSystemVersionRequestTypeSer<'b> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostQueryHealthSystemVersionRequestType")),
                1 => {
                    let Some(ref val) = self.data.display_version else { continue; };
                    return Some((std::borrow::Cow::Borrowed("displayVersion"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostRepairImmediateObjectsRequestType<'a> {
    uuids: Option<&'a [String]>,
    repair_type: Option<&'a str>,
}

impl<'a> miniserde::Serialize for VsanHostRepairImmediateObjectsRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostRepairImmediateObjectsRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostRepairImmediateObjectsRequestTypeSer<'b, 'a> {
    data: &'b VsanHostRepairImmediateObjectsRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostRepairImmediateObjectsRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostRepairImmediateObjectsRequestType")),
                1 => {
                    let Some(ref val) = self.data.uuids else { continue; };
                    return Some((std::borrow::Cow::Borrowed("uuids"), val as &dyn miniserde::Serialize));
                }
                2 => {
                    let Some(ref val) = self.data.repair_type else { continue; };
                    return Some((std::borrow::Cow::Borrowed("repairType"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanHostRunVmdkLoadTestRequestType<'a> {
    runname: &'a str,
    duration_sec: i32,
    specs: &'a [crate::types::structs::VsanVmdkLoadTestSpec],
}

impl<'a> miniserde::Serialize for VsanHostRunVmdkLoadTestRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanHostRunVmdkLoadTestRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanHostRunVmdkLoadTestRequestTypeSer<'b, 'a> {
    data: &'b VsanHostRunVmdkLoadTestRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VsanHostRunVmdkLoadTestRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        let seq = self.seq;
        self.seq += 1;
        match seq {
            0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanHostRunVmdkLoadTestRequestType")),
            1 => return Some((std::borrow::Cow::Borrowed("runname"), &self.data.runname as &dyn miniserde::Serialize)),
            2 => return Some((std::borrow::Cow::Borrowed("durationSec"), &self.data.duration_sec as &dyn miniserde::Serialize)),
            3 => return Some((std::borrow::Cow::Borrowed("specs"), &self.data.specs as &dyn miniserde::Serialize)),
            _ => return None,
        }
    }
}
struct VsanStartProactiveRebalanceRequestType {
    time_span: Option<i32>,
    variance_threshold: Option<f32>,
    time_threshold: Option<i32>,
    rate_threshold: Option<i32>,
}

impl miniserde::Serialize for VsanStartProactiveRebalanceRequestType {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanStartProactiveRebalanceRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanStartProactiveRebalanceRequestTypeSer<'b> {
    data: &'b VsanStartProactiveRebalanceRequestType,
    seq: usize,
}

impl<'b> miniserde::ser::Map for VsanStartProactiveRebalanceRequestTypeSer<'b> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanStartProactiveRebalanceRequestType")),
                1 => {
                    let Some(ref val) = self.data.time_span else { continue; };
                    return Some((std::borrow::Cow::Borrowed("timeSpan"), val as &dyn miniserde::Serialize));
                }
                2 => {
                    let Some(ref val) = self.data.variance_threshold else { continue; };
                    return Some((std::borrow::Cow::Borrowed("varianceThreshold"), val as &dyn miniserde::Serialize));
                }
                3 => {
                    let Some(ref val) = self.data.time_threshold else { continue; };
                    return Some((std::borrow::Cow::Borrowed("timeThreshold"), val as &dyn miniserde::Serialize));
                }
                4 => {
                    let Some(ref val) = self.data.rate_threshold else { continue; };
                    return Some((std::borrow::Cow::Borrowed("rateThreshold"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VsanWaitForVsanHealthGenerationIdChangeRequestType {
    timeout: i32,
}

impl miniserde::Serialize for VsanWaitForVsanHealthGenerationIdChangeRequestType {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VsanWaitForVsanHealthGenerationIdChangeRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VsanWaitForVsanHealthGenerationIdChangeRequestTypeSer<'b> {
    data: &'b VsanWaitForVsanHealthGenerationIdChangeRequestType,
    seq: usize,
}

impl<'b> miniserde::ser::Map for VsanWaitForVsanHealthGenerationIdChangeRequestTypeSer<'b> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        let seq = self.seq;
        self.seq += 1;
        match seq {
            0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VsanWaitForVsanHealthGenerationIdChangeRequestType")),
            1 => return Some((std::borrow::Cow::Borrowed("timeout"), &self.data.timeout as &dyn miniserde::Serialize)),
            _ => return None,
        }
    }
}